You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Puneet Kathuria <Pu...@quark.com> on 2005/08/24 17:12:28 UTC
variable issue
Suppose my XML is like
<containerCatalog id='0'>
<container name="Root Node" classId="86"/>
<container name="srinivas" classId="86"/>
<container name="Test" classId="86"/>
</containerCatalog>
When I use it by first taking in variable and then calling
say in template <xsl:value-of select="count($var_name/container)"> its
giving error.
But while I call though apply template by matching template to
containerCatalog and then
using <xsl:value-of select="count(container)"> then its working fine.
Re: variable issue
Posted by Joseph Kesselman <ke...@us.ibm.com>.
Depending on how you're setting the variable, it may not be a node-set. See
discussion of the EXSLT node-set function, which will convert it into the
right form.
(The distinction between RTFs and node-sets will go away in XSLT 2.0.)
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk