[Home] [By Thread] [By Date] [Recent Entries]
<xsl:value-of select="translate(normalize-space(translate($text,' ','~')),'~',' ')" /> The above code does not implement trim() ! For example, when this transformation: <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:variable name="vText" select="string(/)"/>
<xsl:template match="/">
"<xsl:value-of
select="translate(normalize-space(translate($vText,'
','~')),'~',' ')" />"
</xsl:template>
</xsl:stylesheet>is applied against this xml document: <someText> This is some text </someText> the result is: " This is some text "
returns: 'This is some text'
|

Cart



