Schema fails with newer Xerces

cz <[email protected]> Sun, 02 Mar 2025 11:53:59 +0100
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <[email protected]>
Hello All,=20

the Xerces version bundled with the JVM changed from JDK 23 to JDK 24.
As a byproduct, the OCX Schema
(https://github.com/OCXStandard/OCX_Schema) fails to parse due to
included unitsMLSchema. This does not happen with older Xerces versions
included in Java 11 -- Java 23.=20

Is this an Xerces or an Oracle topic?

Thanks, Carsten=20



[INFO] Sources are not up-to-date, XJC will be executed.
[WARNING] RESOLVE External systemId
[https://3docx.org/fileadmin/ocx_schema/unitsml/unitsmlSchema_lite-0.9.18.x=
sd
]
[WARNING] RESOLVE External systemId [http://www.w3.org/2001/xml.xsd]
[ERROR] Error while parsing schema(s). Location [
https://3docx.org/fileadmin/ocx_schema/unitsml/unitsmlSchema_lite-0.9.18.xs=
d{329,47}
].
org.xml.sax.SAXParseException: src-resolve: Name 'xml:id' kann nicht
als 'attribute declaration'-Komponente aufgel=C3=B6st werden.
    at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXPa
rseException (ErrorHandlerWrapper.java:204)
    at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error
(ErrorHandlerWrapper.java:135)
    at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError
(XMLErrorReporter.java:396)

The xmlunits schema looks like this:

<xsd:schema
xmlns=3D"urn:oasis:names:tc:unitsml:schema:xsd:UnitsMLSchema_lite-0.9.18"
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema"
xmlns:xml=3D"http://www.w3.org/XML/1998/namespace"
targetNamespace=3D"urn:oasis:names:tc:unitsml:schema:xsd:UnitsMLSchema_li
te-0.9.18" elementFormDefault=3D"qualified"
attributeFormDefault=3D"unqualified" version=3D"0.9.18">
	<xsd:import namespace=3D"http://www.w3.org/XML/1998/namespace"
schemaLocation=3D"http://www.w3.org/2001/xml.xsd"/>



<xsd:complexType name=3D"UnitType">
...
	<xsd:attribute ref=3D"xml:id" use=3D"required"/>