Re: Leading/trailing whitespace

On Thursday, June 12, 2003, 6:43:17 AM, Steve wrote:


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

>>http://www.w3.org/TR/SVG11/text.html#WhiteSpace
>>
>>Note that unless xml:space="preserve" then leading and trailing
>>whitespace is trimmed and contiguous whitespace is consolidated, in SVG.

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

SS> XML's whitespace normalization rules for attribute values state that
SS> leading/trailing whitespace within an attribute value is stripped
SS> _unless_ the attribute is declared to be CDATA (see
SS> http://www.w3.org/TR/REC-xml#AVNormalize).

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

But you just said that the xml:space applies to character data....
thats what CDATA stands for.

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

SS> Steve Schafer
SS> Fenestra Technologies Corp
SS> http://www.fenestra.com/



-- 
 Chris                            mailto:chris@w3.org

Received on Thursday, 12 June 2003 02:48:43 UTC