arosen at novell.com
Thu Dec 19 16:21:09 PST 2002
"No, you say it does matter; the XML specification says it doesn't
matter. This only matters to you because you're not using XML tools
to process your data.
I see a lot of developers who cause themselves a lot of grief by not
understanding the difference between syntax sugar and the document's
genuine data. In effect, you're asking us to make it easier for you
to do the wrong thing. We won't do that. JDOM should make the right
solution easy and the wrong solutions difficult to impossible."
Regardless of this particular case, I don't think that being an XML
Nazi (pardon the expression) is the way to go in general. Plenty of
people use non-XML tools on their XML documents, if only to look at
them. This won't change any time soon. So, things outside the spec do
matter. Maybe in an ideal world they wouldn't, but it the real world
they do. I don't think there should be any hard and fast rule of XML
infoset good, any other syntax bad.
For example, XNI (Xerces native interface) exposes a few bits of info
which the XML spec says aren't important, such as "<tag/>" vs.
"<tag></tag>". They did this simply because a lot of people wanted it
(as you know
I think this is a more reasonable stance.
You say that it's "wrong" to care about any part of the syntax that's
not in the XML infoset, but that's awfully judgemental. Just because his
requirements are different than yours doesn't make them "wrong".
In this particular case, to me it's not worth adding more to the API
for this very small percentage case. Also, if we added this feature, it
would beg the question of why we allow you to control *this* particular
aspect of the output, and not all the others - e.g. which type of quotes
to use around your attribute values, what whitespace to use between
attributes, etc. But, I don't feel very strongly about it either way.
More information about the jdom-interest