[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSLT 2.0 replace()
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|