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 4581 - [FS] Quantifiers in static type of name tests
Summary: [FS] Quantifiers in static type of name tests
Status: CLOSED DUPLICATE of bug 4242
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Recommendation
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-24 14:17 UTC by Nick Jones
Modified: 2007-10-03 23:07 UTC (History)
0 users

See Also:


Attachments

Description Nick Jones 2007-05-24 14:17:12 UTC
In section 8.2.3.1.1 it states "For example, if $v is bound to an element with a computed name, the type of $v is element. The static type computed for the expression $v/self::foo is element foo of type xs:anyType, which makes use of foo in the name test to compute a more specific type."

The static typing rules in this section reflect this behaviour. But I do not think the quantifier is correct.

If $v is an element (so has static type element * of type xs:anyType) then it may or may not satisfy self::foo, as when evaluated the name might not be "foo", in which case an empty sequence is returned.

Therefore I think the static type should be "(element foo of type xs:anyType)?". So therefore the type inferences for "element of element *" and "attribute of attribute *" should be:

statEnv |-  test QName2 with element of element * OptTypeSpecifier : element QName2 OptTypeSpecifier ?
Comment 1 Michael Dyck 2007-05-30 06:52:21 UTC
I agree, but this is a duplicate of Bug 4242 and Bug 4261 (a).
Comment 2 Nick Jones 2007-05-30 09:06:10 UTC
Sorry. My fault for not searching closed bugs.

*** This bug has been marked as a duplicate of bug 4242 ***
Comment 3 Michael Dyck 2007-10-03 23:07:19 UTC
This issue has been incorporated into FS erratum E018, whose fix has been committed to the source files for the next edition of the FS document.