Thank you. It seems as though this information should be provided on
this page, as well as on the downloads page. I'd like to post a bug
about this, as well as a few related items that seem to make it
surprisingly difficult to know what you are getting wrt schema 1.1
support, but I'd like to make sure I understand the full situation. BTW
in browsing the bug database, I see your name all over the schema 1.1
issues, Mukul, and I'd like to thank you for all the work you've done to
get Schema support in xerces-j to what it is.
Among the things I've noticed is that "regular" xerces impl is quite
happy to validate XML files referencing 1.1 schemas (i.e. which haveĀ
vc:minVersion="1.1"). It may be arguable about whether this is correct
if the XML being validated does not use any 1.1 features, but that could
be discussed in the issue comments if I post an issue.
But maybe the first questions I should ask is why is there a "regular"
variant of xerces which does not support 1.1 in the first place? What
advantage does it have over the schema 1.1 variant? Is the 1.1 variant
considered "not quite ready for prime time"?
I'd also note that the jar in the maven central repository seems to be
the "regular" version and there is no schema 1.1 variant there.
To test out the oddity of the "regular" variant happily validating files
referencing these 1.1 schemas, I added an attribute of
type="xs:dateTimeStamp" to an element definition and tried validating an
XML file using this instance. (I am not sure whether these schemas
actually already used any 1.1 specific features.) And sure enough the
regular variant did respond with an error ("Error resolving component
'xs:dateTimeStamp'. It was detected that 'xs:dateTimeStamp' is in
namespace 'http://www.w3.org/2001/XMLSchema', but components from this
namespace are not referenceable from schema document..." etc.)
I swapped in the "Schema 1.1" variant of xercesImpl.jar, and tried
validating again, and I get the error:
cvc-elt.1.a: Cannot find the declaration of element 'module'.
(module is the root element of the document)
The Oxygen editor considers it valid. I get this same error from the
schema 1.1 xerces variantĀ trying to validate any of my xml files, even
after reverting any changed from my xs:dateTimeStamp experiment. It
would seem that it breaks something that works with the regular variant.
The way I am invoking validation here, is (for convenience) via one of
the xercesSamples classes. Essentially I'm calling
java -cp
.:./lib/xml-apis-1.4.01.jar:./lib/xercesImpl-2.12.1.jar:./lib/xercesSamples-2.12.1.jar
sax.Counter -np -n -v -s "$1"
The xml files reference the schema via xsi:schemaLocation which
references the schema via an http url.
Is there any reason to expect this not to work with the schema 1.1 variant?
Thanks,
Eric
On 4/27/21 3:54 AM, Mukul Gandhi wrote:
On Tue, Apr 27, 2021 at 12:13 AM Eric Schwarzenbach
<eric.schwarzenb...@wrycan.com <mailto:eric.schwarzenb...@wrycan.com>>
wrote:
Is there any place on the xerces site that explains the difference
between the "Xerces2 Java 2.12.1" and "Xerces2 Java 2.12.1 (XML
Schema 1.1)" downloads? It seems like various places on the site
it just say it support Schema 1.1. Is that only if you use the
"Xerces2 Java 2.12.1 (XML Schema 1.1)" version of the xerces impl jar?
The download "Xerces2 Java 2.12.1 (XML Schema 1.1)" mentioned on the
Xerces site, supports all the features listed at
http://xerces.apache.org/xerces2-j/ 'Features of This Release'.
Whereas, the download "Xerces2 Java 2.12.1" mentioned on the Xerces
site, supports all the features listed at
http://xerces.apache.org/xerces2-j/ 'Features of This Release'
excluding the last two (i.e 'XML Schema 1.1 Structures and Datatypes
Recommendations' & 'XML Schema Definition Language (XSD): Component
Designators (SCD) Candidate Recommendation (January 2010)' are not
provided by "Xerces2 Java 2.12.1").
--
Regards,
Mukul Gandhi