Subject: [xsl] sorting the result of a calculation on xml that can have missing/blank tags From: Sean <srguard2000-triallicense@xxxxxxxxxxx> Date: Fri, 16 Dec 2005 11:56:49 +0000 (GMT) |
Thanks Michael for the answer. I ran out of time and used format-number() in the calculation - the problem was I had '#' instead of '0': <xsl:decimal-format name="MyDecimalFormat" NaN="0" /> ... (format-number(HomePupils, '0', 'MyDecimalFormat') This also covers converting NaN to zero... Sean > Dealing with missing elements and empty elements are actually two slightly > different problems. > > However, to get a default value of "0", > > number(concat('0', string(HomePupils))) > > works in both cases. > > Michael Kay > ... > > I tried using format-number() to replace blanks with '0' and even 'number(0)', but when the output > > of format-number is used in a calculation, the result is NaN. > > ___________ Sean Ryan
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] sorting the result of a c, Ragulf Pickaxe | Thread | [xsl] Newby XSLT symbol question, Mark Wilson |
[xsl] [ANNOUNCE] Dr. Michael Kay Sh, Stylus Studio | Date | [xsl] Newby XSLT symbol question, Mark Wilson |
Month |