RE: [xsl] Integrating Multiple Stylesheets and XSL transformations

Subject: RE: [xsl] Integrating Multiple Stylesheets and XSL transformations
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Mon, 17 Mar 2003 15:03:17 -0800
Hi,

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Conal Tuohy
> Sent: Monday, March 17, 2003 2:24 PM
>
> bix wrote:
>
> > I am looking for a way to produce an integrated environment
> > which utilizes a
> > series of xsl transformations over a single xml document to produce a
> > compact, browsable view.
>
> <snip/>
>
> > But I'm a little lost as to how to integrate the xsl
> > files into one
> > cohesive environment.
>
> Check out Apache Cocoon for a framework that will easily support your
> requirements: http://cocoon.apache.org/

<rant>
I wonder why people so glibly say, "oh.. you could just use cocoon..." Yes, you
could spend weeks (months?) trying to figure out cocoon for your needs. Then
come up against numerous bugs and have to build/fix parts of cocoon for your
needs. And then realize that all you need (to kill a fly) is a few
transformations (flyswatter) to get what you need as opposed to the cocoon way
(sledgehammer). Cocoon, as its founder likes to say, is for massively scalable
applications. I wonder how many people actually need that??
</rant>

An easy way to do this, using java, is something like:

    Transformer t1 = StylesheetCache.newTransformer(xsl1);
    File f = File.createTempFile("stream", ".xml");
    Result result = new StreamResult(f);
    t1.setParameter("uname", name);
    t1.transform(new StreamSource(source), result);

    Transformer t2 = StylesheetCache.newTransformer(xsl2);
    t2.transform(new StreamSource(result.getSystemId()), new StreamResult(out));
    f.delete();

-Rob

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



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


Current Thread