Subject: Re: [xsl] number collapsing From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx> Date: Tue, 14 Dec 2004 09:12:20 -0500 |
One observation:
<xsl:when test="$begin castable as xs:integer"> <xsl:variable name="begin2" select="$begin" as="xs:integer"/>
This may fail if $begin is a string. The string "123" is castable to xs:integer, but not assignable to xs:integer.
Better to write the second line as
<xsl:variable name="begin" select="xs:integer($begin)" as="xs:integer"/>
to force the cast.
I think your new problem can be tackled using a "group-starting-with". The
only problem is that this requires nodes rather than atomic values. So we'll
start by putting the numbers into a temporary tree:
<xsl:function name="f:ranges" as="xs:string"> <xsl:param name="pagelist" as="xs:integer*"/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] number collapsing, Michael Kay | Thread | Re: [xsl] number collapsing, David Carlisle |
[xsl] negate predicate, Richard Lewis | Date | Re: [xsl] number collapsing, David Carlisle |
Month |