Re: [xsl] group-by an optional attribute

Subject: Re: [xsl] group-by an optional attribute
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 22 Nov 2011 18:22:51 +0100
Mark wrote:

I tried to formulate an alternative, thinking this would group-by the
true value of @line were it present, or by zero in its absence, but it
fails:
<xsl:for-each-group select="current-group()" group-by="if(Stamp/@line)
then Stamp/@line else 0">

Can you post details as to why exactly this fails? Do you get an error? Does group-by="if (Stamp/@line) then number(Stamp/@line) else 0" work better?

--

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Current Thread