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

RE: Order of template execution

Subject: RE: Order of template execution
From: "Chris Bayes" <chris@xxxxxxxxxxx>
Date: Thu, 20 Dec 2001 08:04:56 -0000
order of template xsl
Samuel,
1. Yes. It depends on the priority of the temlpate. See
http://www.w3.org/TR/xslt#conflict If you aren't importing any other
templates then the priority is worked out depending on how specific a
template is. i.e. match="x" will have lower priority than match="x[@a]".
If there are 2 templates with the same priority then the processor can
either error or use the last template in the stylesheet. To get around
this you can put a priority attribute on the template to avoid
conflicts. The spec says that this can be any + or - number but msxml
requires it to be between +/- 9.

2. No. But you can use the result from one template as the input to
another. i.e.

<xsl:variable name="result1">
	<xsl:call-template name="template1" />
</xsl:variable>
<xsl:variable name="result2">
	<xsl:apply-templates select="xx:node-set($result1)" />
</xsl:variable>
Note that $result1 is an RTF so you need to use the node-set function on
it to use it.

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Samuel Abraham
> Sent: 20 December 2001 01:32
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Order of template execution
> 
> 
> 
> 
>   hi,
> 
> In an xsl file i have  templates in this order
> 
> Template 1
> Template 2
> Template 3
> 
> 1)Is there any order in which the templates are executed?
>     If I change the order will the result change?
> 
> 2)Will the change made by one template affect the source tree?
>     Or can I use the result produced by the first template as 
> the source tree for the
>           templates following?
> 
>  thanks
>   Samuel Abraham
> 
> 
> 
> --
> 
> This e-mail may contain confidential and/or privileged 
> information. If you are not the intended recipient (or have 
> received this e-mail in error) please notify the sender 
> immediately and destroy this e-mail. Any unauthorized 
> copying, disclosure or distribution of the material in this 
> e-mail is strictly forbidden.
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 


 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.