[jdom-interest] Subclassing XMLOuputter

Jason Hunter jhunter at xquery.com
Wed Feb 18 20:23:43 PST 2004


I like all your suggestions right down the line.  I've been 
uncomfortable about the longevity of those methods for a while too. 
They really strike me as internal and things we'll want to change.  Can 
you prep up a patch?

Meanwhile, if someone can argue why these methods should keep their 
protected visibility, please speak up.  Otherwise, unless we have a 
specific use case, it's better to privatize.  We can always make them 
more public later.

Thanks for giving the API a good scouring, Brad.

-jh-

Bradley S. Huffman wrote:

> Is anyone overriding any of the following methods in XMLOutputter
> 
>    printContentRange
>    printTextRange
>    printString
> 
> Or should they be made private?  I think they should be private since there
> is a better way to implement the function of printContentRange and
> printTextRange. Hell last night I found yet another bug in printTextRange.
> 
> printString is a exact duplicate of printText so the one occurance can be
> replaced with printText.
> 
> What about escapeAttributeEntities and escapeElementEntities? The ability to
> escape unprintable chars is provided with EscapeStrategy.  Making them private
> would only limit the format of escape characters.
> 
> Also what about the format instances userFormat, preserveFormat, and
> currentFormat. I'm thinking userFormat should be private. preserveFormat should
> be static final and either private or protected. currentFormat can remain
> protected for subclass use.
> 
> Any thoughts?
> 
> Brad
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> 



More information about the jdom-interest mailing list