|
Boost-Commit : |
From: fmhess_at_[hidden]
Date: 2007-11-29 10:47:10
Author: fmhess
Date: 2007-11-29 10:47:09 EST (Thu, 29 Nov 2007)
New Revision: 41463
URL: http://svn.boost.org/trac/boost/changeset/41463
Log:
Fixed problems with "purpose" elements inside "inherit" elements getting
dumped into the output, and added a warning if an "inherit" element has
no "type" child element.
Text files modified:
sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl 2007-11-29 10:47:09 EST (Thu, 29 Nov 2007)
@@ -529,7 +529,15 @@
<xsl:text> </xsl:text>
<!-- Output the type -->
- <xsl:apply-templates mode="annotation"/>
+ <xsl:apply-templates select="type" mode="annotation"/>
+ <!-- Make it still work if they left out the type element, to not break old (invalid) docs -->
+ <xsl:if test="not(type)">
+ <xsl:message>
+ <xsl:text>Warning: missing 'type' element inside 'inherit'</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="print.warning.context"/>
+ <xsl:apply-templates mode="annotation"/>
+ </xsl:if>
<!-- Output a comma if not at the end -->
<xsl:if test="position() < $n">
@@ -549,8 +557,8 @@
<xsl:call-template name="highlight-comment">
<xsl:with-param name="text">
<xsl:text>// </xsl:text>
- <xsl:apply-templates select="purpose/*|purpose/text()"
- mode="annotation"/>
+ <xsl:apply-templates select="purpose"
+ mode="comment"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
@@ -1210,7 +1218,7 @@
<xsl:call-template name="highlight-comment">
<xsl:with-param name="text">
<xsl:text>// </xsl:text>
- <xsl:apply-templates select="purpose/*|purpose/text()" mode="annotation"/>
+ <xsl:apply-templates select="purpose" mode="comment"/>
</xsl:with-param>
</xsl:call-template>
@@ -1435,10 +1443,7 @@
</xsl:call-template>
</term>
<listitem>
- <xsl:apply-templates
- select="purpose/*|purpose/text()|
- description/*|description/text()"
- mode="annotation"/>
+ <xsl:apply-templates select="purpose|description" mode="comment"/>
</listitem>
</varlistentry>
</xsl:if>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk