xsl-list
[Top] [All Lists]

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

2010-11-28 10:01:33
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(_dot_)bhardwaj(_at_)gmail(_dot_)com> 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>