This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: strange problem with string-replace



> But when I wand to remove
> all 
 (line feed) or   (space)

line endings are normalised to 10 not 13, and since this is working
at the level of single characters you can use translate() rather than
string-replace.


<xsl:template match="a">
  <xsl:value-of select="translate(.,'&#10; ','')"/>
</xsl:template>
</xsl:stylesheet>

converts


<a>
1 2
3 4
5 6
</a>

to

123456


David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]