forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject [PROPOSAL] DTD Versioning (Re: Should href be required on link)
Date Sat, 14 Dec 2002 05:54:17 GMT
On Fri, Dec 13, 2002 at 04:46:32PM +0100, Keiron Liddle wrote:
> Hi all,
> Shouldn't the href attribute on a link (or jump, fork) be required.
> In other words what is a link that points to nowhere.

Interesting.. I wonder if the original DTD author was pasting from XLink or

> Anyway it causes an error with Fop.

Do you mean, in FOP, someone wrote <link/> and wondered why it broke? :)
What was the error?

This is a backwards-incompatible change, and a good time to decide on a
decent DTD versioning policy.  Our DTDs haven't changed since 0.2 was
released, but there are a stack of proposed modifications

So far, I think we've had a loose understanding that the filename and
PUBLIC id must change on large or backwards-incompatible changes.

The problem with this is that a PUBLIC id then refers to a small family
of DTDs, not a single DTD.  If a document makes use of a new element or
attribute added in a later version of a DTD, it will break with earlier

Most DTD publishers don't have this problem.  A bunch of OASIS people go
into a room and emerge saying "behold! Docbook 4.1.2".

Seems the only safe solution is to create a new DTD (and public
identifier) for each DTD version.  This isn't as horrible as it sounds..

Say we decide to add XInclude elements and attributes to document-v11.  We
create a new file, document-v11-1.dtd, which inherits and overrides
document-v11.mod as follows:

<!ENTITY % document PUBLIC
    "-//APACHE//ENTITIES Documentation V1.1//EN"

<!-- Override entities so that 'xi:include' and 'xmlns:xi' are allowed in
content -->
<!ENTITY % local.sections "|xi:include">
<!ENTITY % local.inline "|xi:include">
<!ENTITY % common.att 'id            ID         #IMPLIED
                       xml:lang      NMTOKEN    #IMPLIED
                       xmlns:xi      CDATA   #IMPLIED'>

<!-- Pull in document-v11.mod contents -->

<!-- Declare new elements -->
<!ELEMENT xi:include EMPTY>
<!ATTLIST xi:include

Then in the catalog, we first declare our new v11-1 DTD:

PUBLIC "-//APACHE//DTD Documentation V1.1.1//EN" "dtd/document-v11-1.dtd"

And then we map the OLD public identifier to the new DTD:

PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "dtd/document-v11-1.dtd"

This gives doc publishers a choice; they can either tie their docs to a
specific DTD with the PUBLIC id '-//APACHE//DTD Documentation V1.1.1//EN', or
they can use the looser id '-//APACHE//DTD Documentation V1.1//EN', which
allows them to use new features and bugfixes in the 1.1 series as they appear.

What do people think?


View raw message