Apache XercesJ 2.12.2 supports XSD 1.1, which adds some handy features to XSD 1.0.
We can write a schema that supports xsd1.1 by including a minVersion attribute:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
vc:minVersion="1.1"
elementFormDefault="qualified">
Building a Java app that handles XSD 1.1 is pretty easy in code; you need to inspect the minVersion in the XSD file, then instantiate the schemaFactory appropriately, eg if 1.1, then
var schemaFactory = SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");
schemaFactory.setFeature(
"http://apache.org/xml/features/validation/cta-full-xpath-checking", true);
(or just use 1.1 always, since it is a superset).
At runtime, though, there are a bunch of dependencies that are required to allow XSD 1.1 to work; these dependencies do not seem to be asserted in the POM file for XercesJ. Instead Apache bundles the dependencies in the "XSD1.1 ready" release of XercesJ. (tgz here)
The list of bundled dependencies is:
- cupv10k-runtime.jar
- icu4j.jar
- org.eclipse.wst.xml.xpath2.processor_1.2.1.jar
- resolver.jar
- serializer.jar
- xercesImpl.jar
- xml-apis.jar
Can this team build a lemminx that supports XSD 1.1 ?
Apache XercesJ 2.12.2 supports XSD 1.1, which adds some handy features to XSD 1.0.
We can write a schema that supports xsd1.1 by including a
minVersionattribute:Building a Java app that handles XSD 1.1 is pretty easy in code; you need to inspect the
minVersionin the XSD file, then instantiate the schemaFactory appropriately, eg if 1.1, then(or just use 1.1 always, since it is a superset).
At runtime, though, there are a bunch of dependencies that are required to allow XSD 1.1 to work; these dependencies do not seem to be asserted in the POM file for XercesJ. Instead Apache bundles the dependencies in the "XSD1.1 ready" release of XercesJ. (tgz here)
The list of bundled dependencies is:
Can this team build a lemminx that supports XSD 1.1 ?