|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Order of template execution
> 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? No. XSLT template rules follow an event-based processing model. A template rule says "if X is encountered, do this". The order of processing is determined by the order of events, not the textual order of the rules. There's one exception: if you have two template rules that match the same "event" (i.e. the same node in the source document), it's technically an error, but the processor can resolve the ambiguity by choosing the rule that comes last in the stylesheet. > > 2)Will the change made by one template affect the source tree? Nothing done by a stylesheet ever affects the source tree. Templates write new nodes to the result tree, without changing the source tree. Mike Kay 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








