[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] XSLT Processing Model Questions

Subject: RE: [xsl] XSLT Processing Model Questions
From: "Dietrich Ayala" <dietrich@xxxxxxxxx>
Date: Sun, 14 Apr 2002 21:54:56 -0700

The stylesheet to which I'm referring is the example in section D.1 of the XSLT 1.0 spec. Section D.1 gives a source XML, a
stylesheet, and the serialization of the result tree.

> > in the first, the the results of subsequent templates are appended to the result tree as children of the <body> element. In the
> > second, the results are appended as following-children of the <h1> element.
> Maybe I'm just dense, but I don't understand what you mean by that last
> sentence, or what leads you to believe that is what's happening.

First: I'm viewing the source-tree serialization given in section D.1. This is what is leading me to believe this.
Second: in the above, I meant following-siblings, not following-children (of which there is no such axis)

> > 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.
> Nor do I understand what it means for a template result to be appended "as
> a following-sibling of the source-tree-context-node." Once a result tree
> fragment is generated, it has no relationship to nodes in the source tree,
> does it?

Apologies, another typing mistake on my part: I meant result-tree-context-node, with which I was trying to describe the most recent
node appended to the result tree.

The example given in section D.1 is very simple, and I'm trying to grok the underlying process in template application by the
processor. I understand template selection, and I understand what happens once a template has been chosen and executed. But looking
at the example, I cannot understand what logic a processor is using to determine the location in the result tree at which it appends
new nodes.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread