ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SCHOEPFLIN Markus <Markus.Schoepf...@comsoft.aero>
Subject How to enable XInclude processing for schemavalidate task
Date Tue, 24 May 2016 11:53:07 GMT
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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message