Hi All,
I would like to know how to replace the attribute with '\'(BackwardSlash) with '_'(Underscore). Since we have to assign the path for href purpose.
I am extracting the ref.id attribute with the following xslt:
Code:
<xsl:template match="index.level">
<a><xsl:attribute name="name"><xsl:apply-templates select="@ref.id"/></xsl:attribute></a>
<xsl:template match="xref.index"><a><xsl:attribute name="href"><xsl:text>#</xsl:text>
<xsl:apply-templates select="@ref"/></xsl:attribute><xsl:apply-templates/></a></xsl:template>
Input:
Code:
<index.level ref.id="Exemp_254\AFL-CIO"><name>AFL-CIO</name>
....
<xref.index ref="Exemp_254\AFL-CIO">See AFL-CIO</xref.index>
output required:
Code:
<a name="Exemp_254_AFL-CIO">AFL-CIO
<a href="Exemp_254_AFL-CIO">See AFL-CIO
Please provide me solution for replace.
Thanks