[Bug 27175] subtype-itemtype

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27175

--- Comment #1 from Jonathan Robie <jonathan.robie@gmail.com> ---
I suspect you are right, but we want to look at this carefully. 

You claim this: 

element(An, T) would not be a subtype of element(An)

That would be a bug. This is equivalent to saying that the following judgement
returns false in
http://www.w3.org/TR/2014/WD-xquery-31-20140424/#id-itemtype-subtype:

subtype-itemtype( element(An,T), element(An))

Ai = element(An,T)
Bi = element(An)

Rule 14 is the only one that can match this case:

<quote>
14. Bi is either element(Bn) or element(Bn, xs:anyType?), the expanded QName of
An equals the expanded QName of Bn, and Ai is either element(An), or
element(An, T?) for any type T.
</quote>

Let's review the meaning of the syntax for the two element tests according to
http://www.w3.org/TR/2014/WD-xquery-31-20140424/#id-element-test :

<quote>
3. element( ElementName , TypeName ) matches an element node whose name is
ElementName if derives-from( AT, TypeName ) is true, where AT is the type
annotation of the element node, and the nilled property of the node is false.

Example: element(person, surgeon) matches a non-nilled element node whose name
is person and whose type annotation is surgeon (or is derived from surgeon).

4.  element( ElementName, TypeName ?) matches an element node whose name is
ElementName if derives-from( AT, TypeName ) is true, where AT is the type
annotation of the element node. The nilled property of the node may be either
true or false.

Example: element(person, surgeon?) matches a nilled or non-nilled element node
whose name is person and whose type annotation is surgeon (or is derived from
surgeon).
</quote>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 28 October 2014 18:49:42 UTC