[jdom-interest] JDOM 1.1 Release Candidate

Jason Hunter jhunter at servlets.com
Tue Nov 13 21:08:12 PST 2007


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-


More information about the jdom-interest mailing list