[jdom-interest] Schema validation.

Alex Rosen arosen at silverstream.com
Wed Jan 16 07:58:16 PST 2002


SAXBuilder does have a setFeature() method. I thought it was added before
beta 7, but perhaps not. In any case, getting the latest code from CVS will
expose this method.

Alex

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Damien Dudouit
> Sent: Wednesday, January 16, 2002 6:36 AM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Schema validation.
>
>
> Hi,
>
> I have been using JDom for a while and also received quite a
> few emails on
> the mailing list with that title. But please don't hit the
> delete button
> staightaway :).
> So, today for the first time I tried validation on an XML schema. The
> validation fails on the root element saying it must be
> defined. I'm using
> JDom with Xerces and I went on Xerces web site to see how
> Xerces supports
> XML Schema validation.
> It appears it works by setting features on the XMLReader:
> DTD validation:
> reader.setFeature("http://xml.org/sax/features/validation", true)
> XML Schema validation:
> reader.setFeature("http://xml.org/sax/features/validation/sche
> ma", true)
>
> I went on the code of JDom SAXBuilder and only the first
> feature for DTD
> support is set. Since the org.jdom.SAXBuilder class only
> expose the method
> setValidation(boolean) and not setFeature(..) on the
> underlying XMLReader,
> what's the tip??
>
> Thanks a lot,
>
> Damien
>
> _______________________________________________
> 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