[prog] Including entities in DocBook

Megan Golding meggolding at yahoo.com
Thu Nov 21 07:33:07 EST 2002


--- Dan Richter <daniel.richter at wimba.com> wrote:
> The point was to have several different documents (i.e., each
> beginning with its own <!DOCTYPE>) that share a big list of 
> entities. However, it looks like DocBook was designed with
> a "single universe" mentality, i.e., put everything into one
> humongous document, in the form of a <Set> if necessary. That 
> may be the best solution, but if I do that can I still generate 
> separate documents (in HTML or PDF) containing only the <Article>
> or <Book> that I want? Sure, I know it's possible, but can I do 
> it easily?

You may want to check out
http://developers.cogentrts.com/cogent/prepdoc/pd-entities.html,
which describes how one company uses docbook & entities from a shared
entity file.

The example the authors give is:
    <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
    
    <!ENTITY % commonentities SYSTEM "../../i/common/entities.sgml">
%commonentities;
<book>
    	&prepdocmanual;
    <!--&index;-->
    </book>

I've never used this before, but from the above example and
explanation on the referenced web page, I think "% commonentities" in
the entity declaration says, "Go get the named file and call the
entity commonentities." Then, at the end of the same line, the
authors pull in the entity with "%commonentities".

Good luck!

Meg

=====
Meg Golding    |    http://www.kalamitykat.com

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the Programming mailing list