On Wed, Feb 18, 2004 at 10:51:57AM +1100, Bruce Britts wrote:
> Hi,
> 
> I'm attempting to use the XML::XPath count() function and will 
> get,  'XML::XPath::Node::Element=SCALAR(0x1fa205c)'  returned instead 
> of  the expected integer using the code below;
> 
> [% FILTER null;
>         USE indx = XML.XPath('statspages.xml');
>         output = [ ];
>         FOREACH row = indx.findnodes('/statspages/statscat/category');
>                 num = row(count('linehead'));

That should probably be something like:

                  num = row.findvalue("count('linehead')");

You can't just call an XPath function, you need to evaulate it in a call
to one of XML::Path's functions. And they need to be called on an
XML::Path object.

Dave...

-- 
  New .sigs
  Running in please parse

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to