Boost logo

Boost-Commit :

From: fmhess_at_[hidden]
Date: 2007-10-15 09:46:24


Author: fmhess
Date: 2007-10-15 09:46:23 EDT (Mon, 15 Oct 2007)
New Revision: 40050
URL: http://svn.boost.org/trac/boost/changeset/40050

Log:
Stop quickbook from generating empty <calloutlist>
elements (which is invalid docbook and causes apache fop 0.94 to
choke and die).

Text files modified:
   trunk/tools/quickbook/detail/actions.cpp | 29 ++++++++++++++++-------------
   1 files changed, 16 insertions(+), 13 deletions(-)

Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2007-10-15 09:46:23 EDT (Mon, 15 Oct 2007)
@@ -935,21 +935,24 @@
                 snippet += "\n\n```\n" + code + "```\n\n";
             }
 
- snippet += "'''<calloutlist>'''";
- for (size_t i = 0; i < callouts.size(); ++i)
+ if(callouts.size() > 0)
             {
- snippet += "'''<callout arearefs=\"";
- snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "co\" ";
- snippet += "id=\"";
- snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "\">";
- snippet += "'''";
-
- snippet += "'''<para>'''";
- snippet += callouts[i];
- snippet += "'''</para>'''";
- snippet += "'''</callout>'''";
+ snippet += "'''<calloutlist>'''";
+ for (size_t i = 0; i < callouts.size(); ++i)
+ {
+ snippet += "'''<callout arearefs=\"";
+ snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "co\" ";
+ snippet += "id=\"";
+ snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "\">";
+ snippet += "'''";
+
+ snippet += "'''<para>'''";
+ snippet += callouts[i];
+ snippet += "'''</para>'''";
+ snippet += "'''</callout>'''";
+ }
+ snippet += "'''</calloutlist>'''";
             }
- snippet += "'''</calloutlist>'''";
         }
 
         std::vector<std::string> tinfo;


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