New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop duplicate IDs from topic.fo #2985

Merged
merged 2 commits into from Jun 2, 2018

Conversation

Projects
2 participants
@robander
Member

robander commented Jun 1, 2018

Description

Removes duplicate IDs from topic.fo that appear either in reused content or as a bug on <pt> processing.

Motivation and Context

Building DITA-OT docs to PDF results in a lot of duplicate ID warnings, such as:

      [fop] WARNING: Property ID "unique_106_Connect_42_shortdesc" (found on "fo:block") previously used; ID values must be unique within a document! Any reference to it will be considered a reference to the first occurrence in the document. (See position 4981:760)

These appear for three reasons:

  • When an element inside of a topic title uses @id, the ID appears inside the title text in both the TOC and in the actual document context.
  • When a short description or element inside the shortdesc uses @id, that ID appears in any context where that shortdesc is copied with a link.
  • When <pt> uses @id, there is a bug that results in the ID being added to both <fo:block> and to the <fo:inline> that wraps everything inside that block (because commonattributes is called from both contexts).

The fix for the first two issues is one we've been using for a few weeks now; it places the short description (in link context) or the title (in TOC context) into a variable, and then writes that variable into the FO file while dropping any @id.

The fix for the third issue is just to ensure commonattributes gets called only once.

How Has This Been Tested?

Build DITA-OT docs to PDF; all duplicate ID errors are removed, and the PDF is still good.

Type of Changes

  • Bug fix (non-breaking change which fixes an issue)

Note -- this pull request builds on 2984 which is also aimed at the 3.1 release, which is why a few seemingly unrelated commits show up first at this point.

@robander robander self-assigned this Jun 1, 2018

@robander robander added this to To Do in 3.1 via automation Jun 1, 2018

@robander robander requested a review from jelovirt Jun 1, 2018

@robander robander moved this from To Do to Review in 3.1 Jun 1, 2018

robander added some commits Jun 1, 2018

Drop duplicate IDs from reused content
Signed-off-by: Robert D Anderson <robander@us.ibm.com>
Drop duplicate ID for parm term
Signed-off-by: Robert D Anderson <robander@us.ibm.com>

@jelovirt jelovirt merged commit 7677706 into dita-ot:develop Jun 2, 2018

2 checks passed

DCO All commits have a DCO sign-off from the author
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

3.1 automation moved this from Review to Done Jun 2, 2018

@jelovirt jelovirt added this to the Next milestone Jun 2, 2018

@robander robander deleted the robander:hotfix/duplicateid branch Jun 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment