Boost logo

Boost :

From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-07-10 11:24:44


----- Original Message -----
From: "Rob Stewart" <stewart_at_[hidden]>
To: <boost_at_[hidden]>
Cc: <boost_at_[hidden]>
Sent: Wednesday, July 10, 2002 9:51 AM
Subject: Re: [boost] Regression test / compiler status progress

> From: Tom Harris <TomH_at_[hidden]>
> >
> > XML is a fine intermediate format, and to use it for this purpose is a
> > worthy goal. However, it is not necessary to use XSLT to perform
> > transformations. The SAX2 XML parser (implementations in your chosen
> > language) calls class methods as it sees certain parsing events. SAX2
also
> > defines filter classes, that filter these events based on any criteria.
> > Writing your own filters and composing them (Chain of Responsibility
> > pattern) allows quite complex manipulation of XML data, with output not
> > restricted to just text, which I believe XSLT is. Anyway XSLT has a
> > non-obvious syntax (to me), and is difficult to debug. Use of XSLT will
> > require yet another tool to be installed and versioned.
>
> The advantage of XSLT is, your difficulty with its syntax notwithstanding,
the
> simplicity with which one can tweak the transformation. I have used it
> extensively in the past to generate complex DHTML from XML data. However,
if
> you use a scripting language such as Perl, Python, etc., with SAX2, then
you may
> get the flexibility of XSLT without the need to learn XSLT's syntax.
Note,
> however, that you still have to learn SAX2 if you don't know it.

And personally, I think that will be at least as complex as learning XSLT.

> Boost isn't likely to post XML with a reference to an external XSLT
stylesheet,
> expecting the browser to perform the transformation.

I don't know... this is a simple solution. There's pros and cons, and
you're probably right that we'd be better off providing a fully transformed
HTML file using an XSLT transformation utility, but the pros and cons should
at least be discussed.

PROS

* Simple implementation.
* Doesn't require "lengthening the tool chain".
   * Release process isn't complicated by another set of scripts needed to
transform the XML.
   * Boost users can produce their own reports using only tools they're
likely to have already (C++ compiler, Jam and a "modern" web browser).

CONS

* If the user doesn't have a "modern" browser he can't view the transformed
report.

I think maybe we should use both techniques. The XML should reference an
external XSLT so users can get the benefit of not (necessarily) needing a
new tool if they want to produce their own reports. The release process
should use an XSLT transform tool to produce static HTML as well, so that
the reports can be viewed even with out a "modern" browser.

> Instead, I expect that
> Boost will generate the HTML as a normal step in the regression test
build.

No, I'd expect the HTML generation to be a seperate step. This way users
with out an XSLT transform utility can still run the regression tests. Even
if they don't have a) a "modern" browser or b) an XSLT transform utility,
they could still read the resultant XML file. Also, this makes it so that
Boost doesn't have to pick an XSLT transform tool that all users (who want
to run regression tests) must agree to.

> Therefore, there doesn't seem to be a compelling reason to use XSLT over a
> scripting language with SAX2.

The compelling reason to me is that we can keep the dependencies on tools to
a minimum, both for the Boost release process and the Boost user base.
Using XML and XSLT gives maximum flexibility with minimum requirements on
tools.

Some useful URLs for learning about XML/XSLT:

http://www.w3.org/TR/xslt (one of many links on the W3C site, the first
place to start for any of this)
http://www.xslt.com/ (links to tools and tutorials)
http://www.xml.com/pub/a/2000/08/holman/ (a decent introduction to XSLT)
http://www.devguru.com/Technologies/xslt/quickref/xslt_intro.html (another
intro)

Generating XML is trivial... it's format is human readable, similar to HTML,
and easily rendered using simple iostream output. Once a structure is
decided on it should be trivial to modify the existing programs to output
the XML instead of HTML. To transform the XML to HTML using an XSL file you
can use one of many XSLT transformation tools available freely on the
internet. Do a simple Google search (or start with the second URL above) to
find a tool that will work on your platform. The apache tool suggestion
(Xalan-C++ at http://xml.apache.org/xalan-c/index.html) is a good
suggestion. Another is XT (http://blnz.com/xt/), a Java XSLT tool that will
run on most platforms. There are a lot of other options as well.

Bill Kempf


Boost list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk