RE: XSLT Processing Model Questions
A question about <xsl:apply-templates/>: In the first template in the example in section D.1 of the spec, the results of the subsequent template are appended to the result tree as children of the final result tree node created in this first template. ie, the results of template 2 are appended to the result tree as children of template 1: <snip> <body> <xsl:apply-templates/> </body> in template 2, which has a match value of "doc/title", the results of the template are appended to the result tree as following-siblings of the source-tree-context-node *even though* the use of apply-templates in each template is the exact same. <snip> <h1> <xsl:apply-templates/> </hi> </snip> why does the behaviour of how template results are appended to the result tree differ between the 2 templates? thanks, dietrich > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Peter Davis > Sent: Sunday, April 14, 2002 12:31 AM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: XSLT Processing Model Questions > > > Yup, pretty much. > > On Saturday 13 April 2002 17:12, Dietrich Ayala wrote: > > <xsl:apply-templates select="child::node()"/> > > > > The processor would: > > > > * take the nodeset returned from evaluating "child::node()" against the > > source tree context node * follow the steps in 5.4 (applying template > > rules) > > Yes, mixing in the steps from section 5.2 -- the examples there are pretty > good. > > > and 5.5 (conflict resolution for template rules) to determine which > > is the best template > > * apply the chosen template to the nodeset? > > -- > Peter Davis > > 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