When you create an attribute, it must have a name. The <xsl:attribute> element
*must* have a name attribute. Thus
<xsl:template match="some-element">
<td>
<xsl:attribute name="color">red</xsl:attribute>
</td>
</xsl:template>
will output this when matched:
<td color="red"></td>
I don't understand why you would want the value of an attribute to be a
carriage return + linefeed, so I'm having a hard time figuring out what you
really want.
When you use <xsl:text> you are creating a text element. Sticking whitespace in
it (the carriage return, linefeed) is perfectly correct.
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email
-----Original Message-----
From: good all <good2all(_at_)gmail(_dot_)com>
Sent: Wed, 29 Sep 2004 15:19:30 -0400
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Output escaped characters that represent the CR as an
attribute
thanks for the reply.
A. "<xsl:attribute" can be followed by "disable-output-escaping="yes"
B. tried
<xsl:attribute>XXXX
YYYY</xsl:attribute>, it doesn't work.
Wondering what is the difference between putting <xsl:text> tag after
an element tag and after an attrbute tag.
Good2all
On Thu, 30 Sep 2004 03:03:06 +0800, Niclas Hedhman
<niclas(_at_)hedhman(_dot_)org> wrote:
On Thursday 30 September 2004 02:41, good all wrote:
<xsl:text
disable-output-escaping="yes">XXXX
YYYY</xsl:text>
I am very tired and can't reach the ref material; How about?
<xsl:attribute
disable-output-escaping="yes">XXXX
YYYY</xsl:attribute>
--
+------//-------------------+
/ http://www.bali.ac /
/ http://niclas.hedhman.org /
+------//-------------------+
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
--+------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--