[XQuery] IBM-XQ-009: "xs" namespace should be in-scope

(IBM-XQ-009) Section 3.7.1.5 (Type of a Constructed Element) uses the 
following example:
<a xsi:type="xs:integer">47</a>
But Section 3.7.4 (Namespace Nodes on Constructed Elements) says that a 
similar example is not valid:
<p xsi:type="xs:integer">3</p>

This illustrates an error that many users will make. The namespace "xs" 
that contains all the built-in schema types is not in scope for a 
constructed element unless it is explicitly declared.

We need to correct the inconsistency between the two sections noted above. 
This can be done in either of the following ways:

(a) We can make a rule that the "xs" namespace, like the "xml" namespace, 
is automatically in scope for all constructed elements. I recommend this 
approach, because I believe that the justification for "xs" is at least as 
good as for "xml". This will remove a common source of errors and 
frustration.

(b) We can replace the example in Section 3.7.1.5 with the following ugly 
but correct example:
<a xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:integer>47</a>
(along with an embarrassing explanation about why it this is necessary and 
an apology to users).

--Don Chamberlin

Received on Wednesday, 11 February 2004 18:51:27 UTC