This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: XSLT Processing Model Questions


hi,

Dietrich Ayala wrote:

>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?
>
because you are specifying a direct path. theoretically, you should have 
one title, so if you match that you take it out of the mix. then you can 
go on to match the rest of your stuff according to the rules you set.

best,
-Rob


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]