[jdom-interest] XMLOutputter and newlinesafterdeclaration/doctype

Vadim Strizhevsky Vadim.Strizhevsky at morganstanley.com
Thu Dec 19 11:57:18 PST 2002

Elliotte Rusty Harold wrote:
> At 1:06 PM -0500 12/19/02, <Vadim.Strizhevsky at morganstanley.com> wrote:
> >Why do you all feel that it is such a big or unusual thing to ask for,
> >to be able to produce XML with no white space or newlines? You already
> >have API that is supposed to control this, but you arbitrarily decided
> >to not observe it in one place. That just doesn't make any logical sense
> >to me.
> It's not at all arbitrary. White space inside the root element is
> very different from white space outside the root element. That's
> XML's rules, not ours. 


> JDOM lets you control the white space inside
> the root element because that matters. It doesn't let you control the
> white space outside the root element because it doesn't matter.

Well that's the root of the disagreement really. I say it does matter,
you say it doesn't. I can't seem to be able to provide you with a real
life use case that will satisfy your criteria of where JDOM or XML is
approrpriate to be used. That's unfortunate, because I still don't think
that classifies my request as unreasonable. Probably because I disagree
with the assertion that JDOM should dictate where and how valid XML is
used, but I don't really want to debate this further.

All I was asking for was a way to control the space that is outside the
root element. Since the XMLOutputer produces it, it seemed logical to me
for it to have such control over it. And the resulting XML would _still_
be valid xml.


More information about the jdom-interest mailing list