This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] How to share custom entity definitions across documents


Hi Taro,

alternatively you can put these declarations into dbgenent.mod, which is the default DocBook file for additional general entity declarations. It resides in the same directory that contains the docbook dtd file. It says:

<!-- File dbgenent.mod .................................................... -->

<!-- You can edit this file to add the following:

o General entity declarations of any kind. For example:

       <!ENTITY productname "WinWidget">          (small boilerplate)
       <!ENTITY legal-notice SYSTEM "notice.sgm"> (large boilerplate)

Cheers, Patrick

Jeff Beal schrieb:
You can create a single file containing all of your shared entity
declarations and then include it in each of your files.

For example, you could have a file named "global.ent" that would look
something like:

  <!ENTITY mystring "My String">
  <!ENTITY another_string "Another String">

Then, the DOCTYPE declaration for each file would be:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook 4.2 XML//EN" "http://www...."; [
 <!ENTITY % global_entities SYSTEM "global.ent">
  %global_entities;
]>

(Note the use of the percent sign (%)  when declaring such "parameter
entities" that include DTD declarations.)

Jeff Beal


-----Original Message-----
From: Taro Ikai [mailto:tikai@ABINITIO.COM]
Sent: Friday, July 25, 2003 2:04 PM
To: docbook-apps@lists.oasis-open.org
Subject: [docbook-apps] How to share custom entity definitions across
documents


I want to share entity definitions across multiple Docbook documents.


Is there a way to do this? For example, I want to have:

<!ENTITY mystring "My String">

in one place, and be able to reference it by &mystring; from many documents.

How can I do this? Do I have to modify the DTD?

Taro



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]