[jdom-interest] Entities in JDOM?

Tatu Saloranta cowtowncoder at yahoo.com
Thu Feb 17 16:07:49 PST 2005

--- Jason Hunter <jhunter at xquery.com> wrote:

> The DocType class exposes an "internal subset" that
> contains a string 
> version of the internal subset you're talking about.
>  We didn't create a 
> full object model for the internal subset because it
> was non-trivial and 
> there wasn't much interest.  You can manipulate the
> string directly if 
> you like.

It is indeed surprisingly hard to create meaningful
object representation of DTD subsets... mostly since
DTD-based entities are mostly textual
replacements/macros (similar to C preprocessor), but
with some twists on handling of character entities.
Best that can be done is usually just to treat entity
values as raw text, to embed as is. Expressing element
and attribute definitions is slightly easier, although
since they also allow parameter entity expansion, not
completely trivial.

-+ Tatu +-

Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 

More information about the jdom-interest mailing list