[jdom-interest] RE: BUG: XMLOutputter inserts extra empty lines

Hallvard Trætteberg hal at idi.ntnu.no
Fri Dec 7 02:15:48 PST 2001


> JDOM already has some of this:
>  org.jdom.output.SAXOutputter (shredder + writer)
>  http://cvs.jdom.org/cgi-bin/viewcvs.cgi/jdom/src/java/
>  samples.sax.XMLWriter plus some filter implementations
>  http://cvs.jdom.org/cgi-bin/viewcvs.cgi/jdom/samples/sax/

So org.jdom.output.SAXOutputter generates SAX2 events, and
samples.sax.XMLWriter accepts these events and outputs text. But
XMLOutputter seems unrelated to these two, I'm left wondering why? With
SAXOutputter, we should/are be able to use all existing XML tools around,
e.g. filters and transformations, without ever generating a text stream. I
guess the SAX2 events can even be fed into a SAXBuilder.

> PS - Also have a look at gnu.xml.pipeline.TextConsumer, which is the
> "pipelined" version of XMLWriter.

> http://www.gnu.org/software/classpathx/jaxp/apidoc/index.html

> By the way, the gnu.xml.pipeline design looks very interesting.  Are there
> any ideas here we should apply to XMLOutputter?

The pipeline classes include a lot of useful filters, including an
XsltFilter, which I at least find interesting.


More information about the jdom-interest mailing list