This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using multiple style sheets


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]