Bug 817729 - Duplicate element ids cause publican build failure
Duplicate element ids cause publican build failure
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lee Newson
Depends On:
  Show dependency treegraph
Reported: 2012-04-30 23:43 EDT by Joshua Wulf
Modified: 2014-10-19 19:00 EDT (History)
2 users (show)

See Also:
Fixed In Version: 0.24.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-06 21:30:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joshua Wulf 2012-04-30 23:43:27 EDT
If an author specifies an element id in a topic, and that element id is used in another topic, when the two topics are combined in a single output (book), the publican build fails due to duplicated ids.

To reproduce:
1. Create two topics, each containing a table
2. Give the table in each topic the same id attribute
3. Attempt to build a book that includes both topics


Something like: 

topics/General_Broker_options.xml:8: validity error : ID tabl-Messaging_Installation_Guide-Setting_Broker_Options-General_Broker_Options already defined


Rewrite all id elements in topics as the book is assembled. An id element can be used as a target within a topic (example below), so target references can be unambiguously resolved by the builder (namespace is per topic) and rewritten so that they are unambiguous for publican (namespace is per book).

Example of valid use of id as target within a topic:

<figure id="figure_above">
<para>In <xref linkend="figure_above"/>, yada yada yada.</para>
Comment 1 Lee Newson 2012-05-15 19:15:52 EDT
Fixed in 0.24.0


The builder was only fixing duplicate ids that existed amongst duplicate topics. 


A build would fail if an id is used twice in different topics.


Find all the ids first then check if the id has been duplicated. If it has been duplicated then add a unique identifier to the id and then check the rest of the topic for the old id and replace it with the new id.
Comment 2 Lee Newson 2013-06-06 21:30:15 EDT
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.

Note You need to log in before you can comment on or make changes to this bug.