Project

Profile

Help

item-at gives unknown system function error

Added by Anonymous over 18 years ago

Legacy ID: #3339202 Legacy Poster: gkiplinger2000 (gkiplinger2000)

Hello, I am using saxon version 8.5.1 with Java SDK version 1.4.2. I want to use the tokenize() function available in XSLT 2.0 and XPath 2.0. tokenize works great, but when I try to use the item-at function to access the array, I get the following error: Unknown system function item-at() The index-of function works just fine though. Does anyone have any suggestions? Here is a little bit of my xsl file: <xsl:variable name="ar_labels" select="tokenize(@labels,'|')"/> <xsl:value-of select="item-at($ar_labels,3)"/> Thanks!


Replies (2)

RE: item-at gives unknown system function err - Added by Anonymous over 18 years ago

Legacy ID: #3339219 Legacy Poster: Michael Kay (mhkay)

item-at() was removed from the specs quite a while back, because it was redundant. You can write $ar_labels[3], or in the rare cases where that's inconvenient because the context is different, subsequence($ar_labels, 3, 1). Michael Kay

RE: item-at gives unknown system function error - Added by Anonymous over 18 years ago

Legacy ID: #3339225 Legacy Poster: gkiplinger2000 (gkiplinger2000)

Thanks Michael! It works great!

    (1-2/2)

    Please register to reply