mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 23:13:58 +00:00
Support alt attribute for libraryname element
[SVN r20776]
This commit is contained in:
parent
075fcc3cbd
commit
6dacc29300
@ -137,19 +137,30 @@
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="libraryname" mode="annotation">
|
||||
<xsl:variable name="name" select="text()"/>
|
||||
<xsl:variable name="name">
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="node" select="key('libraries', $name)"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($node)=0">
|
||||
<xsl:message>
|
||||
Cannot find library '<xsl:value-of select="$name"/>'
|
||||
<xsl:text>warning: Cannot find library '</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="library.link">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
<xsl:with-param name="name" select="text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
<xsl:template name="library.link">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:param name="name" select="$node/attribute::name"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$node/attribute::html-only = 1">
|
||||
@ -34,7 +35,7 @@
|
||||
<xsl:attribute name="url">
|
||||
<xsl:value-of select="$url"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="$node/attribute::name"/>
|
||||
<xsl:value-of select="$name"/>
|
||||
</ulink>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@ -51,7 +52,7 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="string($node/attribute::name)"/>
|
||||
<xsl:with-param name="text" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
Loading…
x
Reference in New Issue
Block a user