List:Internals« Previous MessageNext Message »
From:paul Date:July 27 2005 12:52pm
Subject:bk commit - mysqldoc@docsrva tree (paul:1.3140)
View as plain text  
Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.3140 05/07/27 07:52:12 paul@stripped +1 -0
  dbk-prep.xsl:
    Map <qandaset> elements to numbered paras so that
    FOP doesn't die a horrible death.

  xsl.d/dbk-prep.xsl
    1.9 05/07/27 07:51:32 paul@stripped +42 -2
    Map <qandaset> elements to numbered paras so that
    FOP doesn't die a horrible death.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	paul
# Host:	frost.snake.net
# Root:	/Volumes/frost2/MySQL/bk/mysqldoc

--- 1.8/xsl.d/dbk-prep.xsl	2005-07-20 18:36:18 -05:00
+++ 1.9/xsl.d/dbk-prep.xsl	2005-07-27 07:51:32 -05:00
@@ -19,6 +19,12 @@
     <listitem>.
 - Handle <refentry> elements differentially for manpage and non-manpage
   output. (Depends on the setting of the $generate.manpages parameter.)
+- The <qandaset> elements cause problems for FOP (the symptom is
+  that it terminates after writing a message like "The id "id830898"
+  already exists in this document".  This error occurs unpredictably,
+  except that it is associated with the use of Q/A constructs.  To
+  make the problem go away, we map <qandaset>, <qandaentry>, <question>,
+  <answer> to simple numbered paragraphs.
 - Strip comments (by not processing them).  Also, if the comment is
   followed by a text node that begins with a newline, remove the
   newline as well.  The effect of that is to completely remove the
@@ -84,8 +90,8 @@
   One additional subtlety:
 
   In a manual page, the first section typically is a general description.
-  For non-manpage production, write out this information without write
-  any <section> tags.  That way, we don't have:
+  For non-manpage production, write out this information with the
+  <section> (and <title>) tags stripped.  That way, we don't have:
 
   <section>
    <title>program-name - program-purpose</title>
@@ -181,6 +187,40 @@
       </refsection>
     </xsl:otherwise>
   </xsl:choose>
+</xsl:template>
+
+<!--
+  Map <qanda> elements to paragraphs
+
+  The handling here is substandard.  It's a quick job simply to get
+  <qanda> from killing FOP.  There is no leading TOC of the questions,
+  for example.
+-->
+
+<xsl:template match="qandaset">
+  <xsl:apply-templates select="qandadiv/qandaentry/question
+                              |qandaentry/question
+                              |qandadiv/qandaentry/answer
+                              |qandaentry/answer"/>
+</xsl:template>
+
+<xsl:template match="question">
+  <para>
+    <emphasis role="bold">
+      <xsl:number
+             count="chapter|appendix|preface|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]|qandaentry"
+             level="multiple"
+             format="1.1.1.1.1.1"
+             />:
+    </emphasis>
+  </para>
+  <para>Question:</para>
+  <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="answer">
+  <para>Answer:</para>
+  <xsl:apply-templates/>
 </xsl:template>
 
 <!--
Thread
bk commit - mysqldoc@docsrva tree (paul:1.3140)paul27 Jul