W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 2000

White space character refs in attribute values

From: Mike Brown <mike@skew.org>
Date: Mon, 23 Oct 2000 12:49:07 -0600 (MDT)
Message-Id: <200010231849.MAA44580@skew.org>
To: xsl-editors@w3.org
The NOTE at the end of http://www.w3.org/TR/xslt#creating-attributes
should mention not just newlines but also tabs and carriage returns, which
can similarly exist in attribute values via character reference.

A similar provision should be added to the section on literal result
elements. 

It might be prudent to also mention these expectations in the sections
describing the XML and HTML output methods.

Example:

<xsl:template match="/">
  <literalElement att1="hello&#xD;world"/>
  <xsl:element name="createdElement">
    <xsl:attribute name="att1">
      <xsl:text>hello&#xD;world</xsl:text>
    </xsl:attribute>
  </xsl:element>
</xsl:template>

  should be emitted as

<literalElement att1="hello&#xD;world"/><createdElement att1="hello&#xD;world"/>


   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/
Received on Monday, 23 October 2000 14:49:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:51 GMT