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

[Bug 4869] [FS] Enclosed expressions and namespaces

From: <bugzilla@wiggum.w3.org>
Date: Thu, 19 Jul 2007 08:44:04 +0000
To: public-qt-comments@w3.org
Message-Id: <E1IBRcC-0002jl-Hw@wiggum.w3.org>


           Summary: [FS] Enclosed expressions and namespaces
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: jmdyck@ibiblio.org
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

In the XQTS 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;
    <a>{<b xmlns:p="q"/>}</a>
    <a><b xmlns:p="q"/></a>

then expected result is:

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

which we don't quite understand.

On the one hand, reading:


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


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?

We raised this in Bug 4864.

Mike Kay has kindly confirmed that he believes the result to be correct;

"It's fairly bizarre and probably unintended that these two expressions produce
different results, but I think the XQuery language book makes it clear that
they do."

but didn't dare venture an opinion on how this behaviour is reflected in the
Formal Semantics.
Received on Thursday, 19 July 2007 08:44:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:19 UTC