OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] multiple output for a single xsl

[ Lists Home | Date Index | Thread Index ]


You can have multiple result documents with the current version of Saxon
(7.4, http://saxon.sf.net) using the XSLT 2.0 xsl:result-document element
(http://www.w3.org/TR/xslt20/#element-result-document). Saxon 7.4 is a
partial, experimental implementation of the working draft XSLT 2.0 spec.
Also note that in XSLT 2.0, you can name output formats with a name
attribute. An example follows.


C:\Temp>cat test.xml

C:\Temp>cat result.xsl
<xsl:transform version="2.0"
<xsl:output method="text"/>
<xsl:output name="rt" method="html"/>
<xsl:variable name="dir">file:///C:/temp</xsl:variable>

<xsl:template match="/">
    <xsl:result-document format="rt" href="{$dir}/test.html">
    <xsl:result-document format="rt" href="{$dir}/test1.html">
  That's all, folks...


C:\Temp>java -jar c:/lib/saxon7.jar test.xml result.xsl

  That's all, folks...

C:\Temp>cat test.html
C:\Temp>cat test1.html

-----Original Message-----
From: shadab [mailto:mohammad.shadab@adeptia.com]
Sent: Friday, April 18, 2003 2:57 AM
To: xml-dev@lists.xml.org
Subject: [xml-dev] multiple output for a single xsl


It is possible to load and process multiple input xml using a single
xsl.What about the opposite case, when you need more than one output
document? What about creating several output XML documents from one style



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS