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


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

where to store entity references


I have two more (hopefully easy) questions...

I have a large file of internal general entity references that I have made to save myself the trouble of hand-typing the same markup for certain items in my documents that are repeated in many places. This is (AFAICT) the custom.

But I also have a few dozen external general entity references, which I am using in imitation of the examples in "DocBook: The Definitive Guide" -- each of my "sect1" elements is in its own file (for ease of maintenance). I have one "master" file, called "documentation.xml", which consists of little more than a hierarchy of "book"s, "part"s, and "chapter"s, and an external general entity reference within each chapter for each "sect1" element. In other words, this file has the structure, whereas the subfiles have all of the meat.

Since I am not including an internal DTD (rather I am using the DocBook DTD), I haven't made any entity declarations in my document yet. I am assuming that I can do them within the system identifier, like this:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "system.identifier"
[
<!ENTITY ent1 SYSTEM "path/to/file">
<!ENTITY ent2 SYSTEM "path/to/file">
<!ENTITY ent3 SYSTEM "path/to/file">
]
>

Instead of putting all of the entities directly at this point, can I just keep them in their separate file and declare an entity reference to the file full of entity declarations? Like this:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "system.identifier"
[
<!ENTITY entityfile SYSTEM "path/to/file">
&entityfile;
]
>

Now will all of my entities (in that file) be "included" into the document?


The other question I have is, can I specify a relative path to a file in an external general entity reference? Like above? Or should it start with "./path/to/file" to indicate "current working directory"?

Or must those paths be absolute?



Thanks very much for your help,


Erik



----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com


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