[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] biblio database duplicate id in sets
On Thu, Jul 03, 2003 at 11:32:02AM -0400, Gene Hovey wrote: > Hello, I am new to DocBook; please bear with me. I am looking for some > help using Bibliography databases while processing a set of books. Using > Bob Stayton's book, DocBook XSL: The Complete Guide, chapter 12, > Bibliographies as a guide, I have sucessfully setup a "bibliographic > database" where the bibliography of a single book uses empty bibliomixed > tags with ids matching a biblioentry in the bibliographic database. I > set the bibliography.collection param to point to the master > bibliography xml file during the build. > > Everything works when processing a single book. However, when I process > a *set* of books where one or more books' bibliographies happen to have > a bibliomixed element with the same id (to reference the biblioentry in > the bibliographic database), > > 1) the set itself will not validate because of "duplicate IDs" (using > xmllint) and > > 2) while chunking the set proceeded without error, Fop processing > stopped dead with an error when it discovered duplicate IDs in the fo > file (using xsltproc -> fo and Fop -> pdf). > > I like the "bibliographic database" concept, but what I am missing to > get this to work with sets? Am I limited to processing only at the book > level? Thanks in advance for any pointers. As you discovered, the XSL specification requires that each id value must be unique within a document. This is true regardless of how the ID gets in the document. And for good reason. If you have biblionentry elements with the same ID in more than one book in your set, how is a citation cross reference to such an id know where to land? I don't think there is any way of getting around the need to create duplicate biblioentry elements that have different id values, so that the different books in the set can each have their own biblioentry. But maintaining duplicate entries is not fun. You could declare the content of such entries as an entity, and then have each biblioentry with different id attribute reference the entity for its identical content. In the DOCTYPE for the collection: <!ENTITY biblio1 "<biblioentry> <abbrev>AhoSethiUllman96</abbrev> <authorgroup> <author><firstname>Alfred V.</firstname><surname>Aho</surname></author> <author><firstname>Ravi</firstname><surname>Sethi</surname></author> <author><firstname>Jeffrey D.</firstname><surname>Ullman</surname></author> </authorgroup> <copyright><year>1996</year> <holder>Bell Telephone Laboratories, Inc.</holder></copyright> <editor><firstname>James T.</firstname><surname>DeWolf</surname></editor> <isbn>0-201-10088-6</isbn> <publisher> <publishername>Addison-Wesley Publishing Company</publishername> </publisher> <title>Compilers, Principles, Techniques, and Tools</title>"> In the collection: <biblioentry id="book1-biblio1"> &biblio1; </biblioentry> <biblioentry id="book2-biblio1"> &biblio1; </biblioentry> Then each book can reference its own copy with its unique id. Kind of clunky, but it should work. -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]