I want to replace a single /
with the word, and
.
This is what I have now:
Code:
<xsl:output omit-xml-declaration="yes" indent="yes"/>
!-- identity transform -->
<xsl:template match="node()|@*">
<xsl:copy>
xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
!-- exception -->
<xsl:template match="*[local-name()='Category']/@CleanName">
<xsl:attribute name="CleanName">
<xsl:value-of select="translate('Cd /dvd inlays', '/ ', 'and')" />
</xsl:attribute>
</xsl:template>
Input:
<Category ID="129" CleanName="Cd /dvd inlays"></Category>
Output:
"Cdnadvdninlays"
Giving:
"Cd /dvd inlays"
Needed:
"cd and dvd inlays"