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

xsl:param and attribute testing

Subject: xsl:param and attribute testing
From: "Reuel Alvarez" <ralvarez@xxxxxxxxxxxx>
Date: Mon, 29 Jan 2001 18:31:50 -0500
attribute testing
I'd like to be able to pass a parameter to my xsl stylesheet that will count
nodes with specific attributes.  For example, I'd like to count Analyst
elements whose analyst_id attributes are 10, 103, or 998 like so:

<xsl:template match="Analyst">
<xsl:variable name="acount" select="count(Analyst/@id[text()=10
or text()=103 or text()=998]) + 1" />
<xsl:value-of select="$acount" />
</xsl:template>

Is there any way to pass the attributes 10, 103, and 998 (or any other set
of numbers) to the stylesheet using xsl:param? Assuming that I can do that,
how can I specify that the nodes selected contain those parameters that were
passed?





 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.