Plugin beachtet vc:minVersion="1.1" nicht / Support für XML Schema 1.1
KML ist nur als XML Schema 1.1 verfügbar: https://schemas.opengis.net/kml/2.3/
KML Beispiel: https://git.slub-dresden.de/slub-digitalpreservation/xml_plugin4rosetta_catalog/-/blob/main/test/examples/kml/KML_Samples.kml
Plugin-Ausgabe + Fehler:
$ java -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::./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:/usr/share/java/xml-resolver-1.2.jar:SLUBXmlFormatValidationPlugin.jar org.slub.rosetta.dps.repository.plugin.SLUBXmlFormatValidationPlugin /home/steidl/Development/xml_plugin4rosetta_catalog/test/examples/kml/KML_Samples.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}
----------------------------------
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/kml/KML_Samples.xml
check info.nameSpaceUri=http://www.opengis.net/kml/2.2
no dtd applicable
map size=21
file:///etc/xml/slubrosetta/schemas/xhtml-1.1/xhtml11.xsd
http://www.w3.org/1999/xhtml
schema
file:///etc/xml/slubrosetta/schemas/slubrights-1.0/rights1.xsd
http://slubarchiv.slub-dresden.de/rights1
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/linearRefOffset.xsd
http://www.opengis.net/gml/3.3/lr
schema
file:///etc/xml/slubrosetta/schemas/gml-3.2.2/gml.xsd
http://www.opengis.net/gml/3.2
schema
file:///etc/xml/slubrosetta/schemas/kml-2.3.0/ogckml23.xsd
http://www.opengis.net/kml/2.2
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/extdEncRule.xsd
http://www.opengis.net/gml/3.3/exr
schema
file:///etc/xml/slubrosetta/schemas/kml-2.3.0/atom-author-link.xsd
http://www.w3.org/2005/Atom
schema
file:///etc/xml/slubrosetta/schemas/mods-3.8/mods-3-8.xsd
http://www.loc.gov/mods/v3
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/extdBaseTypes.xsd
http://www.opengis.net/gml/3.3/xbt
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/linearRefOffsetVector.xsd
http://www.opengis.net/gml/3.3/lrov
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/linearRef.xsd
http://www.opengis.net/gml/3.3/lro
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/tin.xsd
http://www.opengis.net/gml/3.3/tin
schema
file:///etc/xml/slubrosetta/schemas/mei-4.0.1/mei-all.rng
http://www.music-encoding.org/ns/mei
relaxng
file:///etc/xml/slubrosetta/schemas/kml-2.3.0/xAL.xsd
urn:oasis:names:tc:ciq:xsdschema:xAL:2.0
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/geometryCompact.xsd
http://www.opengis.net/gml/3.3/ce
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/referenceableGrid.xsd
http://www.opengis.net/gml/3.3/rgrid
schema
file:///etc/xml/slubrosetta/schemas/docbook-5.1/rng/docbook.rng
http://docbook.org/ns/docbook
relaxng
file:///etc/xml/slubrosetta/schemas/mets-1.12.1/mets.xsd
http://www.loc.gov/METS/
schema
file:///etc/xml/slubrosetta/schemas/xhtml-1.1/xhtml-datatypes-1.xsd
http://www.w3.org/1999/xhtml/datatypes/
schema
file:///etc/xml/slubrosetta/schemas/alto-2.0/alto-v2.0.xsd
http://www.loc.gov/standards/alto/ns-v2#
schema
file:///etc/xml/slubrosetta/schemas/gml-3.3.1/linearRefTowardsReferent.xsd
http://www.opengis.net/gml/3.3/lrtr
schema
found namespace http://www.opengis.net/kml/2.2
found schematype schema
found schemaURI file:///etc/xml/slubrosetta/schemas/kml-2.3.0/ogckml23.xsd
-> set schema to file:///etc/xml/slubrosetta/schemas/kml-2.3.0/ogckml23.xsd
ERROR: not a XML file, s4s-elt-invalid-content.1: Content von 'schema' ist ungültig. Element 'defaultOpenContent' ist ungültig, nicht an der erwarteten Stelle oder kommt zu oft vor. (file=/home/steidl/Development/xml_plugin4rosetta_catalog/test/examples/kml/KML_Samples.xml)
errors:
----
not a XML file, s4s-elt-invalid-content.1: Content von 'schema' ist ungültig. Element 'defaultOpenContent' ist ungültig, nicht an der erwarteten Stelle oder kommt zu oft vor. (file=/home/steidl/Development/xml_plugin4rosetta_catalog/test/examples/kml/KML_Samples.xml)
----
isValid: false
getValidationDetails:
..........
detect XML type via NS:http://www.opengis.net/kml/2.2
checked XML is wellformed
assigned schema of type: schema
assigned schema uri: file:///etc/xml/slubrosetta/schemas/kml-2.3.0/ogckml23.xsd
..........
getErrors :
..........
[not a XML file, s4s-elt-invalid-content.1: Content von 'schema' ist ungültig. Element 'defaultOpenContent' ist ungültig, nicht an der erwarteten Stelle oder kommt zu oft vor. (file=/home/steidl/Development/xml_plugin4rosetta_catalog/test/examples/kml/KML_Samples.xml)]
..........
----------------------------------
getAgent:
SLUBXmlFormatValidationPlugin
----------------------------------
getProfile:
null
----------------------------------
Vermutung:
Plugin ignoriert den Hinweis XML Schema 1.1 zu nutzen.
Das Beispiel validiert problemlos in Oxygen.
Ändere ich xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1"
auf
xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.0"
in der KML xsd, meldet Oxygen ähnliche Fehler.
The xs:defaultOpenContent element requires XSD 1.1 to be enabled
The xs:assert element requires XSD 1.1 to be enabled
...
Edited by Jens Steidl