[jdom-interest] jdom should allow unescaped values at the per Element level

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Jul 27 10:42:27 PDT 2002

At 11:55 AM -0400 7/27/02, Phillip Rhodes wrote:

>The URL's do not work properly if they have the ampersands escaped. 
>They work fine if they are unescaped.
>http://test?x=x&x=1&x=2 		works fine
>http://test?x=x&x=1&x=2     Does not work

Then the process which is reading these URLs is broken. What is it? a 
browser? Which one? If this browser purports to support XHTML, you 
should report a bug to the browser vendor.

>My question is, how can I represent a URL in xhtml without the 
>ampersands being escaped and have it still be valid xml?

You can't. Not only is this invalid. It is malformed.

>I believe JDOM should provide a means to disable output escaping on 
>the per Element instance level.  The default could be "false".

You could probably do this as a subclass, but I would oppose it as 
part of the core. Your problem is not JDOM. It has never been JDOM. 
Your problem is some other piece of software which does not adhere to 
the XHNTML specification and needs to be fixed.  JDOM should not 
change to work around others' bugs and misconceptions. It correctly 
implements XML 1.0, and the problems you are having are because 
something else does not. The soemthing else, whatever it is, needs to 
change, not JDOM.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |

More information about the jdom-interest mailing list