Include bei modularen Schemas wird inkorrekt aufgelöst

MathML3 XML Schema

mathml-3.0/
├── relaxng
...
└── xsd
    ├── mathml3-common.xsd
    ├── mathml3-content.xsd
    ├── mathml3-presentation.xsd
    ├── mathml3-strict-content.xsd
    └── mathml3.xsd

Das Basisschema lädt per Schemateile nach, alle Teile haben den gleiche Namespace. Statt der Aufnahme der Teile, er erfolgt ein Mapping auf die Basisschemadatei. Das verursacht Validierungsfehler, weil z.B. das Root-Element erst in mathml3-common.xsd definiert wird.

Beispiel:

Katalog:

   <!-- MathML 3.0 // https://www.w3.org/Math/XMLSchema/ // https://www.w3.org/Math/RelaxNG/ -->
   <entry schematype="schema" namespace="http://www.w3.org/1998/Math/MathML" schemauri="https://www.w3.org/Math/XMLSchema/mathml3/mathml3.xsd"/>

Ausgabe:

steidl@ldv042:~/Development/xml_plugin4rosetta$ java -Djaxp.debug=1 -cp /exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/dps-sdk-7.3.0.jar:lib/xercesSamples.jar:lib/resolver.jar:lib/xml-apis.jar:lib/xercesImpl.jar:lib/jing.jar:lib/icu4j.jar:lib/dtdinst.jar:lib/serializer.jar:lib/cupv10k-runtime.jar:lib/org.eclipse.wst.xml.xpath2.processor_1.2.1.jar:./java/:/usr/share/java/junit4.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/commons-codec-1.10.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/log4j-core-2.17.1.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/xpath2.processor-1.1.0.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/xml-apis-1.4.01.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/dps-sdk-7.3.0.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/dom4j-1.6.1.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/xmlbeans-2.3.0.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/dps-sdk-7.3.0-javadoc.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/commons-lang-2.6.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/xercesImpl-2.11.0.beta.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/log4j-api-2.17.1.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/xalan-2.7.2.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/jaxen-1.1-beta-6.jar:/exlibris/dps/d4_1/system.dir/dps-sdk-7.3.0/lib//../dps-sdk-projects/dps-sdk-deposit/lib/jxl-2.6.9.jar:SLUBXmlFormatValidationPlugin.jar org.slub.rosetta.dps.repository.plugin.SLUBXmlFormatValidationPlugin /home/steidl/Development/xml_plugin4rosetta_catalog/test/examples/mathml/mathml2.example3.xml
{debug=true, catalog=/home/steidl/Development/xml_plugin4rosetta_catalog/src/etc/xml/slubrosetta/slub_dtd_catalog.xml, schemacatalog=/home/steidl/Development/xml_plugin4rosetta_catalog/src/etc/xml/slubrosetta/slub_schema_catalog.xml}
CATALOG =/home/steidl/Development/xml_plugin4rosetta_catalog/src/etc/xml/slubrosetta/slub_schema_catalog.xml
----------------------------------
Agent          : 'SLUBXmlFormatValidationPlugin'
DTD-Catalog    : '/home/steidl/Development/xml_plugin4rosetta_catalog/src/etc/xml/slubrosetta/slub_dtd_catalog.xml'
Schema-Catalog : '/home/steidl/Development/xml_plugin4rosetta_catalog/src/etc/xml/slubrosetta/slub_schema_catalog.xml'
Debug          : 'true'

