Hi,
With Xerces-J-2.0.1, the ASBuilder sample does not appear to work as expected. I wondered if anyone else has experienced similar problems.
First I export my CLASSPATH to include xerces-J-2.0.0, xml-apis and dom.ASBuilder. If I run:
java dom.ASBuilder -f -a Response.xsd -i sampleResponse.xml
validation happens as expected.
If I change the classpath to the new Xerces-J-2.0.1 jars (built from the source distribution), I find:
java dom.ASBuilder # gives the usage message, so ok java dom.ASBuilder -f -a Response.xsd # runs with no output, so ok
but
java dom.ASBuilder -f -a Response.xsd -i sampleResponse.xml
gives
[Warning] sampleResponse.xml:1:66: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. [Error] sampleResponse.xml:1:66: cvc-elt.1: Cannot find the declaration of element 'Response'. [Warning] sampleResponse.xml:2:12: schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. [Error] sampleResponse.xml:2:12: cvc-elt.1: Cannot find the declaration of element 'Summary'. (etc...)
and
1 - The document was found ok by Xerces-J-2.0.0 2 - The file permissions are world-readable (and see point 1) 3 - The root of the schema document is <xsd:schema> with the namespace xmlns:xsd='http://www.w3.org/2001/XMLSchema' (and see point 1)
This happens whether I use jdk 1.3.1 or 1.4.
Feedback much appreciated, even (especially?) if it is to point out some stupidity on my part ;)
Steve Baker -- Steven J Baker Ambriel Consulting http://ambrielconsulting.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
