Subject: Re: status matrices and XSL (was Re: POW -- which locales Just Work?)
From: Karl Ove Hufthammer (huftis@bigfoot.com)
Date: Thu Mar 08 2001 - 09:13:53 CST
----- Original Message -----
From: "Paul Rohr" <paul@abisource.com>
To: "Karl Ove Hufthammer" <huftis@bigfoot.com>;
<abiword-dev@abisource.com> Cc: <sam@uchicago.edu>
Sent: Monday, March 05, 2001 10:10 PM
Subject: status matrices and XSL (was Re: POW -- which locales Just Work?)
> -- Suggested syntax for your XML file format:
>
> <bug id="1046"/>
> <pow url="..."/> (ie, the relevant mailing list archive URL)
Sounds good to me.
> In short, I think we should follow Eazel's precedent and track
> *all* potential work items in Bugzilla. Plus which, it makes
> this page a lot easier to scan. :-)
OK.
> One of the nice features of Bob's information design for the two
> original matrixes was that he picked seven canonical colors to
> express the following concepts:
[...]
> However,
> in all cases, these can be done briefly inline, instead of having
> to link out to a footnote.
>
> How hard would it be to modify your existing XSL to do this?
Not much, I think.
> 3. Divide into sections
> ------------------------
> Fortunately, the locale matrix is pretty simple, because
> everything winds up in a single table. However, we've divided
> the other two matrices into sections to make them easier to read.
>
> From skimming your XSL template, I'm assuming that inserting the
> chunks of explanatory text between tables is quite easy.
Yes.
> (Basically, it's a cut & paste job from the current HTML file to
> the appropriate spot in the XSL file, no?)
Yes (or in the XML file, if it should be different in different documents).
> However, I'm not sure how much work it'd be to recognize which
> portions of the underlying XML file go into which section. For
> example, your current XML hierarchy goes matrix - header - row -
> cell. Since we're using the same headers across all sections,
> how hard would it be to introduce a section level between the
> header and the rows?
Not too much. Will each document (file) contain only one set of header rows?
> 4. What XSL tool do you recommend?
> -----------------------------------
> Finally, what tool would you recommend that Sam use on our server
> to automatically run the XSL transformations?
I've no idea. I have only used XSLT on local documents before (and then
uploading them to my home page), not on a server. I use SAXON for this. In the
documentation, I found this info which may be of interest:
SaxonServlet
This is a general-purpose servlet that takes the name of a
source document and stylesheet as URL parameters, and
processes the stylesheet to create a result document which
is sent back to the browser for display. The result
document may have any media type, though HTML and XML are
the most likely.
The servlet maintains a cache of prepared stylesheets; if
the same stylesheet is used repeatedly, it is only parsed
and validated once, which will often greatly improve
performance. Prepared style sheets are thread-safe so they
can be used to serve documents to several users
concurrently.
The URLs for the source document and the stylesheet
document are supplied in the URL, which will typically take
the form:
http://server.com/servlets/SaxonServlet?source=doc.xml&style
=sheet.xsl
Note: Internet Explorer assumes that if the URL ends with
".xml" or ".xsl", as in the above example, then the
returned file will be XML - even if the media type in the
HTTP header is set to "text/html". You can prevent this
behaviour by adding an extra dummy parameter, for example
"&x=y".
The source and style parameters identify the source
document and stylesheet by URL. These are interpreted
relative to the servlet context. This means that specifying
say "style=/styles/styleone.xsl" in the URL will locate the
stylesheet in this file relative to the root directory for
the web server.
The stylesheet is prepared the first time it is used, and
held in memory in a cache. The cache may be cleared (for
example, if a stylesheet has been changed) using a URL such
as:
http://server.com/servlets/SaxonServlet?clear-stylesheet-cac
he=yes
This code is provided purely as a sample, in the
expectation that you will customise it to your particular
site requirements.
> bottom line
> -----------
> My hope is that you'll find it easy to do any XSL-specific work
> required here. Would you be willing to do so?
Yes.
> If so, then it should be quite straightforward to do the
> remaining work of replacing our existing outdated matrices with a
> easily-maintained XML/XSL variant.
I'll work on it this weekend.
-- Karl Ove Hufthammer
This archive was generated by hypermail 2b25 : Thu Mar 08 2001 - 09:18:20 CST