Skip to content
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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/plugins/org.dita.pdf2/xsl/fo/links.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ See the accompanying LICENSE file for applicable license.
</xsl:when>
<!-- When the target has a short description and no local override, use the target -->
<xsl:when test="$element/*[contains(@class, ' topic/shortdesc ')]">
<fo:block xsl:use-attribute-sets="link__shortdesc">
<xsl:variable name="generatedShortdesc" as="element()*">
<xsl:apply-templates select="$element/*[contains(@class, ' topic/shortdesc ')]"/>
</xsl:variable>
<fo:block xsl:use-attribute-sets="link__shortdesc">
<xsl:apply-templates select="$generatedShortdesc" mode="dropCopiedIds"/>
</fo:block>
</xsl:when>
</xsl:choose>
Expand Down
1 change: 0 additions & 1 deletion src/main/plugins/org.dita.pdf2/xsl/fo/pr-domain.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ See the accompanying LICENSE file for applicable license.

<xsl:template match="*[contains(@class,' pr-d/pt ')]">
<fo:block xsl:use-attribute-sets="pt">
<xsl:call-template name="commonattributes"/>
<xsl:choose>
<xsl:when test="*"> <!-- tagged content - do not default to bold -->
<xsl:apply-templates select="." mode="inlineTextOptionalKeyref"/>
Expand Down
5 changes: 4 additions & 1 deletion src/main/plugins/org.dita.pdf2/xsl/fo/toc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ See the accompanying LICENSE file for applicable license.
</xsl:attribute>
<xsl:apply-templates select="$mapTopicref" mode="tocPrefix"/>
<fo:inline xsl:use-attribute-sets="__toc__title">
<xsl:call-template name="getNavTitle" />
<xsl:variable name="pulledNavigationTitle" as="node()*">
<xsl:call-template name="getNavTitle" />
</xsl:variable>
<xsl:apply-templates select="$pulledNavigationTitle" mode="dropCopiedIds"/>
</fo:inline>
<fo:inline xsl:use-attribute-sets="__toc__page-number">
<fo:leader xsl:use-attribute-sets="__toc__leader"/>
Expand Down
8 changes: 8 additions & 0 deletions src/main/plugins/org.dita.pdf2/xsl/fo/topic.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,14 @@ See the accompanying LICENSE file for applicable license.
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>

<!-- Templates to reprocess reused content while dropping IDs from reuse context -->
<xsl:template match="@id" mode="dropCopiedIds"/>
<xsl:template match="*|@*|text()" mode="dropCopiedIds">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()" mode="dropCopiedIds"/>
</xsl:copy>
</xsl:template>

<!-- Process common attributes -->
<xsl:template name="commonattributes">
Expand Down