OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Multiple bibliographies - FOP error because of non-unique ids

Yes, there may be a solution to this problem.  There is a small 
customization that makes id values unique in the output, used primarily for 
multiple instances of an XIncluded element.  See this reference for details:


However, I don't think it works without further work with multiple instances 
from a bibliography collection.  In the bibliomixed template in 

<xsl:template match="bibliomixed">
  <xsl:param name="label">
    <xsl:call-template name="biblioentry.label"/>

  <xsl:variable name="id">
    <xsl:call-template name="object.id"/>

    <xsl:when test="string(.) = ''">
      <xsl:variable name="bib" 
      <xsl:variable name="entry" select="$bib/bibliography/
                                         *[@id=$id or @xml:id=$id][1]"/>

The $id will be the modified value, but you can see that $id is used in the 
lookup from the database.  But it won't match any @id in the collection. 
You'll need to customize this template to preserve the original @id of the 
empty bibliomixed to compare it to the @id in the collection, and then let 
the template use $id from the object.id template (the modified version) in 
the output when the element is processed.

Bob Stayton
Sagehill Enterprises

----- Original Message ----- 
From: "Jürgen Klein" <dev@sntl-publishing.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, April 01, 2008 1:09 PM
Subject: [docbook-apps] Multiple bibliographies - FOP error because of 
non-unique ids

we use DocBook xsl-stylesheets (1.72.0), xalan (2.6.0) and fop fop-0.94.
Therewith we try to generate PDF from DocBook-article within multiple
bibliography-elements. In source-xml, we have empty bibliomixed-elements
with id-attributes:
<section id="first">...
<bibliomixed id="DOC2008"/>
<section id="third">...
<bibliomixed id="DOC2008"/>

Bibliography entries are pulled in by bibliomixed-id from a separate
DocBook-bibliography-database (DocBook-document with a collection of
bibliography entries). Ids in the DocBook-bibliography-database are unique.
Ids in source-xml (DocBook-article) can't be unique (e.g.'DOC2008', see
above). Nevertheless, it's no problem to generate FO. While generating PDF
from this FO, FOP, unfortunately, causes an error: "Property id "DOC2008"
previously used; id values must be unique in document".

Is there a way to get rid of this error? Is there another way to use
multiple bibliography-elements in DocBook and generate PDF, even though
bibliomixed-ids in source-xml can't be unique?

Thanks in advance,
Jürgen Klein

To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]