How to enable XInclude processing for schemavalidate task

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

How to enable XInclude processing for schemavalidate task

Hello list,

I'm trying to enable XInclude processing in the schemavalidate task:

        noNamespaceFile="${user.input.xsd}" file="${user.input.xml}">
      <attribute name="http://apache.org/xml/features/xinclude" value="true"/>

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:*)"/>

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,

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]