This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5487 - Special status of namespaces xs, xsi, xml etc
Summary: Special status of namespaces xs, xsi, xml etc
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2008-02-18 00:53 UTC by Michael Kay
Modified: 2008-06-07 07:50 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2008-02-18 00:53:13 UTC
There is currently a clause making it illegal to declare an attribute in the xsi namespace. However, it doesn't appear to be illegal to declare elements or other components in this namespace. Is there any good reason why not?

This raises questions about other namespaces with a special status.

Presumably schema processors are expected to be able to process the S4SD (though one might imagine circumstances in which they cannot process it, for example if they cannot handle 20-digit integers). But what are they expected to do if presented with a schema document similar to the S4SD but slightly different, for example one that defines xs:long with a different range of values? I think that the right answer here is "all bets are off" - the effect is undefined.

What about schemas for the xml and xmlns namespaces? The right answer for "xml" seems to be the same as for "xs" - if a schema document is presented for this namespace then it should match the W3C specifications for names in that namespace, and if it doesn't, the effect is undefined. For "xmlns" I think the rule is different - this namespace has such fundamental significance that any attempt to declare components in this namespace should be an error.
Comment 1 Michael Kay 2008-02-18 09:54:20 UTC
With regards to the "xmlns" namespace (that is, http://www.w3.org/2000/xmlns/), we ought also to consider whether the value space of QName includes (URI,local) pairs in which the URI part is equal to this string. If it does, then such values are ineffable - they can never be created as a result of a validation episode, and they can never be expressed for example in an enumeration facet. This is because the infoset clearly states in 2.2 "[in-scope namespaces] does not contain an item with the prefix xmlns (used for declaring namespaces)...". 

The question has recently arisen in QT of whether it is legal in XPath to attempt to create such a QName using the constructor xs:QName("http://www.w3.org/2000/xmlns/", "p")
Comment 2 C. M. Sperberg-McQueen 2008-06-05 23:52:15 UTC
A wording proposal intended to address at least the first part of
this issue (components in the special namespaces) is at 

  http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b5487.html
  (member-only link)

Essentially, the proposal specifies, as suggested that if components
are presented in a schema or declared in an XSD schema document
for any of the namespaces xml, xs, xsi, and vc, then either they agree
with the normative definitions in specs or schema documents, or the
effect is implementation-dependent.  For xmlns, it specifies that if
any such components are presented or declared, there is an error.

It does not address the QNames-in-xmlns namespace question, but could
be amended to do so if the WG wishes.
Comment 3 C. M. Sperberg-McQueen 2008-06-07 01:31:49 UTC
The proposal mentioned in ocmment #2 was adopted by the WG at today's call.

Michael, please indicate by closing or reopening the issue whether you
are satisfied or not with the resolution, in the usual way.  

(I realize, as I'm updating this record, that the WG did not address
the question raised in comment #1.  Perhaps a new issue is needed?
I'll leave that to your judgment.)