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

Son KwonNam

Usenet Archive
Joined
Aug 13, 2003
Messages
29
Reaction score
0
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?
 

Dimitre Novatchev

Usenet Archive
Joined
Nov 7, 2000
Messages
737
Reaction score
0
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
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top