validation of file /home/steidl/Development/xml_plugin4rosetta_catalog/test/examples/mathml/mathml2.example3.xml
# ns aware=true include aware=false is validating=false
check  info.nameSpaceUri=http://www.w3.org/1998/Math/MathML
no dtd applicable
found namespace  http://www.w3.org/1998/Math/MathML
found schematype schema
found schemaURI  file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
JAXP: using thread context class loader (jdk.internal.loader.ClassLoaders$AppClassLoader@5cb0d902) for search
JAXP: Looking up system property 'javax.xml.validation.SchemaFactory:http://www.w3.org/XML/XMLSchema/v1.1'
JAXP: The property is undefined.
JAXP: found null in $java.home/conf/jaxp.properties
JAXP: factory 'org.apache.xerces.jaxp.validation.XMLSchema11Factory' was found for http://www.w3.org/XML/XMLSchema/v1.1
RESOURCE_RESOLVER: type=http://www.w3.org/2001/XMLSchema namespaceuri=http://www.w3.org/1998/Math/MathML publicId=null SystemId=mathml3-content.xsd baseURI=file:/etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
--> Found entry in schemacatalog for http://www.w3.org/1998/Math/MathML, mapping to file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd !
RESOURCE_RESOLVER: type=http://www.w3.org/2001/XMLSchema namespaceuri=http://www.w3.org/1998/Math/MathML publicId=null SystemId=mathml3-content.xsd baseURI=file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
--> Found entry in schemacatalog for http://www.w3.org/1998/Math/MathML, mapping to file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd !
RESOURCE_RESOLVER: type=http://www.w3.org/2001/XMLSchema namespaceuri=http://www.w3.org/1998/Math/MathML publicId=null SystemId=mathml3-presentation.xsd baseURI=file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
--> Found entry in schemacatalog for http://www.w3.org/1998/Math/MathML, mapping to file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd !
RESOURCE_RESOLVER: type=http://www.w3.org/2001/XMLSchema namespaceuri=http://www.w3.org/1998/Math/MathML publicId=null SystemId=mathml3-common.xsd baseURI=file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
--> Found entry in schemacatalog for http://www.w3.org/1998/Math/MathML, mapping to file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd !
RESOURCE_RESOLVER: type=http://www.w3.org/2001/XMLSchema namespaceuri=http://www.w3.org/1998/Math/MathML publicId=null SystemId=mathml3-presentation.xsd baseURI=file:/etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
--> Found entry in schemacatalog for http://www.w3.org/1998/Math/MathML, mapping to file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd !
RESOURCE_RESOLVER: type=http://www.w3.org/2001/XMLSchema namespaceuri=http://www.w3.org/1998/Math/MathML publicId=null SystemId=mathml3-common.xsd baseURI=file:/etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
--> Found entry in schemacatalog for http://www.w3.org/1998/Math/MathML, mapping to file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd !
cvc-elt.1.a: Cannot find the declaration of element 'mml:math'.
org.xml.sax.SAXParseException; cvc-elt.1.a: Cannot find the declaration of element 'mml:math'.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
	at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
	at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
	at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
	at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
	at java.xml/javax.xml.validation.Validator.validate(Validator.java:124)
	at org.slub.rosetta.dps.repository.plugin.Validation.SLUBValidateSchema.validateAgainst(SLUBValidateSchema.java:36)
	at org.slub.rosetta.dps.repository.plugin.SLUBXmlFormatValidationPlugin.validateFormatAgainstAnySchema(SLUBXmlFormatValidationPlugin.java:314)
	at org.slub.rosetta.dps.repository.plugin.SLUBXmlFormatValidationPlugin.validateFormat(SLUBXmlFormatValidationPlugin.java:279)
	at org.slub.rosetta.dps.repository.plugin.SLUBXmlFormatValidationPlugin.main(SLUBXmlFormatValidationPlugin.java:448)
errors:
----
	cvc-elt.1.a: Cannot find the declaration of element 'mml:math'.
----
	isValid: false
	getValidationDetails: 
	..........

detect XML type via NS:http://www.w3.org/1998/Math/MathML
checked XML is wellformed
assigned schema of type: schema
assigned schema uri: file:///etc/xml/slubrosetta/schemas/mathml-3.0/xsd/mathml3.xsd
	..........
	getErrors : 
	..........
[cvc-elt.1.a: Cannot find the declaration of element 'mml:math'.]
	..........
----------------------------------
getAgent:
SLUBXmlFormatValidationPlugin
----------------------------------
getProfile:
null
----------------------------------