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 3704 - [XQuery] xml:space attributes
Summary: [XQuery] xml:space attributes
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Don Chamberlin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 16:53 UTC by Andrew Eisenberg
Modified: 2007-02-25 23:51 UTC (History)
1 user (show)

See Also:


Attachments

Description Andrew Eisenberg 2006-09-12 16:53:37 UTC
In http://www.w3.org/Bugs/Public/show_bug.cgi?id=3636, Michael Kay raises the following issue: 

"However, I think that there's a wider question about whether XQuery and XSLT
ought to allow the construction of a result tree containing the attribute
xml:space="strip", given that it is "erroneous" XML."
Comment 1 Frans Englich 2006-09-13 10:50:35 UTC
This was discussed on w3c-xsl-query@w3.org:
http://lists.w3.org/Archives/Member/w3c-xsl-query/2006Aug/0024.html

(A general positiveness towards making it an error to specify an invalid value.)
Comment 2 Don Chamberlin 2006-09-14 00:51:53 UTC
On June 13, 2006, the Query Working Group decided that an implementation MAY raise a dynamic error [XPDY0092] if a constructed attribute named xml:space has a value other than "preserve" or "default". This change will be reflected in the next version of the XQuery specification.
Don Chamberlin (for the Query Working Group)
Comment 3 Michael Kay 2006-09-14 07:59:26 UTC
I'm not sure why you put the error in the XPath space rather than the XQuery space?
Comment 4 Frans Englich 2006-09-14 11:59:06 UTC
Why is it "MAY"?

This breaks interoperability since a query that runs fine on one implementation can break on another. It neither gives reliability to the user -- she can't trust that her xml:space attributes are verified.
Comment 5 Don Chamberlin 2006-09-14 16:28:50 UTC
Replying to Michael Kay: Sorry, the correct error code is XQDY0092. It's correct in the XQuery document.
Regards, 
Don Chamberlin
Comment 6 Andrew Eisenberg 2006-09-15 19:17:37 UTC
(In reply to comment #4)
> Why is it "MAY"?

We cosidered both the XML Recommendation and the practice of current implementations.

The XML Recommendation, in section 2.10, White Space Handling, says in part:

"This specification does not give meaning to any value of xml:space other than "default" and "preserve". It is an error for other values to be specified; the XML processor MAY report the error or MAY recover by ignoring the attribute specification or by reporting the (erroneous) value to the application. Applications may ignore or reject erroneous values."

Also, when we discussed this, some members said that their products raise an error, and others said that they process it without difficulty.

Finally, we noted that our Data Model does not prohibit values other than "default" and "preserve" for xml:space attributes.
Comment 7 Frans Englich 2006-09-18 11:10:36 UTC
Andrew, thanks for the summary. However, I'm not sure I would agree with the reasonings; for example, that invalid xml:space attributes works in some circumstances, doesn't necessarily mean it is a good idea to sometimes allow it. Nevertheless, I accept the resolution.
Comment 8 Jim Melton 2007-02-25 23:51:10 UTC
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.