Bug #3928
Updated by Michael Kay about 6 years ago
The rules for xs:import in XSD 1.1 part 1 section 4.2.6.2 say ~~~ 3 If D2 [the target document] exists, that is, clause 2.1 or clause 2.2 above were satisfied, then the appropriate case among the following must be true: 3.1 If there is a namespace [attribute], then its ·actual value· is identical to the ·actual value· of the targetNamespace [attribute] of D2. 3.2 If there is no namespace [attribute], then D2 has no targetNamespace [attribute] ~~~ xsl:import-schema effectively inherits these rules, because the semantics of xsl:import-schema are described in terms of an equivalent "synthetic schema document" using xs:import. I believe we are not detecting condition 3.2, that is, the case where xsl:import-schema xs:import specifies no namespace attribute, and the referenced schema document has a targetNamespace. New test case import-schema-201 confirms this. For xs:import itself, we get this right - as shown by new test case target007 in XSD test set targetNS. Possible reason, The reason is that in SchemaCompiler.processSchemaDocument(), it gets tangled up with the rules for chameleon include. This is a spin-off of bug #3925