This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: [docbook] biblio database duplicate id in sets
- From: Bob Stayton <bobs at sco dot com>
- To: Gene Hovey <gene dot hovey at teradata-ncr dot com>
- Cc: docbook at lists dot oasis-open dot org
- Date: Thu, 3 Jul 2003 14:27:21 -0700
- Subject: Re: [docbook] biblio database duplicate id in sets
- References: <3F044C72.5020401@teradata-ncr.com>
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
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org