<xsl:copy>
<xsl:for-each select="@*">
<xsl:choose>
- <xsl:when test="name(.) != 'id'">
+ <xsl:when test="local-name(.) != 'id'">
<xsl:copy/>
</xsl:when>
<xsl:otherwise>
</xsl:param>
<xsl:variable name="content">
- <fo:inline xsl:use-attribute-sets="xref.properties">
- <xsl:choose>
- <xsl:when test="count(child::node()) > 0">
- <!-- If it has content, use it -->
- <xsl:apply-templates/>
- </xsl:when>
- <!-- look for an endterm -->
- <xsl:when test="@endterm">
- <xsl:variable name="etargets" select="key('id',@endterm)"/>
- <xsl:variable name="etarget" select="$etargets[1]"/>
- <xsl:choose>
- <xsl:when test="count($etarget) = 0">
- <xsl:message>
- <xsl:value-of select="count($etargets)"/>
- <xsl:text>Endterm points to nonexistent ID: </xsl:text>
- <xsl:value-of select="@endterm"/>
- </xsl:message>
- <xsl:text>???</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="$etarget" mode="endterm"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <!-- Use the xlink:href if no other text -->
- <xsl:when test="@xlink:href">
+ <xsl:choose>
+ <xsl:when test="count(child::node()) > 0">
+ <!-- If it has content, use it -->
+ <xsl:apply-templates/>
+ </xsl:when>
+ <!-- look for an endterm -->
+ <xsl:when test="@endterm">
+ <xsl:variable name="etargets" select="key('id',@endterm)"/>
+ <xsl:variable name="etarget" select="$etargets[1]"/>
+ <xsl:choose>
+ <xsl:when test="count($etarget) = 0">
+ <xsl:message>
+ <xsl:value-of select="count($etargets)"/>
+ <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+ <xsl:value-of select="@endterm"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$etarget" mode="endterm"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <!-- Use the xlink:href if no other text -->
+ <xsl:when test="@xlink:href">
<fo:inline hyphenate="false">
<xsl:call-template name="hyphenate-url">
<xsl:with-param name="url" select="@xlink:href"/>
</xsl:call-template>
</fo:inline>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>Link element has no content and no Endterm. </xsl:text>
- <xsl:text>Nothing to show in the link to </xsl:text>
- <xsl:value-of select="$target"/>
- </xsl:message>
- <xsl:text>???</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </fo:inline>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Link element has no content and no Endterm. </xsl:text>
+ <xsl:text>Nothing to show in the link to </xsl:text>
+ <xsl:value-of select="$target"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="styled.content">
+ <xsl:choose>
+ <xsl:when test="@xlink:role = $xolink.role">
+ <!-- olink styling handled by simple.xlink -->
+ <xsl:copy-of select="$content"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:inline xsl:use-attribute-sets="xref.properties">
+ <xsl:copy-of select="$content"/>
+ </fo:inline>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<xsl:call-template name="simple.xlink">
<xsl:with-param name="node" select="."/>
<xsl:with-param name="linkend" select="$linkend"/>
- <xsl:with-param name="content" select="$content"/>
+ <xsl:with-param name="content" select="$styled.content"/>
</xsl:call-template>
<!-- Add standard page reference? -->
<xsl:choose>
<!-- page numbering on link only enabled for @linkend -->
- <!-- There is no link element in DB5 with xlink:href -->
<xsl:when test="not($linkend)">
</xsl:when>
<!-- negative xrefstyle in instance turns it off -->