[jdom-interest] Stirring up Trouble

Simon St.Laurent simonstl at simonstl.com
Wed Jul 19 08:05:39 PDT 2000

At 09:20 AM 7/19/00 -0500, Brett McLaughlin wrote:
>Because of my book being out, I've been forced to do a bit of "technical
>support" on a lot of Java and XML questions. I'm sure Jason and
>Elliotte, as well as Simon, know what I'm talknig about here. Lots of
>people have latched on to the word "intuitive" in JDOM, as in "it is
>intuitive to use", and warped that thing all out of content. So let's
>set the record straight (for myself, as well).

Readers read some amazing things _into_ books, independent of the author.
It's actually been pretty interesting...

>[...uninformed readers...]

>So what does that mean? That I am finding that intuitive is a tough
>word. It means "does what the developer expects, as long as the
>developer's expectations are correct." Sort of tricky, huh? In light of
>that, I find that JDOM should /not/ be intuitive in the case where the
>developer is wrong, as that could encourage really bad concepts and

I like that stand very much - I'm trying to do similar things in various
simplification projects I'm working on.

>So, here's the crux of (at least) this email:
>getContent(boolean preserveWhitespace);
>is perfectly intuitive.
>But what does
>do? I'll be the first to admit that I argued and argued that this should
>not return whitespace, because that wasn't intuitive to the user. But if
>the user things XML content ignores whitespace around textual content,
>they would be WRONG. And I would be WRONG to encourage that belief. So
>I'm now advocating that getContent() simply call getContent(true) and
>return text with whitespace around it. I'm so convinced I'm willing to
>make the /very/ painful changes in my book and defend the decision to
>roughly 25000 readers (already!). So let the talks begin, I'm wanting
>this resolved ASAP.

I suspect the changes in your book can probably be made without drastic
evil breaking loose, though there may be pain in doing it.  I think what
you're doing here is downright admirable, and I think getContent(true)
makes a lot of sense. XML's creators made a tough decision, and I think
this approach at least puts people into better contact with that decision,
while letting them reverse it _when appropriate_.

Simon St.Laurent
XML Elements of Style / XML: A Primer, 2nd Ed.
http://www.simonstl.com - XML essays and books

More information about the jdom-interest mailing list