The warning is there because this is a known area where different schema processors are not fully interoperable, and where the spec is open to interpretation.

The only general mechanism in Saxon to suppress warnings is to supply your own ErrorListener.

The option --multipleSchemaImports can be set to control whether Saxon attempts to act on a second import for an existing namespace or to ignore it; the default is to ignore it, but in that case it always outputs this warning. You could try setting this to true, which would probably work fine so long as all the xs:import declarations for a given namespace point to the same schema location. (I'm not sure how you would do this from XProc, though).

Michael Kay

On 27 Mar 2014, at 01:54, wrote:

Is there anyway to disable the warning related to skipping the import of a schema whose namespace has already been imported?  An example is an import graph like this:

     /   \
    |   b.xsd
    |    /

This occurs frequently for me particularly because the b.xsd document is generated via XSLT in an XProc pipeline, stored but also piped into laterp:validate-with-xml-schema and p:xslt steps.  I cannot remove all of the schemaLocation (xs:import), xsi:schemaLocation (instance document), and schema-location (xsl:import-schema) attributes because editors such as Oxygen need them, and I am not sure that would work in this case anyway as there is a "physical" <xs:import namespace="..."/> in both b.xsd and c.xsd because both require the definitions therein (i.e. inherent diamond import hierarchy).

Paul Mensonides

saxon-help mailing list archived at