This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9509 - [XQ31ReqUC] Default element namespace applies to both input and output.
Summary: [XQ31ReqUC] Default element namespace applies to both input and output.
Status: NEW
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Requirements for Future Versions (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 20:23 UTC by David Lee
Modified: 2014-05-20 16:56 UTC (History)
3 users (show)

See Also:


Attachments

Description David Lee 2010-04-13 20:23:51 UTC
Default element namespaces (4.14 "Default Namespace Declaration") apply to both input (XPath) namespaces and output (generated elements).

A very common use case for XQuery is to generate XML documents to a different namespace then the input.  For example, converting an XML document to an XHTML document.  

The use of namespace prefixes in XPath expressions and element generation is a very difficult task for beginning and often even experienced users to correctly use. To aid in the common case of reading from one namespace and outputting to another, this difficulty should be addressed in order to encourage wider use of XQuery.

It is unnecessarily tedious to require namespace prefixes to perform this common operation.  Namespaces are difficult enough that XQuery 1.1 should assist in this common case.   XSLT 2.0 solves this problem with the introduction of the "xsl:xpath-default-namespace".


XQuery 1.1 should provide a similar feature where the input (xpath) default namespace can differ from the output (generated element) namespaces.
Comment 1 Jim Melton 2011-04-04 01:12:31 UTC
David, although there is interest in the XML Query WG to address this opportunity, we have concluded that we do not have the resources to add this feature in the XQuery 3.0 timeframe.  We will reconsider this opportunity during development of the mythical next generation of XQuery following 3.0.  Consequently, I am marking this bug as a possible requirement for a possible future version of the language.  Thanks for making the suggestion!
Comment 2 Michael Kay 2011-04-04 08:18:38 UTC
While I'm disappointed that the WG decided not to fix this well known usability problem, it might help to point out that there's a bit of a workaround available in XQuery 3.0 - you can use the expression "":local to refer to elements in no namespace, regardless of the namespace context.
Comment 3 Jonathan Robie 2014-05-20 16:47:56 UTC
Assigning to future requirements per Working Group decision (https://lists.w3.org/Archives/Member/w3c-xsl-query/2012Oct/0087.html).
Comment 4 Jonathan Robie 2014-05-20 16:50:26 UTC
Assigning to future requirements per Working Group decision (https://lists.w3.org/Archives/Member/w3c-xsl-query/2012Oct/0087.html).
Comment 5 Jonathan Robie 2014-05-20 16:56:18 UTC
Assigning to future requirements per Working Group decision (https://lists.w3.org/Archives/Member/w3c-xsl-query/2012Oct/0087.html).