[jdom-interest] Test - Expanding <script> element.
jhunter at xquery.com
Mon Mar 21 23:52:07 PST 2005
> I start to put code in XMLOutputter.setFormat to copy all fields from
> userFormat to preserveFormat except the ones related to formating (setIndent
> and setTexMode). But then if a field was ever added to Format or the text modes
> change, then we'd have to remember to also change XMLOutputter. It just seemed
> better to keep things in one place.
That's no different from the status quo. Today if you add a Format text
mode, that new mode means nothing unless you also change XMLOutputter.
The two classes are already tightly coupled. Format is in essence a
struct used by XMLOutputter. There are patterns where the XMLOutputter
could rely on code rather than property values in the Format class, but
we haven't done that. So thus I don't see the extra knowledge between
the two classes as a problem. :)
More information about the jdom-interest