W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > July to September 2000

Re: Insignificant whitespace

From: Martin J. Duerst <duerst@w3.org>
Date: Wed, 30 Aug 2000 02:54:14 +0900
Message-Id: <4.2.0.58.J.20000830022934.03744ca0@sh.w3.mag.keio.ac.jp>
To: Petteri Stenius <Petteri.Stenius@done360.com>, "IETF/W3C XML-DSig WG (E-mail)" <w3c-ietf-xmldsig@w3.org>
Hello Petteri,

The only insignificant whitespace is the whitespace between
elements in element content. With an XPath/nodes-based
approach, and assuming it is a validating processor and
you have the DTD (not sure that's how it's defined at
the moment), you can get rid of that.

However, you cannot get rid of whitespace in element content.
The XML spec only says (http://www.w3.org/TR/REC-xml#sec-white-space):

The value "default" signals that applications' default white-space
processing modes are acceptable for this element; the value "preserve"
indicates the intent that applications preserve all the white space.

Because you don't know what the default processing of the application
is, you can't get rid of the (maybe insignificant) whitespace.

Regards,   Martin.

At 00/08/29 08:49 +0300, Petteri Stenius wrote:

>Hello,
>
>The issue with whitespace in XML element content has been very briefly
>discussed during interop testing. I would like raise this issue on the list,
>as I believe many people expect insignificant whitespace to be cleaned up by
>the C14N algorithms.
>
>The current specification provides no way for an application to skip or
>cleanup insignificant whitespace from a signed XML document before
>digesting. However, 'insignificant' comment elements are skipped by the
>default C14N algorithm!
>
>I think we could make use of a transformation algorithm that cleans up
>insignificant whitespace, the algorithm should obviously detect xml:space
>attributes.
>
>Petteri
>
>--
>Petteri Stenius                          Petteri.Stenius@done360.com
>Done Information, Ltd.                         Office +358-9-5259240
>                                                  Fax +358-9-52592411
>http://www.doneinformation.com/               Mobile +358-50-5506161
Received on Wednesday, 30 August 2000 01:48:54 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.29 : Thursday, 13 January 2005 12:10:11 GMT