[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Removing space from attribute before comparing


Subject: Re: [xsl] Removing space from attribute before comparing
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Thu, 29 May 2003 09:48:50 +0200

rajith r wrote:

I am currently doing some thing like this.

<xsl:for-each select="row[count(.|key('GId', @vcId)[1])=1]">

But i would like to remove space from the attirbute before comparing

Can i do something like this

<xsl:for-each select="row[count(normalize-space(.)|key('GId', normalize-space(@vcId))[1])=1]">

<xsl:for-each select="row[count(.|key('GId', normalize-space(@vcId))[1])=1]">
should be enough.
Beware normalize-space() doesn't remove whitespace actually, it normalizes it instead (removes leading/trailing whitespace and collapses any adjacent whitespace to single one).


--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel


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




Current Thread