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 1859 - [Ser] Replacing existing whitespace
Summary: [Ser] Replacing existing whitespace
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Scott Boag
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-18 18:45 UTC by Michael Kay
Modified: 2005-09-28 09:35 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-08-18 18:45:26 UTC
We say in 5.1.3 (XML output method, indent parameter):

"The new whitespace characters MAY replace existing whitespace characters in the
same position, for example a tab MAY be inserted as a replacement for existing
spaces. However, existing whitespace MUST NOT be removed without such a
replacement."

It's not at all clear what the last sentence is designed to achieve, or in fact
whether it says anything meaningful at all. It would seem to allow me to replace
five spaces with three spaces, but not to replace two spaces with nothing. I
can't see any reason why I would want to replace two spaces with nothing, but I
also can't see any reason why I shouldn't be allowed to do so, given that I'm in
a context where we have already deemed whitespace to be insignificant.
Comment 1 Scott Boag 2005-08-30 16:04:38 UTC
The sentence in question is current in the original serialization draft, and we
can't really trace it earlier than that.

I don't think it's clear that the text in question talking about insignificant
whitespace, given that this is just one step in a algorithm, and only the last
step deals with siginificant vs. insignificant whitespace.  My proposal is that
the bullet read:

"* The new whitespace characters MAY replace existing insignificant whitespace
characters in the same position, for example a tab MAY be inserted as a
replacement for existing spaces."  (And, yes, the last sentence deleted.)
Comment 2 Joanne Tong 2005-09-28 09:29:28 UTC
The XSL and XQuery working groups discussed this comment and decided to resolve 
this issue by removing bullet 3 in section 5.1.3 and add the following 
paragraph below the bulleted list:

"In any location where the above rules allow the addition of whitespace 
characters, existing whitespace characters MAY also be removed or replaced.  
For example, a tab MAY be inserted as a replacement for existing spaces."