On Wed, 05 Nov 2003 19:41:45 +0000, Kelly Dyer
<kelly_RemoveButKeepUnderscoreDyer (AT) hotmail (DOT) com> wrote:
Quote:
I have composed a document (say a resume) in XML which I want to publish
as an HTML page on the internet. Based on the tutorials I have read,
the way to do this is to create an XSL definition (possibly referencing
a stylesheet) and to reference the XSL definition from my XML file. |
Yes.
But this doesn't say _when_ you do the XSLT transform.
You can do the transform on the client, using an
<?xml-stylesheet ... ?> PI at the top of the XML document.
But many browsers don't support this.
There is an alternative stylesheet mechanism defined (to some extent)
for this, which could allow two stylesheeets to be used for your
alternate views. But nothing out there supports alt stylesheets
(I've done it, by using JavaScript, but I wouldn't deploy this)
You can do the transform on the server. This is also quite easy to
select between two stylesheets. But you'll need a server that supports
XSLT, and the processing load can become significant / slow. You're
also doing a transform of an identical document, to one of only two
identical output documents, and you're doing this for serving every
page. Inefficient.
Best way of all is to treat the XSLT transformation as part of a
content-management task, not a serving task. Do it off-line, maybe on
your own desktop, and then just upload both HTML copies to the server.
This also makes the dual formatiing trivial.
Learn some XSL:FO with Cocoon and you could even do PDFs !
--
Die Gotterspammerung - Junkmail of the Gods