<xsl:value-of select="count('/GROUPS/GROUP')"/> does not work.

S

Son KwonNam

When I try <xsl:value-of select="count('/GROUPS/GROUP')"/> on JSTL
<x:transform> tag, I got the following error message.

org.apache.jasper.JasperException: Can not convert #STRING to a NodeList!

but, if I try that on Sonic XIS XSL transform API It works fine.
What's the problem?

Java(apache JSTL) does not support XPath functions?
 
D

Dimitre Novatchev

Son KwonNam said:
When I try <xsl:value-of select="count('/GROUPS/GROUP')"/> on JSTL
<x:transform> tag, I got the following error message.

org.apache.jasper.JasperException: Can not convert #STRING to a NodeList!

but, if I try that on Sonic XIS XSL transform API It works fine.
What's the problem?

The problem is that the count() function requires a node-set argument. What
you're passing to it is the *string*
'/GROUPS/GROUP'

You actually wanted:

count(/GROUPS/GROUP)


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top