Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 817729 - Duplicate element ids cause publican build failure
Summary: Duplicate element ids cause publican build failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CSProcessor
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-01 03:43 UTC by Joshua Wulf
Modified: 2014-10-19 23:00 UTC (History)
2 users (show)

Fixed In Version: 0.24.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-07 01:30:15 UTC


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 767000 0 unspecified CLOSED Duplicate IDs on elements when topic included more than once 2021-02-22 00:41:40 UTC

Internal Links: 767000

Description Joshua Wulf 2012-05-01 03:43:27 UTC
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 23:15:52 UTC
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-07 01:30:15 UTC
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.