Boost logo

Boost-Commit :

From: fmhess_at_[hidden]
Date: 2007-10-08 19:33:02


Author: fmhess
Date: 2007-10-08 19:33:02 EDT (Mon, 08 Oct 2007)
New Revision: 39824
URL: http://svn.boost.org/trac/boost/changeset/39824

Log:
Eliminated possibility of generating empty <itemizedlist> (seen in
docbook file generated for concept-check library), which is
invalid docbook.

Text files modified:
   sandbox/boost_docs/trunk/tools/boostbook/xsl/caramel/concept2docbook.xsl | 35 +++++++++++++++++------------------
   1 files changed, 17 insertions(+), 18 deletions(-)

Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/caramel/concept2docbook.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/caramel/concept2docbook.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/caramel/concept2docbook.xsl 2007-10-08 19:33:02 EDT (Mon, 08 Oct 2007)
@@ -382,26 +382,25 @@
       </refsect1>
     </xsl:if>
 
- <xsl:variable name="see-also-list" select="concept-ref | see-also | refines | refines-when-mutable | models-as-first-arg | models | models-when-mutable"/>
+ <xsl:variable name="see-also-list-0" select="concept-ref | see-also | refines | refines-when-mutable | models-as-first-arg | models | models-when-mutable"/>
+ <xsl:variable name="see-also-list-1" select="$see-also-list-0[string(@name | @concept) != string(../@name)]"/>
+ <xsl:variable name="see-also-list" select="$see-also-list-1[not(string(@name|@concept) = (preceding::*/@name | preceding::*/@concept | ancestor::*/@name | ancestor::*/@concept))]"/>
     <xsl:if test="$see-also-list">
       <refsect1>
- <title>See also</title>
- <itemizedlist>
- <xsl:for-each select="$see-also-list">
- <xsl:sort select="string(@name|@concept)" data-type="text"/>
- <xsl:if test="string(@name|@concept) != string(../@name)">
- <xsl:if test="not(string(@name|@concept) = (preceding::*/@name | preceding::*/@concept | ancestor::*/@name | ancestor::*/@concept))">
- <listitem>
- <para>
- <xsl:call-template name="concept.link">
- <xsl:with-param name="name" select="@name|@concept"/>
- </xsl:call-template>
- </para>
- </listitem>
- </xsl:if>
- </xsl:if>
- </xsl:for-each>
- </itemizedlist>
+ <title>See also</title>
+ <itemizedlist>
+ <xsl:for-each select="$see-also-list">
+ <xsl:sort select="string(@name|@concept)" data-type="text"/>
+ <xsl:variable name="have-listitems" select="1"/>
+ <listitem>
+ <para>
+ <xsl:call-template name="concept.link">
+ <xsl:with-param name="name" select="@name|@concept"/>
+ </xsl:call-template>
+ </para>
+ </listitem>
+ </xsl:for-each>
+ </itemizedlist>
       </refsect1>
     </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