Skip to content

Commit

Permalink
in topicpull, update "copy-shortdesc" template to also process @href
Browse files Browse the repository at this point in the history
…values with "/" characters

Signed-off-by: chrispy <[email protected]>
  • Loading branch information
chrispy-snps authored and jelovirt committed Jan 13, 2024
1 parent 5a78b65 commit b16c7cc
Showing 1 changed file with 3 additions and 23 deletions.
26 changes: 3 additions & 23 deletions src/main/plugins/org.dita.base/xsl/preprocess/topicpullImpl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1258,29 +1258,9 @@ mode="topicpull:figure-linktext" and mode="topicpull:table-linktext"
<xsl:template match="*[contains(@class,' topic/fn ')]" mode="dita-ot:text-only"/>

<xsl:template match="*[contains(@class,' topic/xref ')]" mode="copy-shortdesc">
<xsl:choose>
<xsl:when test="empty(@href) or @scope='peer' or @scope='external'">
<xsl:copy>
<xsl:apply-templates select="@*|text()|*" mode="#current" />
</xsl:copy>
</xsl:when>
<xsl:when test="@format and not(@format='dita')">
<xsl:copy>
<xsl:apply-templates select="@*|text()|*" mode="#current" />
</xsl:copy>
</xsl:when>
<xsl:when test="not(contains(@href,'/'))"><!-- May be DITA, but in the same directory -->
<xsl:copy>
<xsl:apply-templates select="@*|text()|*" mode="#current" />
</xsl:copy>
</xsl:when>
<xsl:when test="text()|*[not(contains(@class,' topic/desc '))]">
<xsl:apply-templates select="*[not(contains(@class,' topic/desc '))]|text()|comment()|processing-instruction()" mode="#current" />
</xsl:when>
<xsl:otherwise>
<xsl:text>***</xsl:text><!-- go get the target text -->
</xsl:otherwise>
</xsl:choose>
<xsl:copy>
<xsl:apply-templates select="@*|text()|*" mode="#current"/>
</xsl:copy>
</xsl:template>

<xsl:template match="text()" mode="copy-shortdesc">
Expand Down

0 comments on commit b16c7cc

Please sign in to comment.