brothercake
12-31-2002, 04:02 AM
So I'm using XSLT to generate javascript array-building functions. here's a snippet
<xsl:for-each select="menu_item">
addSubmenuItem("<xsl:value-of select="url"/>","<xsl:value-of select="link"/>","<xsl:value-of select="target"/>","<xsl:value-of select="alt"/>");
</xsl:for-each>
.. fine. But some of the <link/> tags have <br/> tags in them:
<link>Variables from the<br/>sniffer script</link>
I guess what I need to do is like "dump" the contents of link, rather than value-of, which is only returning the character data.
Any ideas what I need here?
<edit>I'll also say that i'm using "text" as the output method - which might mean I have to bascially string-replace the <> with entitities - but how do I do that?</edit>
<xsl:for-each select="menu_item">
addSubmenuItem("<xsl:value-of select="url"/>","<xsl:value-of select="link"/>","<xsl:value-of select="target"/>","<xsl:value-of select="alt"/>");
</xsl:for-each>
.. fine. But some of the <link/> tags have <br/> tags in them:
<link>Variables from the<br/>sniffer script</link>
I guess what I need to do is like "dump" the contents of link, rather than value-of, which is only returning the character data.
Any ideas what I need here?
<edit>I'll also say that i'm using "text" as the output method - which might mean I have to bascially string-replace the <> with entitities - but how do I do that?</edit>