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

Re: Paramters in templates

Subject: Re: Paramters in templates
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 22 Jul 1999 18:13:47 +0100 (BST)
call in div
You normally need to explictly pass it on, something like:

<xsl:apply-templates select=". . . ">
   <xsl:param name="label" expr="$label"/>
</xsl:apply-templates>


> For example if I had:
><DIV>
>  <P>
>    <FIELD>
>What happens if I later add a match for <P>?

If the apply-templates in your rule for <DIV> selects children (the
default behaviour) then the parameter will only be seen by templates
fired by that nodes in that list, so in this case the rule for P
had better pick up the label parameter and pass it on as above, elese
the rule for FIELD won't see it.

But if your template for DIV calls apply-templates with // or explitly
./P/FIELD or anything else such thatthe FIELD element is in the node
list returned by the select expression, then the FIELD template will see
the `original' setting of the parameter from your apply-templates call
in DIV, and won't need to be called via a template for P.

David


 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.