item-at()?

Here should go questions about transforming XML with XSLT and FOP.
tsh138
Posts: 17
Joined: Tue Feb 05, 2008 11:14 pm

item-at()?

Post by tsh138 »

When I try to use item-at() I get the error that it is an unknown system function. Anyone know what function,if any, takes the place of this one?
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: item-at()?

Post by sorin_ristache »

Hello,

There is no built-in function called item-at(). Please give an example of the input of your transformation and what you try to obtain from the transformation.


Regards,
Sorin
tsh138
Posts: 17
Joined: Tue Feb 05, 2008 11:14 pm

Re: item-at()?

Post by tsh138 »

Sorry, I figured it out. Use braces like an array in other languages.
jkmyoung
Posts: 89
Joined: Mon Mar 06, 2006 10:13 pm

Re: item-at()?

Post by jkmyoung »

Also note that node lists in xslt start at position() 1, not 0.
tsh138
Posts: 17
Joined: Tue Feb 05, 2008 11:14 pm

Re: item-at()?

Post by tsh138 »

Thanks, I think I read that somewhere in relation to how Microsoft deviated from the standard and start with 0 instead of one, is that correct?
jkmyoung
Posts: 89
Joined: Mon Mar 06, 2006 10:13 pm

Re: item-at()?

Post by jkmyoung »

No.
All XSLT processors I've seen, including Microsofts, start at array index 1.

You may be thinking of C# or C++ where they start at 0, as is the norm, (eg compared to Java, php, perl, etc..)
Post Reply