[jdom-interest] XML Schema validation asking or DOCTYPE?
Travers Waker
traversw at innoforge.com
Thu Oct 25 01:56:56 PDT 2001
Hi Neil.
> my xml file has:
>
> <?xml version="1.0"?>
> <Book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="myschema.xsd">
This could be a problem. The version of Xerces that ships with JDOM b7 is 1.2.0, from 09/2000, so it's unlikely to support
the schema spec of 2001. It's probably wanting:
xmlns:xsi="http://www/w3/org/2000/XX/XMLSchema-instance"
where XX is some month, although I don't know which one.
What I would try first is to download the latest version of XercesJ 1 from www.apache.org, and use that xerces.jar instead of
the old one that shipped with JDOM b7. Then you can use xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance".
I see that you tried using XercesJ 2, which maybe you thought was the latest version of the Xerces jar that shipped with
JDOM, but actually Xerces J 2 is a completely different parser to XercesJ 1, and does not support schema validation yet, I
think.
The latest official Xerces release is 1.4.3.
Good luck.
Travers
More information about the jdom-interest
mailing list