|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Counting Nodes
> > So, do as you said: > > count(//node()|//@*) > > I'm curious. Apart from the present case (evaluating processors), > why might one need to count the total number of nodes in an XML > document (excluding inquisitiveness)? 1. In case you've decided to use the Wendell Piez non-recursive repetition method you might want to be sure there are enough nodes. Then you'll evaluate: count(//node() | //@* | //namespace::*) 2. In case you're seeking a ***permanent*** ID scheme for any node -- then you'll have to traverse the nodes from the above union. If you chose to use their position in this nodelist, then the count will give you a base to calculate the minimum necessary length in bytes of the node ID. Cheers, Dimitre Novatchev. __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 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
|

Cart








