[Bug 6131] [XPath 2.1] Requirement: context-free paths

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





--- Comment #2 from Michael Kay <mike@saxonica.com>  2008-12-17 13:53:17 ---
Another use case for this feature: it's difficult in XQuery to generate XHTML
(where output elements have a namespace and no prefix) if the input is in no
namespace. See http://www.xmlplease.com/xquery-xhtml, which recommends using
wildcards in paths as a workaround for this problem:

<p xmlns="http://www.w3.org/1999/xhtml">
  {data(*:para)}
</p>

This is pretty nasty, because it creates the possibility that you will select
elements in the wrong namespace, and it means much less static analysis is
possible; it will also make it harder to take advantage of indexes and other
optimization techniques.

Without introducing the complexity of separate default namespaces for input and
output (which is the XSLT solution), the proposal in this bugzilla would enable
users to refer to names in no namespace as

<p xmlns="http://www.w3.org/1999/xhtml">
  {data(``:para)}
</p>


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 17 December 2008 13:53:26 UTC