Re: [xsl] strip leading whitespace for sorting

Subject: Re: [xsl] strip leading whitespace for sorting
From: Joe Barwell <jbar@xxxxxxxx>
Date: Mon, 27 Oct 2008 21:26:25 +1300
Joe Barwell wrote:
I've got a problem with nodes that contain leading whitespace that I want to strip, because it's affecting my sorts.

Hi people,


To answer my own question: I misunderstood. The tool I needed was normalize-space(), i.e.:

...
<xsl:for-each select="NewDataSet/Table">
		<xsl:sort select="normalize-space(Currency)" order="ascending" />
		<xsl:sort select="normalize-space(Name)" order="ascending" />
...

Sorry for wasting people's bandwidth.

Cheers!

Joe

Current Thread