|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Order of template execution
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
|
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
|

Cart








