This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
[docbook] Best practices for external entity references?
- From: "Chris Johnson" <cjohnson at capcollege dot bc dot ca>
- To: <docbook at lists dot oasis-open dot org>
- Date: Tue, 06 Apr 2004 14:33:16 -0700
- Subject: [docbook] Best practices for external entity references?
Hi,
I am assembling the portions of a modular docBook document, and was
wondering if here are any resources for best practices for using entity
references.
Each section file (meaning the root element is a <section> element)
will reference one or more outcomes, course lists, and / or general
entities, and I would like to manage these entities as centrally as
possible.
I have Elliotte Harold's XML Bible and have googled this topic, and
have come up with two possibilities:
1) Use an 'index' file to point to other files that contain the actual
entity references:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[
<!ENTITY % ENT_INDEX SYSTEM "../entities/entity_index.dtd">
%ENT_INDEX;
]>
2) Refer to each external parameter entity as required:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[
<!ENTITY % GENERAL SYSTEM "../entities/general.dtd">
%GENERAL;
<!ENTITY % OUTCOMES SYSTEM "../entities/outcomes.dtd">
%OUTCOMES;
<!ENTITY % COURSELISTS SYSTEM "../entities/courselists.dtd">
%COURSELISTS;
]>
Any thoughts on 1) vs. 2), or on this method in general? I'm leaning
towards 1), as I can then add other entity sets if needed to
entity_index.dtd. Also, are there any gotchas regarding addressing
(relative / absolute / fully resolved)? Should I be looking at using
Catalogs?
I have attached copies of the entity files, and I look forward to your
feedback.
TIA,
Chris
Chris Johnson
Web Developer
Capilano College
North Vancouver, Canada
604.986.1911 ext. 3455
cjohnson@capcollege.bc.ca
%GENERAL;
%OUTCOMES;
%COURSELISTS;
To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.