W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2005

replacing a tag element and copying the contents into it in

From: T Kiernan <tkiernan@gmail.com>
Date: Fri, 30 Sep 2005 13:20:35 +0100
Message-ID: <705ae6ad0509300520n1aa5a7fbmc9cebc775762577f@mail.gmail.com>
To: www-xsl-fo@w3.org

Hi ,

I am trying to do the following manipulation in XSL2.0  copying the
contents of element tag into the new  replaced tag element    so with
"cat" i want it  replaced  with following tag



BEFORE  --- <cat> blah blah </cat>

AFTER ---<div class=cat blah blah ></div>

using the following xsl to do the above  - doesn't appear to do the substitude

Any ideas why it's not ... ???


<xsl:template match="cat">
<xsl:text><![CDATA["<DIV class="]]>
 <xsl:copy-of select="@*"/>
<xsl:copy-of select="node()"/>
</xsl:text>
<xsl:text><![CDATA[">"]]></xsl:text>
     <xsl:copy><![CDATA["."/>]]></xsl:copy>
     <xsl:text><![CDATA["</DIV"]]></xsl:text>
</xsl:template>
Received on Saturday, 1 October 2005 02:28:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:13 GMT