W3C home > Mailing lists > Public > public-xmlsec@w3.org > April 2011

Re: Definition of whitespace for the TrimTextNodes parameter in C14N 2.0

From: <Frederick.Hirsch@nokia.com>
Date: Wed, 27 Apr 2011 18:51:23 +0000
To: <pratik.datta@oracle.com>
CC: <Frederick.Hirsch@nokia.com>, <public-xmlsec@w3.org>
Message-ID: <B4CD6537-8501-4FC8-97FA-AEF36D248B33@nokia.com>
I have entered this as a Last Call comment on C14N20, http://www.w3.org/2006/02/lc-comments-tracker/42458/WD-xml-c14n2-20110421/2484

regards, Frederick

Frederick Hirsch
Nokia



On Apr 26, 2011, at 5:45 PM, ext Pratik Datta wrote:

In C14N 2.0, the TrimTextNodes parameter removes leading and trailing whitespace, but we haven't precisely defined what whitespace is.

I propose that we define it the same that the XML spec defines it, which is  space character, carriage return, line feed or tab.

Here is the excerpt from XML  specification  http://www.w3.org/TR/xml/#NT-S

----------------------------------------------------------------
S (white space) consists of one or more space (#x20) characters, carriage returns, line feeds, or tabs.

White Space
[3]    S    ::=    (#x20 | #x9 | #xD | #xA)+

Note:

The presence of #xD in the above production is maintained purely for backward compatibility with the First Edition. As explained in 2.11 End-of-Line Handling, all #xD characters literally present in an XML document are either removed or replaced by #xA characters before any other processing is done. The only way to get a #xD character to match this production is to use a character reference in an entity value literal.
-----------------------------------------------------------

Pratik
Received on Wednesday, 27 April 2011 18:52:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 April 2011 18:52:11 GMT