Subject: Re: [xsl] group-by an optional attribute|
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Nov 2011 13:03:03 -0500
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?
-- Contact us for world-wide XML consulting and instructor-led training Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal