W3C home > Mailing lists > Public > www-svg@w3.org > June 2003

Re: Leading/trailing whitespace

From: Steve Schafer <steve@fenestra.com>
Date: Thu, 12 Jun 2003 00:43:17 -0400
To: www-svg@w3.org
Message-ID: <lbifev04ltst83jurtaicaunjcsjarvsks@4ax.com>

On Wed, 11 Jun 2003 21:21:16 +0200, you wrote:

>Note that unless xml:space="preserve" then leading and trailing
>whitespace is trimmed and contiguous whitespace is consolidated, in SVG.

The section of SVG 1.1 you reference above applies only to whitespace
within character data, not within attribute values. Indeed, the
xml:space attribute itself applies only to character data, not attribute
values (see http://www.w3.org/TR/REC-xml#sec-white-space).

XML's whitespace normalization rules for attribute values state that
leading/trailing whitespace within an attribute value is stripped
_unless_ the attribute is declared to be CDATA (see

All of the <length>-type attributes in SVG are CDATA (see
http://www.w3.org/TR/SVG11/svgdtd.html#DTD.1.2), so leading/trailing
whitespace will _not_ be stripped from those attributes, even by a
validating parser.

And so my question remains (restated): Many of the XML attribute
specifications in SVG 1.1 do not explicitly allow the presence of
leading/trailing whitespace in the attribute value. Should such
whitespace be implicitly allowed? That is, should an SVG processor
ignore leading/trailing whitespace in _all_ attribute values?

Steve Schafer
Fenestra Technologies Corp
Received on Thursday, 12 June 2003 00:43:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:56 UTC