[jdom-interest] Failed to parse schema by JDOM's schema validator
Jing Yang
jyang at jbmanagement.com
Tue Aug 19 14:15:31 PDT 2003
Schema validator(in org.jdom.contrib.schema) failed to parse
my schema(TestCase_msg.xsd).
During the parse process,
Schema schema = Schema.parse("TestCase_Msg.xsd", Schema.W3C_XML_SCHEMA);
it throws exception as "Failed to parse schema "TestCase_Msg.xsd :null"
What's wrong with this schema?
This schema works well with Xerces(parse and validating).
-Jing
> -----Original Message-----
> From: Laurent Bihanic [mailto:laurent.bihanic at atosorigin.com]
> Sent: Monday, August 18, 2003 3:52 AM
> To: Jing Yang
> Cc: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] customized error handling
>
>
>
> Jing Yang wrote:
> > During validating process (against schema),
> > is it possible to trace the Element(in JDOM) that causes
> invalidity ?
>
> No because when the parser encounters an error it stops the
> parse. Thus, the
> faulty element is generally not known of JDOM.
>
> A workaround to this problem is to parse the document without
> requesting
> validation and then to validate the JDOM document using JDOM's schema
> validator (package org.jdom.contrib.schema in jdom-contrib module).
>
> Laurent
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCase_Msg.xsd
Type: text/xml
Size: 777 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030819/c3ac4b37/TestCase_Msg.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCase_Field.xsd
Type: text/xml
Size: 533 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030819/c3ac4b37/TestCase_Field.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCase_Set.xsd
Type: text/xml
Size: 1031 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030819/c3ac4b37/TestCase_Set.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCase.xml
Type: text/xml
Size: 239 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20030819/c3ac4b37/TestCase.xml
More information about the jdom-interest
mailing list