p:validate-with-xml-schema - multiple schemas provided

Section 7.2.6:

"Any schema documents provided on the schema port must be used in
preference to schema documents located by other means."

What does this exactly mean, especially when you provide more than one
schema document? That the schema that matches given document type is
selected (based on schema location & base URI of the schema document,
based onlocation hints, etc.)?

How does this affect resolving schema includes/imports? For instance, is
it correct to expect that in the following example, the second inline
schema will be used when resolving xs:include in the first schema?

<p:input port="schema">
  <p:inline>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:include schemaLocation="http://foo.com/document.xsd"/>
    </xs:schema>
  </p:inline>
  <!-- the following inline schema overrides the 'default'
       schema located at: http://foo.com/document.xsd -->
  <p:inline xml:base="http://foo.com/document.xsd">
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      ...
    </xs:schema>
  </p:inline>
</p:input>


Regards,
Vojtech

Received on Tuesday, 17 February 2009 13:42:35 UTC