[jdom-interest] Request -- please allow all XML 1.1 conformant text in Element.se tText()

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Mar 5 15:01:38 PST 2004

At 2:28 PM -0800 3/5/04, Jason Hunter wrote:
>In the meanwhile, you can either alter your copy of the Verifier or 
>(and Rusty's gonna hate me for this) you could use the new 
>(post-b10) UncheckedJDOMFactory class with its text(str) method 
>returning a Text node that isn't Verifier checked.  But of course 
>you're flying without a net there.

Thanks for reminding me of another very good reason why 
UncheckedJDOMFactory shouldn't be public even if it makes things 
faster. :-) If people actually use this to accept XML 1.1, then the 
Serializer is going to output documents that are malformed XML 1.0 
and malformed XML 1.1. Plus recent versions of Xerces will let XML 
1.1 documents into JDOM as well, so we can't even really use Xerces 
with an UncheckedJDOMFactory. (Well, you can, but there are some 
extra nasty hacks you have to pull to make Xerces reject 1.1 
documents.) If the serializer can't output 1.1, we shouldn't be 
accepting 1.1 input. Not that it's likely there are any JDOM 
customers who actually need 1.1.

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)

More information about the jdom-interest mailing list