[jdom-interest] Feature Request: I want my padText back

guru at stinky.com guru at stinky.com
Sun Jun 17 08:38:54 PDT 2001


I have a document type that contains HTML snippets inside an XML
element, viz.:

<name>Jason Hunter</name>
<description>
Jason Hunter is a <b>great</b> guy, 
and he <i>loves to eat cheese</i>.
</description>


If a servlet wants to output the description field using
setTextNormalize, then it comes out

Jason Hunter is a<b>great</b>guy, and he<i>loves to eat cheese</i>.

which doesn't preserve the HTML formatting. ("agreatguy" and "heloves"
get smooshed together.)


The alternative is to not use textNormalize, but then the internal
line breaks get added, which I admit doesn't do much harm, but I'm the
kind of guy who likes having legible "View Source".


This used to be achieved with setPadText, which I noticed has been
deprecated in my absence, and no longer works.


Is this worth putting back in to the API?  I can't really think of any
other compelling use cases, but maybe someone else can.

 - Alex


-- 
Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/



More information about the jdom-interest mailing list