jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Lee" <...@dynwebdev.com>
Subject Re: xsl-fo taglib
Date Mon, 03 Dec 2001 14:53:25 GMT
Oh, man. I just did very similar stuff in org.apache.taglibs.xsl (see
previous e-mail).

There is an XSLTransformerFactory in there that caches thread-safe Templates
globally and Transformers in a ThreadLocal. It's well over one hundred times
faster than creating them from scratch and you have perfectly consistent
performance (no long sync contention under heavy loads). It also has
functionality to check the lastModified date on the xsl file or URL. You can
set a refresh interval on this check so that it will only check once for the
time period you specify; a Transformer retrieval without the check is three
times faster.

The actual transform tags allow you to input XML from a document, an
existing DOM tree, or the tag body. The xml and xsl documents can be
relative URL's or remote URL's. The tag will differentiate automatically.

There is also a cache tag that gives you a lot of flexibility in caching
transform results. You can cache dynamic results in any context,

There's also a Writer adapter in there. I had a problem with Xalan's
Transformer flushing the output. If you wrap the JspWriter in a
FlushIgnorantWriter, it will simply ignore the flush and the performance hit
will be minimal.

The code is very tight and well-documented. I would have modified xtags but
I decided the scope was too big for what I needed.

Thank you,

----- Original Message -----
From: "Stefan Kost" <s.kost@webmacher.de>
To: "Tag Libraries Developers List" <taglibs-dev@jakarta.apache.org>
Sent: Monday, December 03, 2001 3:46 AM
Subject: Re: xsl-fo taglib

> Hi James,
> using fop it's like using styl plus something else. one uses a
> xsl-styleshett to produce a xml-file containg of formating objects (fo
> describes a pags as a set of boxes with content, the fo-processor=fop
> layouts tis and exports a pdf, svg, ...). After transforming the xml to
> a xml with fo, one would make a call to the fop to render the doc.
> To use it I would set the jsps content type to pdf and the have
> something like this
> <xtags:style-fop xsl="topdf.xsl">
>   ... my xml output ...
> </xstags:style-fop>
> In a projed I work within we currently use the xsl taglib to produce out
> html pages. we use different xsl-style-sheets to produce reports
> (eliminating formfiled and navigation etc.). I already modified that
> taglib, to use xalan2 api and further to cache the xsl-transformer
> objects in a hashmap (this yielded 30% speed increase !). We now thing
> about to use fo for the reports as a on-the-fly generated pdf is much
> easier to print and has more possibillities for e.g. graphs.
> to the apache fop. Its written in 100% java, so we can instaciate the
> fop directly (no need for a servlet). The object-instance can be reused,
> once the job is done.
> Stefan
> > Hi Stefan
> >
> > I'm not too up on apache-fop. What kind of changes would be required to
> > support it? e.g. is it a minor patch to the <xtags:style> tag or is it a
> > whole new tag. If fop was used to produce PDFs then shouldn't that be
> > by a single servlet (a little like the recent discussion on Images)
> > than output as part of a JSP page?
> >
> > James
> > ----- Original Message -----
> > From: "Stefan Kost" <s.kost@webmacher.de>
> > To: <taglibs-dev@jakarta.apache.org>
> > Sent: Wednesday, November 28, 2001 12:30 PM
> > Subject: xsl-fo taglib
> >
> >
> > > hi,
> > >
> > > month ago I posted changes to the xsl-taglib (speedup + adaption to
> > > xerces2.0), which passed unnoticed. the question is the taglib
> > > unmaintained? It looks like xtags provides the functionalitty of the
> > > original one as a subset.
> > > I am writing because I would like to have something like xsl:apply (or
> > > xtags:style) for xsl-fo using apache fop. of couse I would try to
> > > implement that myself.
> > > Please tell me your opinios at which place (which taglib) you consider
> > > this most appropriate.
> > >
> > > Stefan
> --
>  < W E B M A C H E R >
> POST: August Bebel Str. 69
>       04275 Leipzig
> FON:  +49 341 30 34 832
> FAX:  +49 341 30 34 840
> WEB:  www.webmacher.de
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>

View raw message