Re: Re: [xsl] Count the node from zero instead of one

Subject: Re: Re: [xsl] Count the node from zero instead of one
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Sun, 28 Nov 2010 21:19:51 +0530
Using rest of programming abstractions as they were in my previous
reply, I think we would need to write the logic as following using
XSLT 1.0,

<xsl:variable name="num">
    <xsl:number count="$nodePattern"/>
</xsl:variable>

<position>
    <xsl:value-of select="normalize-space($num) - 1" />
    <xsl:text>,</xsl:text>
</position>

Here the contents of variable is untyped, and in XSLT 1.0 environment
doing normalize-space($num) - 1 does an automatic arithmetic
computation.

This is still untested.

On Sat, Nov 27, 2010 at 8:36 PM, Rashi Bhardwaj
<rashi.bhardwaj@xxxxxxxxx> wrote:
> Hello Mukul,
>
> I am sorry mention in my query that I can use xslt 1.0. Sincere
> apologies for the same. Is it possible to perform the same function
> with xslt 1.0?
>
> Please let me know....Cant we take the value in a variable instead of
> element ''position''?
>
> Thanks,
> Rashi




-- 
Regards,
Mukul Gandhi

Current Thread