Bug 817729 - Duplicate element ids cause publican build failure
Duplicate element ids cause publican build failure
Status: CLOSED CURRENTRELEASE
Product: PressGang CCMS
Classification: Community
Component: CSProcessor (Show other bugs)
1.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lee Newson
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2013-06-06 21:30:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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

Result: 

Something like: 

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


Suggestion:

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:

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

Cause:

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

Consequence:

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

Fix:

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.