forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject parameter entity for globalents.ent (Was: forrest.apache.org/build.html)
Date Thu, 28 Oct 2004 01:09:39 GMT
Sean Wheller wrote:
> Dave Brondsema wrote:
> 
> Sorry for dropping in like this.

Don't be. We want people to drop in on every topic.

> I would like to make a suggestion. Although changes like this do not happen 
> all that often, when they do they generally need fixing in many places.
> 
> Something I do to help make light work of the situation is define a central 
> database of terms, links etc. that may change and are used frequently 
> throughout the documents. These are stored as entities and included in 
> documents by entity reference. All documents with a DocTypeDecl specify the 
> file as an entity in their subset.
> 
> The DocTypeDecl thus looks like this:
> <!DOCTYPE preface PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
>                       "http://www.docbook.org/xml/4.3/docbookx.dtd" [
> <!ENTITY % globalents SYSTEM "global.ent">
> %globalents;
> ]>
> 
> The content of "global.ent" looks like this:
> <!ENTITY project-name 'Some Name'>
> <!ENTITY project-url 'http://www.somename.com/'>
> <!ENTITY project-mail-subscribe 'mailto:??.??.??.??'>
> <!ENTITY project-mail-unsubscribe 'mailto:??.??.??.??'>
> <!ENTITY project-mail-post 'mailto:??.??.??.??'>
> <!ENTITY project-mail-archive 'http://??.??.??.??'>
> <!ENTITY project-svn 'svn://??.??.??.??'>
> <!ENTITY project-svn-trunk 'svn://??.??.??.??/'>
> <!ENTITY project-tracker 'http://??.??.??.??'>
> <!ENTITY cc 'http://creativecommons.org/'>
> <!ENTITY cc-attrib '<ulink 
> url="http://creativecommons.org/licenses/by-sa/2.0/">Attribution-ShareAlike 
> 2.0</ulink>'>
> ...
> 
> An entity can be included as follows:
> 
> <para>The name of the project is &project-name;. The <ulink 
> url="&project-url;">web site</ulink> is built with Forrest. We have a mailing

> list. Send mail to <email>&project-mail-subscribe;</email>.</para>
> 
> In this way I only need update the value of an entity in "global.ent" and the 
> next time a document that declares and references to it is parsed the new 
> value is expanded into the document.
> 
> Hope this helps. If you think this is a good idea and need help with 
> implimentation, I  could help while building the Docbook Plugin.

I reckon that it is a good idea. We used to use
entities at various occasions in the past Forrest.
When the build was restructured we didn't need that
approach anymore. Your suggestion is a good use.

Would it be better to use a Public Identifier
so that the catalog entity resolver can be used?

Would it be better to incorporate this into the
document-v* DTDs so that we don't need to declare
it in every xml instance.

-- 
David Crossley


Mime
View raw message