Page 1 of 1

Pretty Print: custom entity definitions

Posted: Thu Aug 21, 2003 12:15 pm
by seanwhe
I want to share entity definitions across multiple Docbook documents. So I create a file and place all entity declarations inside, like this.

<!ENTITY myfile SYSTEM 'myfile.xml'>
<!ENTITY another_file SYSTEM 'another_file'>

In my root document I create the DOCTYPE declaration, like this.

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook 4.2 XML//EN" "http://www...."; [
<!ENTITY % global_entities SYSTEM "global.ent">
%global_entities;
]>

At this point Validation works, but if I touch Pretty Print it changes the DOCTYPE declaration, deleting the %global_entities; . After which validation cannot work.

Is it me, or is there a problem?

Posted: Fri Aug 22, 2003 9:57 am
by Dan
Yes, it is a problem. We will consider fixing this in the next release.

As a workaround I think you can create a new DTD, containing:

<!ENTITY %docbook SYSTEM "http:// ... docbook.dtd">
<!ENTITY % global_entities SYSTEM "global.ent">

%docbook;
%global_entities;