- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 06 Jul 2007 14:01:30 +0000
- To: www-xml-schema-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4838 Summary: Chameleon <xs:include> behavior Product: XML Schema Version: 1.0/1.1 both Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Structures: XSD Part 1 AssignedTo: cmsmcq@w3.org ReportedBy: sandygao@ca.ibm.com QAContact: www-xml-schema-comments@w3.org Assume A,B,C,D are all schema documents. A has target namespace ns1, C has target namespace ns2, B and D don't have a target namespace. Now A includes B, B imports C, and C imports D. This appears to be legal. The spec is clear that the schema corresponding to A includes components from all 4 schema documents. But what target namespace do components from D have? The current rule seems to suggest that they get ns1. But this is somewhat counter-intuitive, as D is explicitly imported without a namespace. This can be resolved by saying "chameleon include is as if the included document had a target namespace". Now the above list of schema documents become A, B', C, and D, where B' replaces B with a target namespace ns1. This rule works well for the above case. Now consider X,Y,Z where X and Z have the same target namespace ns and Y doesn't have one. X includes Y, and Y imports Z. Following the current rule, X's schema get all components from all 3 documents, and they all have the same target namespace. But if we use the above "as if" rule, this would generate an error, because Y' (with target namespace ns) now is not allowed to import Z, because they have the same target namespace. To handle this, the "as if" rule can be amended by saying "if adding target namespace introduces illegal imports like the above, treat them as if includes". We need to pick one of the 3 possible rules: what the spec has now; the "as if" rule; or the "amended as if" rule.
Received on Friday, 6 July 2007 14:01:35 UTC