This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Using multiple style sheets
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Using multiple style sheets
- From: "Aleksei Valikov" <valikov at fzi dot de>
- Date: Mon, 13 Aug 2001 12:54:21 +0200
- References: <NIELLFAFDKADGAHABCAFKECMCAAA.samuli.niiranen@tut.fi>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi.
> I need to use multiple XSL style sheets (for HTML conversion) for one XML
> file. What is the most simple solution for this?
If you simply need to modularize your stylesheet, use xsl:include (or
xsl:import for certain cases, difference in uneasy to understand).
If you need multi-step transformation like
first apply a.xsl
then apply b.xsl
then c.xsl
then I am afraid there is no standard way of doing that in xslt 1.0.
In future versions you may just save a result of one transformations into a
variable and then transform it once again.
Alternatively, many processors allow to use node-set conversion function.
So you may save the document into variable $result1
<xsl:variable name="result1">
<xsl:apply-templates...../>
</xsl:variable>
then convert it to node-set typed variable $result2
<xsl:variable name="result2" select="ext:node-set($result1)"/>
and finally apply templates to node set $ result 2:
<xsl:apply-templates select="$result2"/>
XPath req 2.0 has an explicit requirement for easy convertibility of tree
into a nodeset.
Bye.
/lexi
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list