New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a chameleon schema does not inherit targetNamespace and namespace bindings #176

Closed
eed3si9n opened this Issue Nov 30, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@eed3si9n
Owner

eed3si9n commented Nov 30, 2012

originally reported by @Marza in https://groups.google.com/d/topic/scalaxb/_W8oayoj97Q/discussion

steps

  1. define a.xsd with targetNamespace and the default namespace binding to http://example.com/ns
  2. include b.xsd without targetNamespace or the default namespace binding from a.xsd.
  3. try referencing a complex type defined in b.xsd from a.xsd.
  4. try referencing a complex type defined in a.xsd from b.xsd.

problem

  1. lack of targetNamespace puts types in b.xsd into null namespace.
  2. lack of the default namespace binding in b.xsd treats the type as unqualified.

expectation

b.xsd inherits all attributes from a.xsd, resolving both references.

notes

XML Schema Part 1: Structures Second Edition Schema Representation Constraint: Inclusion Constraints and Semantics:

2 One of the following must be true:
2.1 SII has a targetNamespace attribute, and its actual value is identical to the actual value of the targetNamespace attribute of SII’ (which must have such an [attribute]).
2.2 Neither SII nor SII’ have a targetNamespace attribute.
2.3 SII has no targetNamespace attribute (but SII’ does).

3 The appropriate case among the following must be true:
3.1 If clause 2.1 or clause 2.2 above is satisfied, then the schema corresponding to SII’ must include not only definitions or declarations corresponding to the appropriate members of its own [children], but also components identical to all the schema components of I.

3.2 If clause 2.3 above is satisfied, then the schema corresponding to the <include>d item's parent <schema> must include not only definitions or declarations corresponding to the appropriate members of its own [children], but also components identical to all the schema components of I, except that anywhere the absent target namespace name would have appeared, the actual value of the targetNamespace attribute of SII’ is used. In particular, it replaces absent in the following places:
3.2.1 The {target namespace} of named schema components, both at the top level and (in the case of nested type definitions and nested attribute and element declarations whose code was qualified) nested within definitions;
3.2.2 The {namespace constraint} of a wildcard, whether negated or not;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment