FW: [jdom-interest] XMLOutputter

Alex Chaffee guru at edamame.stinky.com
Fri Aug 4 07:22:40 PDT 2000

On Mon, Jul 31, 2000 at 05:39:07PM -0700, James Duncan Davidson wrote:
> on 7/31/00 3:25 AM, Elliotte Rusty Harold at elharo at metalab.unc.edu wrote:
> > Most importantly, a separate class makes it a lot easier to copy formatting
> > options from one outputter to another or from a default set of options to an
> > outputter.
> That's a nice touch... It's almost a swing argument as, if I'm working on a
> server outputting *lots* of XML all over the place, this reduces all the
> times that formatting options have to be set.

Not necessary: just create an XMLOutputter once with desired settings,
and you can store it somewhere global and/or pass it around just like
you'd be storing/passing the options object.

In Swing separating Model from View makes sense because you can
actually have multiple independent implementations of each.  Not so in
the present case.

Objects are their own options objects.  Or something :-)

> > Alex I guess thinks this is an unnecessary level of indirection. One of the
> > questions is whether anything except an outputter is ever likely to need
> > formatting options, in which case the separation is a little more defensible.
> Probably not, afaics. Formatting is strictly an output affair.

This supports my point so I'm leaving it in :-)

Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

More information about the jdom-interest mailing list