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

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

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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4261

           Summary: [FS] technical: 8.2.3.1.1 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 8.2.3.1.1 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
statEnv.namespace(Prefix1)=(NamespaceKind,AnyURI)
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
appropriate.

(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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:46 GMT