Sign In/My Account | View Cart  
advertisement

Article:
 XSLT 2 and Delimited Lists
Subject: item-at() question
Date: 2006-10-10 18:21:58
From: mvc

Bob,


I have some data delimited by the ~ character. When I try something like the following:


<xsl:template match="record">
<xsl:param name="tokenizedString" select="tokenize(.,'~')"/>

<xsl:value-of select="item-at($tokenizedString,1)"/>


</xsl:template>


I get a message " Unknown system function item-at()
Failed to compile stylesheet. 1 error detected." returned by Saxon 8.3. I looked at the function list on the Saxonica webpage (http://www.saxonica.com/documentation/functions/intro.html) and I do not see item-at().


Does item-at() exist? If not how do you access the nth item in the tokenized list?


Thanks,
Morgan


Previous Message Previous Message   Next Message No Next Message


Titles Only Titles Only Newest First
  • item-at() question
    2006-10-11 05:01:53 Bob DuCharme

    I just guessed at the new syntax and it worked with Saxon:


    Second item in tokenizedSample:
    {<xsl:value-of select="$tokenizedSample[2]"/>}


    Tenth item in tokenizedSample:
    {<xsl:value-of select="$tokenizedSample[10]"/>}


    Bob



Sponsored By: