RE: multiple output files/getting command-line parameters in XT

Subject: RE: multiple output files/getting command-line parameters in XT
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 13 Jul 1999 10:26:03 +0100
> Obviously it is not standard, but how, using XT, can I find the name
> of my output file? 

I can't comment on how to do it in xt, but in SAXON, the best way is to open
all the output files from within the stylesheet, and define their names via
a parameter (e.g. a directory name) from the command line, e.g.

java com.icl.saxon.StyleSheet source.xml style.xsl dir=here

followed by

<xsl:param-variable name="dir"/>
<xsl:output file="{dir}\index.html">

> Would someone care to comment on how things work in an 
> environment where
> an XML file is quietly transformed to HTML by a server, for older
> browsers? My test file is 3 mbytes of detailed gibberish, and the
> chances are that I will currently split it into many small 
> parts, with 
> some summary documents that reference those parts. How does 
> the server 
> engine manage this, not having `files' lying around? 

If you always generate the same HTML from the same XML, then I would
generate it once, at publication time rather than at delivery time.

I think there are some systems starting to appear that do it on first
request and cache the result.

If you want to generate different HTML depending on the user and the time of
day, one approach is to start by splitting the big XML file into a set of
linked "page sized" XML files, so at rendering time you are always producing
one HTML file as output.

Another approach I have used successfully is to store lots of tiny XML
fragments in a relational database, and at page delivery time to assemble an
XML document from these fragments and render that.

I would certainly avoid parsing 3 Mb of XML every time a user wants to see
some small part of it.

Mike Kay

 XSL-List info and archive:

Current Thread