Skip to content

Commit 3424d32

Browse files
author
Hauke Wintjen
committed
Adapt xsl to skip base classes which are not found
(and therefore have no name)
1 parent ab72dca commit 3424d32

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Customization/xsl/class.xsl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,22 @@
8484
<b class="+ topic/ph hi-d/b "><xsl:value-of select="replace(compoundname,'^.*::','')"/></b>
8585
<xsl:choose>
8686
<xsl:when test="basecompoundref/@refid">
87-
<xsl:variable name="extends" select="basecompoundref/@refid"/>
8887
<xsl:text> extends </xsl:text>
8988

9089
<xsl:for-each select="basecompoundref">
90+
<xsl:variable name="extends" select="@refid"/>
91+
<xsl:variable name="extends-name" select="//compounddef[@id=$extends]/compoundname"/>
92+
<xsl:if test="$extends-name">
93+
9194
<xsl:call-template name="add-link">
9295
<xsl:with-param name="type" select="'topic'"/>
9396
<xsl:with-param
9497
name="href"
95-
select="concat('#', dita-ot:name-to-id(//compounddef[@id=$extends]/compoundname))"
98+
select="concat('#', dita-ot:name-to-id($extends-name))"
9699
/>
97100
<xsl:with-param name="text" select="replace(.,'^.*\.','')"/>
98101
</xsl:call-template>
102+
</xsl:if>
99103
<xsl:if test="count(basecompoundref) &gt; 1">
100104
<xsl:text> </xsl:text>
101105
</xsl:if>

0 commit comments

Comments
 (0)