[xsl] RE: chaining transformations

Subject: [xsl] RE: chaining transformations
From: Johannes Döbler <jd@xxxxxxxxxxxxxx>
Date: Wed, 14 Mar 2001 22:08:27 +0100
Just as a little addition to the discussion about how to chain transformations:
jd.xslt offers the class TransformationChain which lets you just do this by passing the input xml and all the stylesheets as arguments:


java jd.xml.xslt.TransformationChain in.xml a.xsl b.xsl [more stylesheets...]

The final result is then written to the standard output.
What is the advantage of that way? TransformationChain does not serialize the interim results but rather uses the DOM result trees as input for the next transformation - with the effect that the time for parsing the interim results is saved.


Johannes


>  For instance, if you were using the
> xalan testXSLT
> program as your processing engine, you would pipe from one
> call to another using
> a command line like the following:
>
> testXSLT -in myfile.xml -xsl format.xsl | testXSLT -xsl
> display.xsl -out
> myfile.html
>
> (I think that syntax should work.)

I think that would be a nice addition to any XSLT engine,
whether it be a pipeless win32 box or *nix.

I often find it simpler to do two steps rather than a Jeni
T monster transform.

Regards DaveP


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread