Re: [xsl] Sequential numbers in pure xslt, breaking the no-side-effect rule

Subject: Re: [xsl] Sequential numbers in pure xslt, breaking the no-side-effect rule
From: Nic James Ferrier <nferrier@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Mar 2007 14:47:56 +0000
Abel Braaksma <abel.online@xxxxxxxxx> writes:

> AFAIK the answer to this is a simple, short "no, cannot be done". But I 
> wanted to check it with the specialists to be sure ;)
>
> The request is simple: create a function that returns '1' on first call, 
> and returns one higher each next call, without overlaps or jumps, 
> without any input. Let's call it my:seq-number:
>
> <xsl:function name="my:seq-number" as="xs:integer">
>     <!-- some implementation -->
> </xsl:function>
>
> then the following line would return '1 2 3':
> <xsl:value-of select="my:seq-number(), my:seq-number(),
> my:seq-number()" />

Are  monads possible in XSLT?


-- 
Nic Ferrier
----------------------------------------------------------
Need a linux/java/python/web hacker?  I'm in need of work!
----------------------------------------------------------
http://www.tapsellferrier.co.uk   

Current Thread