[jdom-interest] Definitive Schema validation in Beta 8

Kevin Jones kevinj at develop.com
Wed Feb 20 06:59:49 PST 2002


As an example of getting JDOM to do schema validation

SAXBuilder sb = new SAXBuilder("org.apache.xerces.parsers.SAXParser",
true);
        
sb.setFeature("http://apache.org/xml/features/validation/schema", true);
sb.setProperty("http://apache.org/xml/properties/schema/external-schemaL
ocation",
               "http://www.w3.org/2001/12/soap-envelope
http://localhost/blog/soap-envelope.xsd");

Document dom = sb.build(is);

If you want to pass more namespaces the name/value pairs are whitespace
separated, like this

sb.setProperty("http://apache.org/xml/properties/schema/external-schemaL
ocation",
                  "http://www.w3.org/2001/12/soap-envelope
http://localhost/blog/soap-envelope.xsd" + " " +
                  "http://kevinj.develop.com/weblog/weblog.xsd
http://localhost/blog/weblog.xsd");

Is there a standard format for the FAQ? Should I post it here or to
somebody privately?

Kevin Jones
Developmentor
www.develop.com 

> -----Original Message-----
> From: jdom-interest-admin at jdom.org 
> [mailto:jdom-interest-admin at jdom.org] On Behalf Of Niall Mcloughlin
> Sent: 20 February 2002 01:44
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Definitive Schema validation in Beta 8
> 
> 
> What are the chances of getting some definitive
> examples of validation against schema in the docs for
> Beta 8 ? I know this is the realm of the parser, but 
> xerces.orgs doco isn't too handy and there seems to be a need 
> for it. Myself included.
> 
> Also, in-memory validation was a TODO for Beta 8, has
> it been included ?
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts 
> http://uk.my.yahoo.com >
_______________________________________________
> To control your jdom-interest membership: 
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com




More information about the jdom-interest mailing list