SCHOEPFLIN Markus
2016-05-24 11:53:07 UTC
Hello list,
I'm trying to enable XInclude processing in the schemavalidate task:
<schemavalidate
noNamespaceFile="${user.input.xsd}" file="${user.input.xml}">
<attribute name="http://apache.org/xml/features/xinclude" value="true"/>
</schemavalidate>
This does not work, as I'm still getting an error when the task is executed: "foo.xsd:8:136: s4s-elt-schema-ns: The namespace of element 'include' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'."
The corresponding schema file looks like this:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="..." xpointer="xmlns(xs=http://www.w3.org/2001/XMLSchema)xpointer(/xs:schema/xs:*)"/>
</xs:schema>
When enabling Ant debug mode, I can see that the feature is correctly set on the parser:
[schemavalidate] Using SAX2 reader org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
[schemavalidate] Setting feature http://xml.org/sax/features/validation=true
[schemavalidate] Setting feature http://apache.org/xml/features/xinclude=true
[schemavalidate] Setting feature http://xml.org/sax/features/namespaces=true
[schemavalidate] Setting feature http://apache.org/xml/features/validation/schema=true
[schemavalidate] Setting feature http://apache.org/xml/features/validation/schema-full-checking=true
[schemavalidate] Validating foo.xml...
What am I missing? Or is this not supported?
Thanks for any help,
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org
I'm trying to enable XInclude processing in the schemavalidate task:
<schemavalidate
noNamespaceFile="${user.input.xsd}" file="${user.input.xml}">
<attribute name="http://apache.org/xml/features/xinclude" value="true"/>
</schemavalidate>
This does not work, as I'm still getting an error when the task is executed: "foo.xsd:8:136: s4s-elt-schema-ns: The namespace of element 'include' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'."
The corresponding schema file looks like this:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="..." xpointer="xmlns(xs=http://www.w3.org/2001/XMLSchema)xpointer(/xs:schema/xs:*)"/>
</xs:schema>
When enabling Ant debug mode, I can see that the feature is correctly set on the parser:
[schemavalidate] Using SAX2 reader org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser
[schemavalidate] Setting feature http://xml.org/sax/features/validation=true
[schemavalidate] Setting feature http://apache.org/xml/features/xinclude=true
[schemavalidate] Setting feature http://xml.org/sax/features/namespaces=true
[schemavalidate] Setting feature http://apache.org/xml/features/validation/schema=true
[schemavalidate] Setting feature http://apache.org/xml/features/validation/schema-full-checking=true
[schemavalidate] Validating foo.xml...
What am I missing? Or is this not supported?
Thanks for any help,
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@ant.apache.org
For additional commands, e-mail: user-***@ant.apache.org