Subject: Re: How to concatenate/merge two independent XSLT stylesheets into ONE stylesheet?
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Wed, 04 Nov 2009 14:26:26 +0100
|
Ben Stover wrote:
I have two independent XSLT style sheets which work fine when they are executed
in two steps:
mydoc1.xml-->mysheet1.xsl-->mydoc2.xml-->mysheet2.xsl-->mydoc3.xml
However I would like to avoid the intermediate step (and the creation of mydoc2.xml).
Is there a way to concatenate the two XSLT stylesheets resp. use the output of
the first stylesheet templates as input of second stylesheet templates?
Saxon has an extension attribute for xsl:output:
http://www.saxonica.com/documentation/extensions/output-extras/next-in-chain.html
so you could use
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://saxon.sf.net/"
exclude-result-prefixes="saxon"
version="2.0">
<xsl:import href="mysheet1.xsl"/>
<xsl:output
saxon:next-in-chain="mysheet2.xsl"/>
</xsl:stylesheet>
--
Martin Honnen
http://msmvps.com/blogs/martin_honnen/
|