- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 24 May 2007 14:17:13 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4581 Summary: [FS] Quantifiers in static type of name tests Product: XPath / XQuery / XSLT Version: Recommendation Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Formal Semantics AssignedTo: jmdyck@ibiblio.org ReportedBy: nick@cbcl.co.uk QAContact: public-qt-comments@w3.org 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 ?
Received on Thursday, 24 May 2007 14:17:22 UTC