|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] translating character references
Dear All, My XML is like below: <m:math> <m:mi>ϕ</m:mi> <m:mi>φ</m:mi> </m:math> I want to interchange 3d5 with 3c6 and vice versa and below is my code. it is not doing the replacement. Please help me how to achieve this. the solution should be in XSLT 1.0 My xsl is like below: <xsl:template match="m:mi"> <xsl:element name="m:mi"> <xsl:choose> <xsl:when test="contains(.,'x03d5')"> <xsl:value-of select="translate(.,'x03d5','x03c6')"/> </xsl:when> <xsl:when test="contains(.,'x03c6')"> <xsl:value-of select="translate(.,'x03c6','x03d5')"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates/> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template>
|
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
|






