Java Mailing List Archive

http://www.junlu.com/

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

Re: [jdom-interest] JDOM 1.1 Release Candidate

Jason Hunter

2007-11-14


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?

-jh-
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.