Java Mailing List Archive

Home » Home (12/2007) » JDOM User »

Re: [jdom-interest] JDOM 1.1 Release Candidate

Jason Hunter


Paul Libbrecht wrote:
> Hello,
> I wanted to know if a possibility of bringing to protected the following
> methods of XMLOutputter.
>  void printNamespace(Writer,Namespace,NamespaceStack)
>  void printElementNamespace(Writer, Element,NamespaceStack)
> This way, it owuld be possible to make "DTDAwareXMLOutputter", using
> Mark Wutka's DTD-parser, which is an essential ingredient of any
> refactoring method for XML-editors that edit languages with many
> namespaces.
> (I sent a version with no subclass, I am happy to provide in contribs
> one as a subclass).

This one I'm leery of. If we make it protected that's a promise to
always keep it behaving the way it is right now. The NamespaceStack is
supposed to be an internal detail.

Can you picture a way to accomplish what you want without the
subclassing? Like some sort of strategy pattern?

To control your jdom-interest membership:
©2008 - Jax Systems, LLC, U.S.A.