mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-09 02:43:58 +00:00
source-highlight.xsl:
- Add a "highlight" mode that should do source highlighting properly type.xsl: - Use "highlight" mode for typedef types. [SVN r19844]
This commit is contained in:
parent
ac210c754d
commit
79cf01a36d
@ -122,4 +122,37 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="highlight">
|
||||
<xsl:element name="{name(.)}">
|
||||
<xsl:for-each select="./@*">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name(.)='last-revision'">
|
||||
<xsl:attribute
|
||||
name="rev:last-revision"
|
||||
namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
|
||||
>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:attribute name="{name(.)}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates mode="highlight"/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()" mode="highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="classname|methodname|functionname|libraryname|
|
||||
conceptname" mode="highlight">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
@ -245,11 +245,15 @@ Unknown type element "<xsl:value-of select="local-name(.)"/>" in type.display.na
|
||||
<xsl:value-of select="@type"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="type/*|type/text()"
|
||||
mode="highlight"/>
|
||||
<!--
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:apply-templates select="type/*|type/text()"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:call-template>
|
||||
-->
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user