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

Support root level grouping topicrefs #2092 #2648 #2614 #2683

Merged
merged 1 commit into from May 14, 2017

Conversation

Projects
None yet
2 participants
@robander
Member

robander commented May 10, 2017

The current PDF2 process assumes that if a root branch of a map has any real content, the root topicref of the branch will have either a title or reference a topic (or both). When that is not the case, the PDF is broken. If there is only the one root branch, FOP will crash (as reported in #2648). If there are "valid" root branches, the branch with a root grouping element will appear in the TOC + contents but not in the actual content.

Related, the much older issue #2092 has the same root cause -- it assumes that in a bookmap, any chapter, appendix, appendices, preface, or topicref (as child of front/back matter container) will either have a title or reference a topic. When that is not the case, results are the same as above.

In all of these cases, the code assumes that the container elements will reference a topic, and try to process the topic with <xsl:for-each select="key('topic-id', @id)"> (note that when there is only a title in the topicref / chapter / etc, the merge process generates a topic with that title, so the key-lookup still works). When the topic-id lookup fails, no page sequence is generated, and children are not processed.

The fix here checks to see if the topic-id returns anything. If the result is empty, it continues to any topicref children with the same mode. Additional grouping topicref elements do the same. If a topic is eventually found, a valid page sequence is generated, and normal processing continues at that point.

Just realized that this also addresses #2614.

Signed-off-by: Robert D Anderson robander@us.ibm.com

@robander robander added bug P2 pdf labels May 10, 2017

@robander robander added this to the 2.5 milestone May 10, 2017

@robander robander requested a review from jelovirt May 10, 2017

Support root level grouping topicrefs #2092 #2648
Signed-off-by: Robert D Anderson <robander@us.ibm.com>
@robander

This comment has been minimized.

Show comment
Hide comment
@robander

robander May 10, 2017

Member

Now updated based on review comments from @jelovirt

Member

robander commented May 10, 2017

Now updated based on review comments from @jelovirt

@robander robander changed the title from Support root level grouping topicrefs #2092 #2648 to Support root level grouping topicrefs #2092 #2648 #2614 May 10, 2017

@jelovirt jelovirt merged commit c530bdd into dita-ot:develop May 14, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@robander robander deleted the robander:hotfix/2092 branch May 16, 2017

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