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

Re: Parameters in XPath

Subject: Re: Parameters in XPath
From: Juan Carlos Gonzalez <jcgonz@xxxxxxxxx>
Date: Tue, 7 Jan 2003 04:44:52 -0800 (PST)
carlos rebate
What I'm trying to accomplish with the Filter
parameter is to dynamically pass into the stylesheet a
XPath expression to be evaluated.
For example:

<xsl:param name="Filter" select="@rebate>9.99 and
@shippingMethod='Ground' and @cost<199.99"/>

<xsl:apply-templates
select="/Cat[@CatId=$Cat]/Prod[$Filter]"/>

Thanks.

--- David Carlisle <davidc@xxxxxxxxx> wrote:
> 
> <xsl:param name="Filter" select="@rebate>0"/>
> 
> 
> so Filter is the boolean value true or false
> depending on the value of
> the rebate attribute at this point.
> 
> 
> <xsl:apply-templates
> select="/Cat[@CatId=$Cat]/Prod[$Filter]"/>
> 
> If Filter is true it will have no effect but if
> Filter is the boolean
> value false then this selct will not slect anything.
> 
> either way Filter is a constant value not depending
> on the path so this
> is the same as
> 
> 
> <xsl:if test="$Filter">
> <xsl:apply-templates
> select="/Cat[@CatId=$Cat]/Prod"/>
> </xsl:if>
> 
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by Star
> Internet. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

 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.