xsl-list
[Top] [All Lists]

Re: [xsl] Fwd: XSLT 2.0 Determining Position of Sequence Item During "for expression" evaluation

2007-03-16 21:50:43
On 3/16/07, John McGowan <john(_at_)sevenac(_dot_)com> wrote:
On 3/16/07, Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com> wrote:

>
> for $cnt in  count(  $pages )
>              return
>                  (
>                     ( for $cnt2 in $cnt,
>                           $p in 1 to $cnt2 - 1
>                              return
>                                 ($pages[$p],   '>')
>                      ),
>                      $pages[$cnt]
>                   )
>

Thanks Dimitre!  That works.  I'll remember that nesting approach in the future.

However, string-join is just too easy to pass up.  :)

Sure. Both methods can be more useful in some cases and not so much in
other. When one wants to mix different kind of items (not only
strings), then string-join will not be too useful.


--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play





--
John McGowan
Seven A C Consulting, Inc.

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--