[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK: problems separating entities
On Tue, Jul 16, 2002 at 04:44:41PM -0500, Grobe, Gary wrote: > I'm sure I'm just not understanding something correct here. Should I be > allowed to have book entities in a set, and then more entities in books for > it's own chapters as follows ... > > --- set > <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ > <!ENTITY book1 SYSTEM "/u/fred/fred/docs/book1.sgml"> > ]> > <set> > <title>My Site</title> > <setinfo>... > </setinfo> > &book1 > </set> > > And then in boo1.sgml have ... > > --- book > <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [ > <!ENTITY chap1 SYSTEM "chap1.sgml"> > <!ENTITY chap2 SYSTEM "chap2.sgml"> > <!ENTITY chap3 SYSTEM "chap3.sgml"> > ]> > <book> > <title>my book</title> > <bookinfo>... > </bookinfo> > &chap1; > &chap2; > &chap3; > </book> > > Seems if I throw all doctype and entities in my set page, then it works, but > by having doctype w/ entities separated doesn't seem to work. > > Any help much appreciated. I'm afraid a system entity cannot have a DOCTYPE declaration. It's a "feature" of the SGML and XML specs that I've never quite understood. I can understand not wanting to mix different doctypes, but if they all use the same doctype, why not permit it? The parser could certainly ignore any extra doctype declarations when it read the system entities. So you end up with system entity files without a DOCTYPE, which means they are not valid files and cannot be validated. It breaks the concept of modular documentation. Some editor programs like emacs and ArborText can dynamically add a DOCTYPE declaration to a system entity based on a processing instruction. If you care to switch to XML, I've developed a system of modular DocBook using XIncludes and olinks, where each module is maintained as a valid file. It is described at: http://www.sagehill.net/OlinkExtended.html#id363803 -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 Caldera International, Inc. fax: (831) 429-1887 email: bobs@caldera.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC