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

[Bug 4763] 1.0.3dev: K2-InScopePrefixesFunc-12

From: <bugzilla@wiggum.w3.org>
Date: Tue, 26 Jun 2007 13:12:41 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1I3AqX-0004Lo-Pe@wiggum.w3.org>

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

           Summary: 1.0.3dev: K2-InScopePrefixesFunc-12
           Product: XML Query Test Suite
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The expected result for:

        count(in-scope-prefixes(exactly-one($i/*[namespace-uri() eq ""]))),

in this query is 2.  I believe the answer should be one (corresponding to the
predefined xml namespace).  As I understand it

element {QName("", "a")} {}

will create an element whose local name is "a" and with an empty namespace,
effectively:

<a xmlns="" />

Since xmlns="" removes a namespace binding, this only leaves the prefix "xml"
in scope, therefore the count is one.  Or am I mistaken?

(:*******************************************************:)
(: Test: K2-InScopePrefixesFunc-12                       :)
(: Written by: Frans Englich                             :)
(: Date: 2007-06-14T10:15:27+01:00                       :)
(: Purpose: Check the in-scope namespaces of different elements, constructed
wit
h computed constructors. :)
(:*******************************************************:)
declare default element namespace "http://www.example.com/";
let $i := element e
{
    element {QName("", "a")}                                {},
    element {QName("http://www.example.com/", "b")}         {},
    element {QName("http://www.example.com/Second", "c")}   {}
}
return (count(in-scope-prefixes($i)),
        count(in-scope-prefixes(exactly-one($i/*[namespace-uri() eq ""]))),
        count(in-scope-prefixes(exactly-one($i/b))),
        count(in-scope-prefixes(exactly-one($i/*[namespace-uri() eq
"http://www.
example.com/Second"]))),
        $i)
Received on Tuesday, 26 June 2007 13:12:46 UTC

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