[Home] [By Thread] [By Date] [Recent Entries]
Just learning XSLT 2.0 (and regex), and I'm stumped on the replace()
function.
I have XML that looks like this: <toc> <category title="Structure"> <item title="&lt;attribute&gt;" href="tag.attribute.html" /> <item title="&lt;handler&gt;" href="LzDelegate.html" /> <item title="&lt;event&gt;" href="LzEvent.html" /> . . . And I want to replace the & with just &, so the HTML that looks like this: <body>
<h1>nav toc</h1>
<ol>
<li>Structure</li>
<ol>
<li><lattribute></li>
<li><handler></li>
<li><event></li>The closed I've been able to get is this: <body>
<h1>nav toc</h1>
<ol>
<li>Structure</li>
<ol>
<li><attribute&gt;</li>
<li><handler&gt;</li>
<li><event&gt;</li>So I can change the first &, but not the second. Any ideas? I feel like I must be missing a fundamental concept here. Here's a fragment of my XSLT: <ol> <xsl:for-each select="category"> <li> <xsl:value-of select="@title"/> </li> <ol> <xsl:for-each select="item"> <li> <xsl:value-of select="replace(@title, '&lt;', '<')"/> </li> </xsl:for-each> </ol> </xsl:for-each> </ol> thanks, Lou
|

Cart



