Re: [docbook-apps] appropriate use of entities

From
Rean Vheller
Date
2006-12-23T07:32:03+00:00
ID
Thread
Re: [docbook-apps] appropriate use of entities
On Saturday 23 December 2006 06:26, Jean-Christophe Helary wrote:
> Do I really have to define all the references used in a file within  
> that file ? Or are there more flexible ways to do that ?

Yes you will need to define the entities. Following is a more flexible way of 
doing this.

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                      "http://www.docbook.org/xml/4.4/docbookx.dtd" [
<!ENTITY % ext SYSTEM "myentities.ent">
%ext;
]>

Content of myentities.ent

<!ENTITY copyright SYSTEM 'copyright.xml'>
<!ENTITY corpauthor SYSTEM 'common/corpauthor.xml'>
<!ENTITY legalnotice-copyright SYSTEM 'common/legalnotice-copyright.xml'>
<!ENTITY legalnotice-warranty SYSTEM 'common/legalnotice-warranty.xml'>
<!ENTITY legalnotice-liability SYSTEM 'common/legalnotice-liability.xml'>
<!ENTITY pubdate SYSTEM 'common/pubdate.xml'>
<!ENTITY chapter_red SYSTEM 'red.xml'>
<!ENTITY chapter_blue SYSTEM 'blue.xml'>
 ...
<!ENTITY chapter_green SYSTEM 'green.xml'>

Hope this helps,

-- 
Sean Wheller
Technical Author

+27-84-854-9408
http://www.inwords.co.za