forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: [PROPOSAL] DTD Versioning (Re: Should href be required on link)
Date Sun, 15 Dec 2002 09:59:11 GMT
On Sun, Dec 15, 2002 at 09:02:10AM +0100, Steven Noels wrote:
> Jeff Turner wrote:
> 
> >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..
> 
> Trying to fix the link element, I was thinking to do:
> 
> catalog:
> PUBLIC "-//APACHE//ENTITIES Documentation V1.1//EN"
> 
> "http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/document-v11.mod?rev=1.7"

The point of catalogs is to find a *local* DTD, so why would you map it
to something over HTTP?

> 
> PUBLIC "-//APACHE//ENTITIES Documentation V1.1.1//EN"
>        "dtd/document-v11.1.mod"
> 
> and cvs removing document-v11.mod.

I was suggesting leaving document-v11.mod alone, and making all further
updates in .dtd files that override/extend document-v11.mod.  There
wouldn't be a document-v11.1.mod.  The directory listing would be:

document-v11.mod
document-v11.dtd
document-v11-1.dtd
document-v11-2.dtd

And corresponding catalog entries:

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

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

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

-- Document Type Definitions --
PUBLIC "-//APACHE//DTD Documentation V1.1.2//EN"
       "dtd/document-v11-2.dtd"


So to implement Keiron's patch, we'd create a document-v1.1-1.dtd which
overrides the 'link.att' entity as follows:

<!ENTITY % common-charents PUBLIC
    "-//APACHE//ENTITIES Common Character Entity Sets V1.0//EN"
    "common-charents-v10.mod">
%common-charents;

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

<!-- Redefine 'href' attribute as REQUIRED -->
<!ENTITY % link.att 'href      CDATA             #REQUIRED
         role      CDATA                         #IMPLIED
         title     CDATA                         #IMPLIED '>

%document;


I've tried this and it works.

A disadvantage of this scheme is that it makes extending 1.1.x DTDs a bit
yucky.  You'd have to make a verbatim copy of document-v11-x.dtd, and
then make any additions.  So whatever is in document-v11-1.dtd must also
be in document-v11-2.dtd, and all successors.


<snip things I didn't understand>
> 
> But the itch is gradually becoming unbearable. If we don't clean up the 
> mess, we'll never get to properly manage our DTDs. I'll do some more 
> thinking.

In the distant future it would be nice to switch to RELAX NG Compact,
being the only schema syntax readily understandable by end users.  Throw
out DOCTYPE declarations and XML 1.0's definition of 'validity' and use a
versioned namespace to identify the doc type.


--Jeff

> </Steven>
> -- 
> Steven Noels                            http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at              http://radio.weblogs.com/0103539/
> stevenn at outerthought.org                stevenn at apache.org
> 

Mime
View raw message