[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Paramters in templates
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
|
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
|