At Wednesday, 21 March 2001, you wrote:
>Following on from my initial query (thanks for the replies), I now
>another about XSLT. Am I right in thinking that I will be able to
>an XML document on the server using an XSLT script, process the
>and send it back to the browser in text format with a MIME type of my
>choice? Upon receipt of this file, the browser will then execute
>associated with this MIME type.
Yes, certainly. The most common output of this is of course HTML, but
generating non-SGML text formats (LaTeX is a common example) is
easily done with the <xsl:output type="text"/> element. So long as your
server knows to send type .foo as MIME something/whatever, you should
>If this is possible, and if so, how is it done? Would I need some
>software on the server, or does is the XSLT script stand-alone and do
>all the processing/output itself?
You need to run a server add-in like Cocoon. This rides on top of Apache
or IIS, which hands any request for *.xml to a Java servlet application
runs Xalan/Xerces/Tomcat or similar combination, does the conversion
the specified stylesheet, and sends the results back to Apache for
back to the client. See xml.apache.org and java.apache.org for more
The only caution is that processing takes a non-zero amount of time.
caches the results, so a subsequent request for the same file means
does is check the timestamp on the xml and xsl files, and if unchanged,
sends the cached copy out again. Otherwise it reprocesses. But on a fast
machine this should not be a problem: I'm running Cocoon at a low
a 200MHz PC under RH Linux and it's quite happy.