[publican-list] Different approach to banning tags and attributes

Jeff Fearn jfearn at redhat.com
Thu Nov 13 01:29:10 UTC 2008


Hi everybody!

I have been thinking about the approach taken to banning tags and attributes and think I have a better way of doing this that the current process.

I'm thinking that making our own DTD that is a subset of the DocBook DTD would be a better approach. This would allow people using validating editors, like Kate and Emacs, to limit what tags and attributes they are using when writing documents, instead of having to wait until they try to build them.

Making it a subset ensures that publican based books can build in any other DocBook tool chain.

Doing this is actually pretty easy to do, see http://www.docbook.org/tdg/en/html/ch05.html

Here is an example of a DTD which removes the olink tag, but supports everything else in the DocBook 4.5 DTD:

--- START DTD ----

<!ENTITY % olink.module "IGNORE">

<!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
%orig-docbook;

--- END DTD ---

It gets a little more complicated to remove attributes from a tag and keep the tag, but it's not greatly complex.

It's possibly we could switch DTDs on either a brand or per book basis as well, just in case a brand wanted to support those tags we don't want to support.

Discuss!

Cheers, Jeff.

-- 
Jeff Fearn <jfearn at redhat.com>
Software Engineer
Engineering Operations
Red Hat, Inc
Freedom ... courage ... Commitment ... ACCOUNTABILITY




More information about the publican-list mailing list