Re: [xsl] creating nodes using multiple templates/modes

Subject: Re: [xsl] creating nodes using multiple templates/modes
From: Rene Ladan <r.c.ladan@xxxxxxxxxxxxxx>
Date: Mon, 27 Mar 2006 07:22:47 +0200
David Carlisle wrote:
>>I came up with the following XSLT 2.0 using Saxon 8.7.  This script
>>modifies a UML tree serialized as XMI
> 
[...]
> 
> If you want to do a two stage transformation then that is possible in
> xslt2 (which you are using) (in xslt1 it required the common node-set
> extension function).
> 
> Just store the result of the first transform in a variable then apply
> templates to that. This is logically tehsame as having two stylesheets
> and writing out an intermediate result, but its usually more convenient
> and efficient to do it in one stylesheet.
> 
> <xsl:variable name="x">
>   <xsl:apply-templates mode="a"/>
> </xsl:variable>
> <xsl:apply-templates select="$x" mode="b"/>
> 
But what if x is built using multiple XSLT templates and multiple XSLT
templates need to modify x (independently) in the second phase?

Do I need two scripts for that (one to build x, and one to modify x) ?

> David

Regards,
Rene
-- 
GPG fingerprint = 6793 FA71 C4E8 3BAD 5954  9552 F3DA D315 B8DB 03F5
(subkeys.pgp.net)

"It won't fit on the line."
		-- me, 2001

Current Thread