[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] recursive xsl replace
I've been struggling with this for hours and I'm not getting anywhere and I'm behind on an already delayed deadline. Any help would be most appreciated. I've got a text string like this: <p>In Iowa, effective transition is monitored in the following ways:</p> <ul> <li>File Review Process for Part C and Part B, including specific transition items;</li> <li>Regional Data Profiles using transition file review data;</li> <li>Regional Corrective Action Plans (CAPs); and/or</li> <li>Quality Services Reviews</li> </ul> <p>More information on Iowas monitoring system can be found at <a href="http://www.iowaccess.org/educate/">www.iowaccess.org/educate/</a></p><ul class="pagetopage_nav ptop_botm"> And I want it to look like this: <p>In Iowa, effective transition is monitored in the following ways:</p> <ul> <li><em class="contentterm">File Review Process</em> for Part C and Part B, including specific transition items;</li> <li><em class="contentterm"> Regional Data Profiles/em> using transition file review data;</li> <li><em class="contentterm"> Regional Corrective Action Plans/em> (CAPs); and/or</li> <li>Quality Services Reviews</li> </ul> <p>More information on Iowas monitoring system can be found at <a href="http://www.iowaccess.org/educate/">www.iowaccess.org/educate/</a></p><ul class="pagetopage_nav ptop_botm">
My XSL looks like this: <xsl:template name="replaceglossary"> <xsl:param name="text"/> <xsl:param name="glossary"/> <xsl:param name="ordinal" select="1"/>
<xsl:variable name="word" select="$glossary[$ordinal]/word"/> <xsl:value-of disable-output-escaping="yes" select="substring-before($temp, $word)"/> <xsl:element name="em"> <xsl:attribute name="class"> <xsl:text>contentterm</xsl:text> </xsl:attribute> <xsl:value-of disable-output-escaping="yes" select="$word"/> </xsl:element> <xsl:value-of disable-output-escaping="yes" select="substring-after($temp, $word)"/> </xsl:template> But it doesn't work. It only replaces the first term. What am I doing wrong? PS I'm using the PHP xsl transformer which apparently does not support fn:replace() :P Thanks in advance for any hints that could point me in the right direction. Joelle
|
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
|