[Bug 27175] New: subtype-itemtype

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27175] New: subtype-itemtype

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27175

            Bug ID: 27175
           Summary: subtype-itemtype
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.1
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

>2.5.6.2 The judgement subtype-itemtype(Ai, Bi)
>Point 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.

That does not mention the case element(An, T) like some other points (e.g. 16),
so element(An, T) would not be a subtype of element(An).

But it seems, it should

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

Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 27175] subtype-itemtype

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27175

--- Comment #1 from Jonathan Robie <[hidden email]> ---
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.

Loading...