[jdom-interest] CDATA sections?

Wesley Biggs wbiggs at elite.com
Fri Jun 2 13:19:07 PDT 2000


<Kevin>
> The user really should have a choice as to which format
> he wants to use.
</Kevin>

<Brett>
No need for CDATA. Why do I care? I don't. I just want the content
to be <Markup>, and that code does it. I'm not sure what is so hard
about this ;-)
</Brett>

So to summarize:  Kevin thinks the user might care.  Brett thinks the user
shouldn't care.

I don't think anyone is arguing that we'll end up with improper data in any
case.

I agree that it's technically an outputter issue.  But the outputter needs
something to go on.  Jason suggested a heuristic where more than two escaped
characters resulted in the whole thing being sent as CDATA.  Kevin suggested
a CDATA type to differentiate it from String.

Proposal number 2,002: Construct a PrettyPrintXMLOutputter.  Call a setup
method that tells it to output all tags with the name "funkyHTMLcontainer"
as CDATA.  Or, perhaps, using XPATH notation, all tags that match
"body/*/textChunk".  Call output().  No change to existing object model.

(Hey, if this works, you can fly me to Eritrea...)

Wes



More information about the jdom-interest mailing list