[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: Counting Nodes
Subject: Re: Counting Nodes|
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Mon, 26 Nov 2001 11:44:27 +0200
Richard Jinks wrot
Is the following expression legal?
requires Step after last "/".
I don't think so, // is a short form of /descendant-or-self::node()/ and
according to grammar rule 3
 RelativeLocationPath ::= Step |
RelativeLocationPath '/' Step | AbbreviatedRelativeLocationPath
It is supposed to count all nodes and attributes from the current context
So, do as you said:
The reason I'm asking is that I'm currently evaluating a few different XSLT
processers, with a view to using one of them in a product I'm working on.
I've noticed that different processers handle it differently, the main
stumbling block being the "//" by itself.
Usually, they work separately (i.e. count(//) and count(//@*) ), but a
couple (e.g. Apache's XalanC) seem to fall over when they are combined as
Huh, interesting point, can you say where count(//) works? This
expression have to raise syntax error.
Multiconn International, Israel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format