[boostbook] Paragraphs in purpose tags

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[boostbook] Paragraphs in purpose tags

Daniel James
Hi,

It seems that in boostbook code, <purpose> shouldn't really contain
paragraphs, but in quite a few cases they do which leads to paragraphs
inside paragraphs in some of the generated documentation. For an
example, see:

http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/boost/any_cast.html

which contains the invalid code:

<p>boost::any_cast &#8212; <p>Custom keyword cast for extracting a value
           of a given type from an
           <tt class="computeroutput"><a href="any.html" title="Class
any">any</a></tt>.</p></p>

This is invalid because <p> tags can't be nested. There are lots of
other examples of the same problem.

The funny thing is that boostbook already contains code for stripping
the paragraphs out - but it doesn't get called. Does anyone know if
there's a reason for this? Maybe to give authors more control over the
generated documentation...

Anyway, I've attached a patch which turns it on in this case, I think
there might be other places in the boostbook code where it's
appropriate, but I haven't looked into it yet.

Does the patch look okay?

Daniel

Index: docbook.xsl
===================================================================
RCS file: /cvsroot/boost/boost/tools/boostbook/xsl/docbook.xsl,v
retrieving revision 1.23
diff -u -r1.23 docbook.xsl
--- docbook.xsl 3 May 2007 16:45:24 -0000 1.23
+++ docbook.xsl 20 Jun 2007 22:36:48 -0000
@@ -291,7 +291,7 @@
       <refnamediv>
         <refname><xsl:value-of select="$refname"/></refname>
         <refpurpose>
-  <xsl:apply-templates mode="annotation" select="$purpose"/>
+  <xsl:apply-templates mode="purpose" select="$purpose"/>
  </refpurpose>
       </refnamediv>
       <refsynopsisdiv>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-docs mailing list
[hidden email]
Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs
Reply | Threaded
Open this post in threaded view
|

Re: [boostbook] Paragraphs in purpose tags

Matias Capeletto
Daniel James wrote:
> Anyway, I've attached a patch which turns it on in this case, I think
> there might be other places in the boostbook code where it's
> appropriate, but I haven't looked into it yet.
>
> Does the patch look okay?

It looks fine, if it solves this problem and not generate any other I
add it to the new boostbook xsl.

Regards
Matias

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-docs mailing list
[hidden email]
Unsubscribe and other administrative requests: https://lists.sourceforge.net/lists/listinfo/boost-docs