[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Using count() with a param?

Subject: Using count() with a param?
From: Dean Saxe <Dean.Saxe@xxxxxxxxxxxxxxxxx>
Date: Tue, 28 May 2002 16:24:49 -0400
 Using count() with a param?
I am attempting to write a stylesheet which will be used to count the number
of nodes in a document.  However, I need to be able to pass the nodes which
I want to be counted in to the stylesheet as a parameter ($nodeName).
Obviously, I cannot use count($nodeName), since the parameter is text and
not a node set.  I have also attempted to use count(*[name()=$nodeName]),
however, this always results in a count of zero, since I need to specify the
fully qualified name of the node (e.g. /Report/Body/Table/Record and not
just Record).

Has anyone tackled this problem successfully?  Any insight into this issue
is greatly appreciated!

-dhs

Dean H. Saxe
Senior Software Engineer
Magnet Communications
Dean.Saxe@xxxxxxxxxxxxxxxxx 
404.592.8515

CONFIDENTIALITY NOTICE:
This message and any attachment is solely for the use of the individual or
entity to which this message is addressed and contains information that is
confidential. If the reader of this message is not the intended recipient,
you are hereby notified that any review, retransmission, disclosure,
copying, distribution or the taking of any action in reliance on the
contents of this communication by persons or entities other than the
intended recipient is strictly prohibited. If you have received this email
in error, please contact the sender and delete the material from any
computer.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.