This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Applying two transformations consecutively
- To: "Griebel, Peer" <Peer dot Griebel at entire dot de>
- Subject: Re: [xsl] Applying two transformations consecutively
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Mon, 25 Jun 2001 16:15:51 +0100
- CC: "'XSL-List at lists dot mulberrytech dot com'" <XSL-List at lists dot mulberrytech dot com>
- Organization: Jeni Tennison Consulting Ltd
- References: <673E8D215B3BD311A9C90090279BBB8401066704@ntebss04.ebssoftware.de>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Peer,
> If I use xsl:include only the rule defined last will be applied.
> What I would like to have is that the rule of the first file is
> executed first and the result is fed to the second rule.
You can do this with xsl:apply-imports. Have the first file *import*
the second file with xsl:import (which has to come before anything
else within xsl:stylesheet):
<xsl:import href="file2.xsl" />
And then use xsl:apply-imports in your template:
<xsl:template match="ELEMENT">
<xsl:variable name="result-from-file2">
<xsl:apply-imports />
</xsl:variable>
... something with $result-from-file2 ...
</xsl:template>
The processor takes the current node (the ELEMENT node) and tries to
find a template in any imported stylesheet that matches it, and
executes that.
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list