W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2007

[Bug 4261] [FS] technical: Name Tests correct?

From: <bugzilla@wiggum.w3.org>
Date: Thu, 18 Jan 2007 20:53:41 +0000
To: public-qt-comments@w3.org
Message-Id: <E1H7eGT-0003lQ-LT@wiggum.w3.org>


           Summary: [FS] technical: Name Tests correct?
           Product: XPath / XQuery / XSLT
           Version: Proposed Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: hrennau@yahoo.de
         QAContact: public-qt-comments@w3.org

It seems to me the [FS] section Name Tests is buggy.

a) When the name test contains a non-wildcard prefix or local name, while the
element name of the element type is a wildcard, the resulting type should be
optional because during evaluation the expression’s value may or may not match.
Therefore, in the following three judgments

statEnv |- test QName2 with element of element * …
statEnv |- test *:LocalPart2 with element of element * …
statEnv |- test Prefix2:* with element of element * …

the result type should receive a ?. Shouldn't it?

b) In the judgment
statEnv |- test *:LocalPart2 with element of element QName1 …

the conditions
fn:namespace-uri-from-QName(expandedQName1) = AnyURI

should be removed. (In fact they ascertain that the prefix of the element type
is mapped onto a namespace URI, rather than onto the null namespace – why? Also
compare the corresponding attribute rule – why should they differ?)

c) In the judgment
statEnv |- test *:Prefix2:* with element of element QName1 …
condition #2 should reference Prefix2, not Prefix1.

d) In my optionion, the judgment producing the empty type result is not

(1) As the name test is indeed a pure name test, ignoring any type annotations
as far as checking is concerned, it is unclear how one can base the judgment on
any conditions posed on the element type’s type annotation.

(2) As TypeSpecifier1 is of type xs:anyType, the judgment
statEnv |- not (Type2 <: Type1)
simply never holds.

(3) The current version of the judgment amounts to equating a name test to a
kind test (ElementTest) containing a type annotation of xs:anyType. But a kind
test is based on matching types, a name test solely on matching names. If the
element name of the element type is member of a substitution group, a kind test
can match while the corresponding name test cannot.

(4) I propose to replace the current judgment for empty result by two
judgments, one based on mismatching namespace URIs, the other on mismatching
local names.
Received on Thursday, 18 January 2007 20:53:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:32 UTC