- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 19 Jul 2007 08:44:04 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4869 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; <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? 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