Entity declarations without DTDs: yet another approach?

Part of Data

Author(s) and publish date

By:
Published:
Skip to 5 comments

With a Future of XML workshop in the offing, maybe it's time to revisit one of the oldest XML feature requests: binding general entities without using the internal/external subset.

There have been numerous more-or-less serious proposals to address this requirement over the years---here's a new (?) one.

Suppose we introduce a new official PI, named xml-entity:

<?xml-entity copyright "©"?>

with the obvious consequence that any use thereafter of &copyright; would produce a ©. That would allow a few entity declarations to be added to an XML document.

To enable large numbers of entity 'declarations' to be managed effectively, the next step would be to introduce xml-entities as well:

<?xml-entities PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"?>

and

<?xml-entities SYSTEM "myentities.ent"?>

where the referenced files could use either the old <! ENTITY syntax or the new PIs.

Simple, low-impact, and it's backwards compatible. It won't work with SOAP, which forbids PIs altogether (why?).

Related RSS feed

Comments (5)

Comments for this post are closed.