Project

Profile

Help

Bug #3928

closed

xs:import-schema with no namespace attribute reports no error if target schema document has a targetNamespace

Added by Michael Kay over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema conformance
Sprint/Milestone:
-
Start date:
2018-10-01
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
9.9
Fixed in Maintenance Release:
Platforms:

Description

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 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, in SchemaCompiler.processSchemaDocument(), it gets tangled up with the rules for chameleon include.

This is a spin-off of bug #3925

Please register to edit this issue

Also available in: Atom PDF