|
Subject: Re: [xsl] sorting the result of a calculation on xml that can have missing/blank tags From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx> Date: Wed, 14 Dec 2005 12:25:52 +0100 |
Hi Sean,
Wellcome to the list.
> CALC div: <xsl:value-of select="(HomePupils + GuestPupils div Teachers) "/>
I would guess that this gives a NaN when HomePupils is empty.
That goes for your sorting algorithm as well.
<xsl:value-of select="(concat(HomePupils, substring('0', 1,
number(normalize-space(HomePupils)=''))) + GuestPupils div
Teachers)"/>
It would be better if you could change the input document to provide 0
instead of an empty string.
Hope this helps.
Ragulf Pickaxe :-)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] sorting the result of a calcu, srguard2000-triallic | Thread | RE: [xsl] sorting the result of a c, Michael Kay |
| Re: [xsl] nesting flat XML based on, David Holden | Date | Re: [xsl] nesting flat XML based on, Ragulf Pickaxe |
| Month |