[jdom-interest] XMLOutputter Proposal

guru at stinky.com guru at stinky.com
Tue Jun 12 08:48:58 PDT 2001


Hi! I'm back on the list... It may take me a while to sort through the
4000 messages I haven't read, so please be patient with me...

I'm starting to track down a bug Jason told me about with
XMLOutputter, and while I do, I'd like to fix something that's always
bothered me about the class.

Right now, there are two boolean properties with negative names, and
negative default values.  We all know that double-negatives are not
unconfusing.  (If I want to make sure the encoding is shown, I have to
stop and think about what value to send.  "Let's see, if I *do* want
to *show* the encoding , then I *don't* want to *omit* it... or do
I?")

So I'd like to change

    public void setOmitEncoding(boolean omitEncoding)
    public void setSuppressDeclaration(boolean suppressDeclaration)

to

    public void setShowEncoding(boolean showEncoding)
    public void setShowDeclaration(boolean showDeclaration)

They would work exactly the same, only backwards.  The default for
each would still be to show them.

(As a bonus, we replace the inconsistent usage of "omit" and
"suppress" to mean the same thing.)

I'm not sure what to do with the old setters.  I'd like to just remove
them, but I've noticed some other things are deprecated, and will
presumably be removed before 1.0 final.

Votes:
1. rename the two properties
2. deprecate the old methods
3. terminate the old methods right now with prejudice

 - Alex

-- 
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