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

Creating multiple files

Subject: Creating multiple files
From: "Kaarle Kaila" <kaarle.kaila@xxxxxx>
Date: Fri, 19 Dec 2003 18:16:51 +0200
creating multiple files
hi,

I am studying XSLT and designing some reports in XML that I transform using
XSLT. I have ordered Michael Kays book from amazon because it got such good
reviews. I guess most my questions will be answered there??

I have an XML-file that contains something like this:

<raport><tables>
<table number="1">
table 1 contents
</table>
<table number="2">
table 2 contents
</table>
....
</tables></raport>

I wrote a few words about my plans at www.kk-software.fi/xmlreport . There
is also a more
complete xml-file available.

I use "XMLStarlet Toolkit: Command line utilities for XML" to translate my
xml-file to html using xslt stylesheets.

To create one html page from all tables my command is:
............
<xsl:for-each select=".">
   <xsl:apply-templates/>
 </xsl:for-each>
............
with templates where needed.

I also need to create one file for each table-element.

By accepting the table number from the command line I can print one table
using these

<xsl:variable name="lno" select="$tabno"/>
..............
<xsl:apply-templates select="//table[@number=$lno]" />
..................
------------

This seems to work. What happens when the xml-file is larger? Maybe 5000
tables?
This way might be then very slow as the toolkit needs to locate each of the
5000 tables
to create the outputs table1.html, table2.html, ..., table5000.html

Is there a way so that I could create all 5000 files in just one pass?

regards
Kaarle Kaila

--
Kaarle Kaila
email: kaarle dot kaila at iki dot fi
www.iki.fi/kaila


 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.