[Bug 4864] 1.0.3dev: K2-CopyNamespacesProlog-1

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

           Summary: 1.0.3dev: K2-CopyNamespacesProlog-1
           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


In the query:

(:*******************************************************:)
(: Test: K2-CopyNamespacesProlog-1                       :)
(: Written by: Frans Englich                             :)
(: Date: 2007-07-17T17:04:39+01:00                       :)
(: Purpose: Use no-preserve, inherit with the default namespace. :)
(:*******************************************************:)
declare copy-namespaces no-preserve, inherit;
<doc>
    <a>{<b xmlns:p="q"/>}</a>
    <a><b xmlns:p="q"/></a>
</doc>

then expected result is:

<doc>
  <a><b></b></a>
  <a><b xmlns:p=\"q\"></b></a>
</doc>

which we don't quite understand.

On the one hand, reading:

http://www.w3.org/TR/xquery/#id-content

seems to suggest that copying (and therefore the influence of the copy
namespaces mode) only comes into play when dealing with enclosed expressions.

However, reading the Formal Semantics document

http://www.w3.org/TR/xquery-semantics/#id_element_constructor

I can't see anything which wuold result in the normalized forms of these two
expressions being different.  Specifically, there doesn't seem to be any
special rule for enclosed expressions.  Or have I missed something?

Is the expected result of this test correct?

Received on Wednesday, 18 July 2007 15:13:57 UTC