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

Re: Order of processing templates

Subject: Re: Order of processing templates
From: Mike Brown <mike@xxxxxxxxxxxxxxxx>
Date: Fri, 21 Feb 2003 02:14:03 -0700 (MST)
order processing template
Karl Stubsjoen wrote:
> How does one *best* control the flow/process by which templates are
> followed?  I assumed that it would be a top to bottom processing mechanism,
> but it does not necessarily seem so.

Processing starts at the root node of the source tree. The best matching
template for that node is found and instantiated. The end.

Any template might contain an xsl:apply-templates or xsl:for-each instruction
that directs the processor to select more nodes for processing. In the case of
xsl:apply-templates, the best matching template for each of those nodes is
found and instantiated. In the case of xsl:for-each, the best matching 
template is considered to be in the content of the xsl:for-each element.

So you control the processing order via the use of xsl:apply-templates and
xsl:for-each instructions. The match attribute of a template merely declares
that this template matches nodes of a certain pattern.

There are built-in templates for each type of node, if you don't override them 
with your own.

Mike

-- 
  Mike J. Brown   |  http://skew.org/~mike/resume/
  Denver, CO, USA |  http://skew.org/xml/

 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.