[thelist] Avoid the CDATA dance in XSL

.jeff jeff at members.evolt.org
Mon Jun 3 00:56:00 CDT 2002


shane,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: shane - iordy.com
>
> I'm new to XSL and I would like to know if I can avoid
> doing the CDATA dance (shown below) in my XSL template
> just to add a link like
>
> URL:
> <a href="?op=show&uid=1>alias</a>
>
> CDATA DANCE:
> <![CDATA[<a href="?op=info&id=]]>
> <xsl:value-of select="uid" />
> <![CDATA[">]]><xsl:value-of select="alias" />
> <![CDATA[</a>]]>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

use the shorthand for the xsl:value-of tag -- {foo} -- where foo is an
available node name.

<a href="?op=info&id={uid}">
<xsl:value-of select="alias" />
</a>

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list