|
Subject: [xsl] Search and replace acronyms From: "søren jepsen" <demon3d2@xxxxxxxxxxx> Date: Fri, 23 Jun 2006 11:58:50 +0000 |
</div> </xsl:template>
<xsl:template name="replace-acronyms">
<xsl:param name="acronyms" select="." />
<xsl:param name="text" />
<xsl:choose>
<xsl:when test="not($acronyms)">
<xsl:value-of select="$text" />
</xsl:when>
<xsl:when test="not(string($text))" />
<xsl:otherwise>
<xsl:variable name="acronym" select="$acronyms[1]" />
<xsl:choose><xsl:call-template name="replace-acronyms"> <xsl:with-param name="text" select="$before" /> <xsl:with-param name="acronyms" select="$acronyms[position() > 1]" /> </xsl:call-template>
<acronym title="{$acronyms[1]}">
<b><xsl:value-of select="$acronym" /></b>
</acronym><xsl:call-template name="replace-acronyms"> <xsl:with-param name="text" select="$after" /> <xsl:with-param name="acronyms" select="$acronyms" /> </xsl:call-template> </xsl:when>
<xsl:otherwise> <xsl:call-template name="replace-acronyms"> <xsl:with-param name="text" select="$text" /> <xsl:with-param name="acronyms" select="$acronyms[position() > 1]" /> </xsl:call-template>
</xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] RE : Re: [xsl] retrieving mod, Florent Georges | Thread | [xsl] Simple rule program difficult, Man on the moon |
| [xsl] RE : Re: [xsl] Merging attrib, Florent Georges | Date | [xsl] Simple rule program difficult, Man on the moon |
| Month |