RE: [xslt] extension functions returning node-sets



> > Given:
> > <xsl:variable name="test" select="str:tokenize('bob smith')"/>
> 
>   hum, what is str:tokenize ? I'm surprized it can return a node set
> since there is no tree on input.

str:tokenize is in exslt.  I used it as an example because you can test
with it.  It takes a string, and returns a nodeset after tokenizing the
value, i.e. the above would return
<token>bob</token><token>smith</token>
> 
> > Is it
> > 1)
> > <xsl:value-of select="$test[2]"/>
> 
>   Hum that should be that one I think.

If that's the case, I using the following gives junk output, which
doesn't seem correct:  <xsl:value-of select="str:tokenize('bob
smith')[2]"/>
> 
> > or
> > 
> > 2)
> > <xsl:value-of select="$test/token[2]"/>
> > 
> > I thought it was number 2, but number 1 is the only one 
> that works.  I seem
> > to remeber two as working before in libx*
> > 
> > Thoughts?
> 
>   I lack the str:tokenize context information. Looks weird, I 
> have a hard
> time seeing what node set is involved.

It's in exslt.  It's a simple example that returns node-sets.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]