RE: [xsl] XSLT Processing Model Questions

Subject: RE: [xsl] XSLT Processing Model Questions
From: "Dietrich Ayala" <dietrich@xxxxxxxxx>
Date: Sun, 14 Apr 2002 19:02:47 -0700
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: [xsl] 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


Current Thread