|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xslt 1.1 - one liner
<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'
|
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
|






