Subject: Re: DOCBOOK: Subsets anyone?
On Sun, Sep 29, 2002 at 02:05:36PM -0400, Steven T. Hatton wrote: > I've noticed DocBook seems to have a shortage of tags, so I figured I'd > propose my own. I began to build a 'master' document for the documents I > have. My documents are currently books. Thus far, my books physically > reside in separate directories with the files for each book colocated with > the others of that book. > > /root-of-work/subject1/subj1-book1/subj1-book1.xml > /root-of-work/subject1/subj1-book1/subj1-book1-ch1.xml > /root-of-work/subject1/subj1-book1/subj1-book1-ch2.xml > ... > /root-of-work/subject1/subj1-book2/subj1-book2.xml > /root-of-work/subject1/subj1-book2/subj1-book2-ch1.xml > /root-of-work/subject1/subj1-book2/subj1-book2-ch2.xml > ... > /root-of-work/subject2/subj2-book1/subj2-book1.xml > /root-of-work/subject2/subj2-book1/subj2-book1-ch1.xml > /root-of-work/subject2/subj2-book1/subj2-book1-ch2.xml > ... > /root-of-work/subject2/subj2-book2/subj2-book2.xml > /root-of-work/subject2/subj2-book2/subj2-book2-ch1.xml > /root-of-work/subject2/subj2-book2/subj2-book2-ch2.xml > ... > > I realized I wanted to form a global document to hold all these books. So I > started to make a set. I then realized that I actually wanted a set for each > subject, and then a set of all sets. But then I wondered if the set of all > sets could contain itsself. After I recovered from the mental stack > overflow, I decided subsets might be nice to have. > > Do others follow my thinking here? Is this a good idea? I can't speak to the general need for a set of sets, but I do know that it is pretty easy to extend the DocBook DTD to permit it. You can start your master set file with the following: <?xml version="1.0"?> <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "docbook4.2/docbo okx.dtd" [ <!ENTITY % local.book.class "| set"> ]> <set role="masterset"> <title>Master set title</title> <set> <title>First set title</title> <book> <title>First book title</title> ... </book> </set> </set> The 'local.book.class' entity is normally empty, ready to be customized. It extends the 'book.class' entity. The 'book.class' parameter entity is only used in 'set', so it would be safe to extend it to include set for your purposes. Of course, you'd also have to extend the stylesheets you are using to handle the set with role="masterset". -- 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: email@example.com
Powered by eList eXpress LLC