[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Outputting to separate files.

Subject: Outputting to separate files.
From: Alan Kennedy <alank@xxxxxx>
Date: Wed, 24 Mar 1999 10:49:01 +1100
alan kennedy
XSL, Love it! Absolutely marvellous!

One small thing that I would love to have is the ability to redirect output
to a set of output files, directed by the StyleSheet.

For example, say I have a dictionary, like so

<DICT>

<ENTRY>
<WORD>Someword</WORD>
<DEF>Definition of someword</DEF>
</ENTRY>

<ENTRY>
.....
</ENTRY>

</DICT>

I'd like to be able to

<xsl:template match="DICT">
    <xsl:for-each select="ENTRY">
             <xsl:output-to filename="{.}.htm"/>
                 <xsl:apply-templates select="../DEF"/>
             </xsl:output-to>
    </xsl:for-each>
</xsl:template>

Could I do this with the existing XSL? Or would I have to roll my own using
the DOM? Or am I failing to grasp the concept of declarative transformation
(vs procedural)?

At the moment, I'm just maintaining my "dictionary" in a wodge of little
files and processing them all individually from the command line, which
means there is a lot of file opening and closing overheads.

Thanks for all the great work, XSL folks. You've radically changed the way I
work.

Regards,

Alan.





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.