mirror of
https://github.com/boostorg/boostbook.git
synced 2025-05-11 13:23:59 +00:00
Add support for <headername>
[SVN r20249]
This commit is contained in:
parent
33a3dd5f63
commit
3d7beff32d
@ -83,7 +83,7 @@
|
|||||||
<!ELEMENT libraryinfo (author+, copyright*, legalnotice*, librarypurpose, librarycategory*)>
|
<!ELEMENT libraryinfo (author+, copyright*, legalnotice*, librarypurpose, librarycategory*)>
|
||||||
<!ATTLIST libraryinfo %boost.common.attrib;>
|
<!ATTLIST libraryinfo %boost.common.attrib;>
|
||||||
|
|
||||||
<!ELEMENT librarypurpose (#PCDATA|code|ulink|functionname|methodname|classname)*>
|
<!ELEMENT librarypurpose (#PCDATA|code|ulink|functionname|methodname|classname|macroname|headername)*>
|
||||||
<!ATTLIST librarypurpose %boost.common.attrib;>
|
<!ATTLIST librarypurpose %boost.common.attrib;>
|
||||||
|
|
||||||
<!ELEMENT librarycategory (#PCDATA)>
|
<!ELEMENT librarycategory (#PCDATA)>
|
||||||
@ -289,6 +289,12 @@
|
|||||||
<!ELEMENT functionname (#PCDATA)>
|
<!ELEMENT functionname (#PCDATA)>
|
||||||
<!ATTLIST functionname %boost.common.attrib;>
|
<!ATTLIST functionname %boost.common.attrib;>
|
||||||
|
|
||||||
|
<!ELEMENT macroname (#PCDATA)>
|
||||||
|
<!ATTLIST macroname %boost.common.attrib;>
|
||||||
|
|
||||||
|
<!ELEMENT headername (#PCDATA)>
|
||||||
|
<!ATTLIST headername %boost.common.attrib;>
|
||||||
|
|
||||||
<!ELEMENT copy-assignment
|
<!ELEMENT copy-assignment
|
||||||
(template?, type?, parameter*, %boost.function.semantics;)>
|
(template?, type?, parameter*, %boost.function.semantics;)>
|
||||||
<!ATTLIST copy-assignment
|
<!ATTLIST copy-assignment
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<xsl:key name="functions" match="function|overloaded-function" use="@name"/>
|
<xsl:key name="functions" match="function|overloaded-function" use="@name"/>
|
||||||
<xsl:key name="libraries" match="library" use="@name"/>
|
<xsl:key name="libraries" match="library" use="@name"/>
|
||||||
<xsl:key name="macros" match="macro" use="@name"/>
|
<xsl:key name="macros" match="macro" use="@name"/>
|
||||||
|
<xsl:key name="headers" match="header" use="@name"/>
|
||||||
|
|
||||||
<xsl:template match="classname" mode="annotation">
|
<xsl:template match="classname" mode="annotation">
|
||||||
<!-- Determine the (possibly qualified) class name we are looking for -->
|
<!-- Determine the (possibly qualified) class name we are looking for -->
|
||||||
@ -198,6 +199,42 @@
|
|||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="headername" mode="annotation">
|
||||||
|
<xsl:param name="name" select="text()"/>
|
||||||
|
|
||||||
|
<xsl:variable name="node" select="key('headers', $name)"/>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="count($node) = 0">
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:text>warning: cannot find header `</xsl:text>
|
||||||
|
<xsl:value-of select="$name"/>
|
||||||
|
<xsl:text>'</xsl:text>
|
||||||
|
</xsl:message>
|
||||||
|
<xsl:value-of select="$name"/>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<xsl:when test="count($node) = 1">
|
||||||
|
<xsl:call-template name="internal-link">
|
||||||
|
<xsl:with-param name="to">
|
||||||
|
<xsl:call-template name="generate.id">
|
||||||
|
<xsl:with-param name="node" select="$node"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:with-param>
|
||||||
|
<xsl:with-param name="text" select="$name"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:when>
|
||||||
|
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:text>error: header `</xsl:text>
|
||||||
|
<xsl:value-of select="$name"/>
|
||||||
|
<xsl:text>' is multiply defined.</xsl:text>
|
||||||
|
</xsl:message>
|
||||||
|
<xsl:value-of select="$node"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="text()" mode="annotation">
|
<xsl:template match="text()" mode="annotation">
|
||||||
<xsl:param name="highlight" select="false()"/>
|
<xsl:param name="highlight" select="false()"/>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -351,7 +351,7 @@ Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-o
|
|||||||
|
|
||||||
<!-- These DocBook elements have special meaning. Use the annotation mode -->
|
<!-- These DocBook elements have special meaning. Use the annotation mode -->
|
||||||
<xsl:template match="classname|methodname|functionname|libraryname|
|
<xsl:template match="classname|methodname|functionname|libraryname|
|
||||||
conceptname|macroname">
|
conceptname|macroname|headername">
|
||||||
<xsl:apply-templates select="." mode="annotation"/>
|
<xsl:apply-templates select="." mode="annotation"/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user