Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Cross-references among included schema documents

From: "Michael Kay" <mhk@---.--.-->
To: <xmlschema-dev@--.--->
Date: 9/26/2004 7:08:00 PM
If schema document A includes schema documents B and C, can a QName
appearing in B resolve to a component defined in C?

Xerces and XSV appear to allow it.

The definition of QName resolution in 3.15.3 appears to disallow it. Rule 1
says that the QName can only resolve to a component that "is a member of the
value of the appropriate property of the schema which corresponds to the
schema document within which the .QName. appears".

The schema document in which the QName appears is B. What is "the schema
which corresponds to the schema document" B? If this is the same as the
schema corresponding to the schema document A, then I can see how Xerces and
XSV are correct. 

But section 4.2.1, describing xs:include, says that the "XML Schema"
corresponding to A includes all the components of all the XML Schemas
corresponding to any <include>d schema documents. By implication, there is
an "XML Schema" correponding specifically to B. Assuming "XML Schema" as
used in section 4.2.1 means the same thing as "schema" used in 3.15.3, this
implies that there is a schema corresponding specifically to the schema
document B, which contains only those components defined in B, and therefore
that the component we are looking for (which is defined in C) is not "a
member of the appropriate property of the schema corresponding to" B.
Therefore, the QName appearing in B cannot resolve to the component defined
in C.

Once again, I'm sure Henry will point me to the magic bit of text that I
have missed. I'm looking for evidence that "XML Schema" and "schema" mean
different things, but I can't find it.

Alternatively, I'm looking for clues in the sentence (in 4.2.1) "During
schema construction, implementations must retain .QName. values for such
references [references that fail to resolve], in case an appropriately-named
component becomes available to discharge the reference by the time it is
actually needed." But generally throughout the spec, the requirement is that
a reference is "resolved", not that it is "discharged"; in fact, this is the
only use of the word "discharge" in the whole specification, so it's very
hard to tell what it means. For example, the XML Representation Summary for
attributeGroup says that it incorporates the attribute uses "resolved to" by
the actual value of the ref attribute - this appears to explicitly require
that the name is "resolved" as defined in 3.15.3, "discharging" it as
described in 4.2.1 is not enough.

All references are to the PER of 18 March.

Michael Kay
http://www.saxonica.com/


From ht@i... Mon Sep 27 07:55:34 2004
Received: from bart.w3.org ([128


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent