|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to concatenate/merge two independent XSLT sty
At 2009-11-04 14:12 +0100, Ben Stover wrote:
I have two independent XSLT style sheets which work fine when they are executed You can use modes and, in XSLT 2.0, temporary trees, though it will require you to modify the stylesheets and not use them untouched as they exist now. You don't have to use named modes for both steps ... you can use the default unnamed mode for one of the two steps. The pattern would be along the lines of: <xsl:variable name="intermediate">
<xsl:apply-templates mode="step1"/>
</xsl:variable>
<xsl:apply-templates select="$intermediate"/>or .... <xsl:variable name="intermediate">
<xsl:apply-templates/>
</xsl:variable>
<xsl:apply-templates select="$intermediate" mode="step2"/>... where each stylesheet's template matches are all in the same mode. Namespace-qualifying your top-level constructs may help too, to avoid overriding declarations. If you have to do this with XSLT 1 then you'll need to use a vendor-supported extension to act on the node set of the result tree fragment. I hope this helps. . . . . . . . . . . . . . Ken -- Upcoming: hands-on XSLT, XQuery and XSL-FO Washington DC Nov 2009 Interested in other classes? http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






