Author: paul
Date: 2007-03-22 20:11:49 +0100 (Thu, 22 Mar 2007)
New Revision: 5502
Log:
r22019@polar: paul | 2007-03-21 16:38:24 -0500
Get rid of a few name() tests.
Other minor reformatting.
Modified:
trunk/xsl.d/dbk-prep.xsl
trunk/xsl.d/dbk-texi.xsl
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:21973
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:18011
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:14593
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:22019
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:18011
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:14593
Modified: trunk/xsl.d/dbk-prep.xsl
===================================================================
--- trunk/xsl.d/dbk-prep.xsl 2007-03-22 15:33:56 UTC (rev 5501)
+++ trunk/xsl.d/dbk-prep.xsl 2007-03-22 19:11:49 UTC (rev 5502)
Changed blocks: 5, Lines Added: 39, Lines Deleted: 39; 5105 bytes
@@ -14,6 +14,12 @@
- Strip leading newline from body of <programlisting> and <screen>
elements. This helps reduce leading around listings in PDF output.
(Trailing newline seems not to matter.)
+ - 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
+ last line on which the comment occurs, which helps to prevent
+ extraneous blank lines in <programlisting> elements that contain
+ comments.
- Glossary entries are written using <glossxxx> elements. However,
these appear to cause problems for FOP (it simply quits with
"[ERROR] null" which is none too helpful). To
@@ -22,21 +28,15 @@
- <title> within <glossdiv> becomes the <title> of the <variablelist>.
- Map <glossentry>, <glossterm>, <glossdef> to <varlistentry>, <term>,
<listitem>.
- - Handle <refentry> elements differentially for manpage and non-manpage
- output. (Depends on the setting of the $map.refentry.to.section
- 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,
+ 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
- last line on which the comment occurs, which helps to prevent
- extraneous blank lines in <programlisting> elements that contain
- comments.
+ - Handle <refentry> elements differentially for manpage and non-manpage
+ output. (Depends on the setting of the $map.refentry.to.section
+ parameter.)
- Look for <remark role="repository.revision"/> and replace it with the
value of the $repository.revision parameter (which is passed in by
the command that invokes this stylesheet).
@@ -163,10 +163,6 @@
<!--
Map <qanda> elements to paragraphs
-
- The handling here is substandard. It's a quick job simply to keep
- <qanda> from killing FOP. There is no leading TOC of the questions,
- for example.
-->
<xsl:template match="qandaset">
@@ -202,17 +198,19 @@
</xsl:attribute>
<xsl:number
count="chapter|appendix|preface|section|qandaentry"
- level="multiple" format="1.1.1.1.1.1"
- />:<xsl:text> </xsl:text></link><xsl:for-each select="*">
- <xsl:choose>
- <xsl:when test="name() = 'para'">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ level="multiple" format="1.1.1.1.1.1"/>
+ <xsl:text>: </xsl:text>
+ </link>
+ <xsl:for-each select="*">
+ <xsl:choose>
+ <xsl:when test="self::para">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</para>
</listitem>
</xsl:template>
@@ -228,20 +226,22 @@
<emphasis role="bold">
<xsl:number
count="chapter|appendix|preface|section|qandaentry"
- level="multiple" format="1.1.1.1.1.1"/>:<xsl:text> </xsl:text></emphasis>
- <xsl:for-each select="*">
- <xsl:choose>
- <xsl:when test="name() = 'para'">
- <emphasis role="bold"><xsl:apply-templates/></emphasis>
- </xsl:when>
- <xsl:when test="name() = 'programlisting'">
- <xsl:apply-templates select="."/>
- </xsl:when>
- <xsl:otherwise>
- <emphasis role="bold"><xsl:apply-templates select="."/></emphasis>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ level="multiple" format="1.1.1.1.1.1"/>
+ <xsl:text>: </xsl:text>
+ </emphasis>
+ <xsl:for-each select="*">
+ <xsl:choose>
+ <xsl:when test="self::para">
+ <emphasis role="bold"><xsl:apply-templates/></emphasis>
+ </xsl:when>
+ <xsl:when test="self::programlisting">
+ <xsl:apply-templates select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <emphasis role="bold"><xsl:apply-templates select="."/></emphasis>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</para>
</xsl:template>
Modified: trunk/xsl.d/dbk-texi.xsl
===================================================================
--- trunk/xsl.d/dbk-texi.xsl 2007-03-22 15:33:56 UTC (rev 5501)
+++ trunk/xsl.d/dbk-texi.xsl 2007-03-22 19:11:49 UTC (rev 5502)
Changed blocks: 1, Lines Added: 5, Lines Deleted: 5; 998 bytes
@@ -519,11 +519,11 @@
</xsl:when>
<xsl:otherwise>
<xsl:choose>
- <xsl:when test="local-name(.)='note'">Note</xsl:when>
- <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
- <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
- <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
- <xsl:when test="local-name(.)='important'">Important</xsl:when>
+ <xsl:when test="self::note">Note</xsl:when>
+ <xsl:when test="self::warning">Warning</xsl:when>
+ <xsl:when test="self::caution">Caution</xsl:when>
+ <xsl:when test="self::tip">Tip</xsl:when>
+ <xsl:when test="self::important">Important</xsl:when>
<xsl:otherwise>Note</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r5502 - in trunk: . xsl.d | paul | 22 Mar |