Author: paul
Date: 2006-05-10 06:52:16 +0200 (Wed, 10 May 2006)
New Revision: 2064
Log:
r10265@frost: paul | 2006-05-09 23:51:46 -0500
Account for <title> in admonitions.
Modified:
trunk/
trunk/xsl.d/dbk-texi.xsl
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7365
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10258
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:7365
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:10265
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:4886
Modified: trunk/xsl.d/dbk-texi.xsl
===================================================================
--- trunk/xsl.d/dbk-texi.xsl 2006-05-10 03:16:35 UTC (rev 2063)
+++ trunk/xsl.d/dbk-texi.xsl 2006-05-10 04:52:16 UTC (rev 2064)
@@ -471,26 +471,51 @@
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
-<!-- <note> -> newline + @strong{Note}: + newline + contents -->
-<!-- <caution>, <tip>, <warning>, <important>: similar -->
+<!--
+ Admonitions: <note>, <caution>, <tip>, <warning>, <important>
+ Handle as leading bold para that indicates admonition type
+ (overridden by <title> if present) plus following content
+-->
+
<xsl:template match="note|important|warning|caution|tip">
<xsl:value-of select="$newline"/>
<xsl:text>@strong{</xsl:text>
+ <!-- if title is present, use it; otherwise derive from element name -->
<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:otherwise>Note</xsl:otherwise>
+ <xsl:when test="title">
+ <xsl:value-of select="title"/>
+ </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:otherwise>Note</xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
</xsl:choose>
<xsl:text>}:</xsl:text>
<xsl:value-of select="$newline"/>
<xsl:apply-templates select="@* | node()"/>
</xsl:template>
+<!--
+ Templates to match and discard admonition titles. The title is
+ processed within the admonition-matching template by looking for
+ it explicitly, so these templates keep the the title from being
+ printed twice.
+-->
+<xsl:template match="note/title"/>
+<xsl:template match="important/title"/>
+<xsl:template match="warning/title"/>
+<xsl:template match="caution/title"/>
+<xsl:template match="tip/title"/>
+
+
<!-- <indexterm> -> @[cft]index + value of <primary>/<secondary/<tertiary> -->
<!--
Use the type attribute to determine what kind of index tag to use.
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r2064 - in trunk: . xsl.d | paul | 10 May |