filter <indexterm> elements when computing <xref> target text for pdf2
#4030
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: chrispy chrispy@synopsys.com
Description
When an
<xref>
computes target text from content that contains an<indexterm>
element, preprocessing filters index term text when computing the target text. However, thepdf2
transformation recomputes new target text, and this recomputation also needed to filter out index term text in a couple more cases.This probably stems from the fact that these elements don't directly allow
<indexterm>
in their content models, but they do allow<ph>
, which in turn allows<indexterm>
.Motivation and Context
Fixes #4017.
How Has This Been Tested?
I tested the
pdf2
transformation with the following topic: topic.zipThe test topic is as follows:
Type of Changes
In
links.xsl
,The
topic/dt
template called amode="text-only"
template, but I think this was intended to bemode="dita-ot:text-only"
. This mode also did not work correctly, butmode="insert-text"
(which the other templates used) did.The
topic/title
template used<xsl:value-of>
to perform a plaintext evaluation of the title. This template was updated to usemode="insert-text"
.In
tables.xsl
,The
mode="insert-text"
template was updated to filter out elements in theopentopic-index:*
namespace.(Why are the text evaluation templates in a table-related file?)
Documentation and Compatibility
A release notes mention is sufficient.
This change should not adversely affect any existing plugins or flows.
Checklist
I do not think there are any unit tests for
pdf2
PDF output.