[jdom-interest] Entity Ref

Jason Long jason at supernovasoftware.com
Sat Feb 22 13:51:50 PST 2003


The only thing it does is allow the text replacement to be globally edited
in one place that could be actually effect any number of documents that were
created in the past or future.  If a new mill is added to the legacy system
database or the expanded description changes, I would like for the client to
only have to open the dtd and add a new entity.  I could perfom these
lookups from an external xml file rather than a dtd, but this will not
affect any other files other than the one that is currently being converted.
Why is jdom incapable of doing this?  Are entities in attributes against the
XML spec?  Could I extend the Attribute class and overide a method to force
it to add the text as "&MAHA;"
instead of escaping characters?

Jason Long - CEO and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS  Chemical Engineering

-----Original Message-----
From: Elliotte Rusty Harold [mailto:elharo at metalab.unc.edu]
Sent: Saturday, February 22, 2003 1:41 PM
To: Jason Long; JDOM
Subject: RE: [jdom-interest] Entity Ref

At 1:07 PM -0600 2/22/03, Jason Long wrote:

>I apologize if I am missing something.  It is just that it works fine if I
>manually add the entities to an xml file and read from the data from there.
>I just wish I could do this programmatically using JDOM.  I would
>any suggestions.

I understand *what* you're trying to do. I don't understand *why*
you're trying to do it. What does

This is why I would like my jdom generated file to read as:
<item id="0" mill="&MAHA;"  />

do for you that

<item id="0" mill="New API Seamless Maharashtra"  />

doesn't? The latter is more robust and reliable in any case.

| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/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