Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2002-07-10 09:51:08


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.

Boost isn't likely to post XML with a reference to an external XSLT stylesheet,
expecting the browser to perform the transformation. Instead, I expect that
Boost will generate the HTML as a normal step in the regression test build.
Therefore, there doesn't seem to be a compelling reason to use XSLT over a
scripting language with SAX2.

Rob


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