This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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?
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.
Thanks. Could you elaborate? Would you agree that this doesn't appear to be reflected in the Formal Semantics?
>Would you agree that this doesn't appear to be reflected in the Formal Semantics? I wouldn't dare to venture an opinion. I'm not one of the three people in the world who understands the formal semantics...
:) I'll raise this as an issue under FS.
Hopefully there will be some follow-up in Bug 4869.
Interestingly, the XQueryX version of this query represents the content of the two <a> tags identically. This suggests that the distinction between enclosed expressions and 'normal' element content has been missed there too.
From Bug 4869 Comment #3, it seems that the XQueryX version of K2-CopyNamespacesProlog-1 is wrong.
I'm closing this report since it has been concluded that the test case is aligned with the XQuery spec, while FS is not.