List:Commits« Previous MessageNext Message »
From:paul Date:November 21 2006 3:20am
Subject:svn commit - mysqldoc@docsrva: r3995 - in trunk: . xsl.d
View as plain text  
Author: paul
Date: 2006-11-21 04:20:19 +0100 (Tue, 21 Nov 2006)
New Revision: 3995

Log:
 r12489@frost:  paul | 2006-11-20 21:16:07 -0600
 Simplify some XSL transforms by removing no-longer-used elements.


Modified:
   trunk/xsl.d/dbk-prep.xsl
   trunk/xsl.d/dbk-texi.xsl
   trunk/xsl.d/make-toc-entries.xsl
   trunk/xsl.d/make-toc.xsl

Property changes on: trunk
___________________________________________________________________
Name: svk:merge
   - 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:15992
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:12487
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:11757
   + 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:15992
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:12489
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:11757


Modified: trunk/xsl.d/dbk-prep.xsl
===================================================================
--- trunk/xsl.d/dbk-prep.xsl	2006-11-21 03:10:43 UTC (rev 3994)
+++ trunk/xsl.d/dbk-prep.xsl	2006-11-21 03:20:19 UTC (rev 3995)
Changed blocks: 2, Lines Added: 4, Lines Deleted: 4; 1709 bytes

@@ -197,11 +197,11 @@
           <xsl:attribute name="linkend">
             <xsl:text>qandaitem-</xsl:text>
             <xsl:number
-              count="chapter|appendix|preface|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]|qandaentry"
+              count="chapter|appendix|preface|section|qandaentry"
               level="multiple" format="1-1-1-1-1-1"/>
           </xsl:attribute>
           <xsl:number
-            count="chapter|appendix|preface|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]|qandaentry"
+            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>

@@ -222,12 +222,12 @@
       <xsl:attribute name="id">
         <xsl:text>qandaitem-</xsl:text>
         <xsl:number
-          count="chapter|appendix|preface|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]|qandaentry"
+          count="chapter|appendix|preface|section|qandaentry"
           level="multiple" format="1-1-1-1-1-1"/>
       </xsl:attribute>
       <emphasis role="bold">
         <xsl:number
-          count="chapter|appendix|preface|section|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]|qandaentry"
+          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>


Modified: trunk/xsl.d/dbk-texi.xsl
===================================================================
--- trunk/xsl.d/dbk-texi.xsl	2006-11-21 03:10:43 UTC (rev 3994)
+++ trunk/xsl.d/dbk-texi.xsl	2006-11-21 03:20:19 UTC (rev 3995)
Changed blocks: 6, Lines Added: 9, Lines Deleted: 34; 4343 bytes

@@ -87,7 +87,7 @@
 The tests that determine whether there is a following or preceding
 sibling assume that for a given structural element, only other structural
 elements of the same type appear at the given element's level.  For
-example, for a <sect2>, only <sect2> appears at that level.  For purposes
+example, for a <section>, only <section> appears at that level.  For purposes
 of these comparisons, <chapter> and <appendix> are siblings.
 -->
 

@@ -95,12 +95,7 @@
   <xsl:variable name="depth"
                 select="count(ancestor-or-self::chapter|
                               ancestor-or-self::appendix|
-                              ancestor-or-self::section|
-                              ancestor-or-self::sect1|
-                              ancestor-or-self::sect2|
-                              ancestor-or-self::sect3|
-                              ancestor-or-self::sect4|
-                              ancestor-or-self::sect5)"/>
+                              ancestor-or-self::section)"/>
   <xsl:variable name="type">
     <xsl:choose>
       <xsl:when test="ancestor-or-self::chapter">

@@ -164,20 +159,10 @@
     <xsl:choose>
       <xsl:when test="following-sibling::chapter|
                       following-sibling::appendix|
-                      following-sibling::section|
-                      following-sibling::sect1|
-                      following-sibling::sect2|
-                      following-sibling::sect3|
-                      following-sibling::sect4|
-                      following-sibling::sect5">
+                      following-sibling::section">
         <xsl:value-of select="(following-sibling::chapter|
                              following-sibling::appendix|
-                             following-sibling::section|
-                             following-sibling::sect1|
-                             following-sibling::sect2|
-                             following-sibling::sect3|
-                             following-sibling::sect4|
-                             following-sibling::sect5)[1]/@id"/>
+                             following-sibling::section)[1]/@id"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:text> </xsl:text>

@@ -195,20 +180,10 @@
     <xsl:choose>
       <xsl:when test="preceding-sibling::chapter|
                       preceding-sibling::appendix|
-                      preceding-sibling::section|
-                      preceding-sibling::sect1|
-                      preceding-sibling::sect2|
-                      preceding-sibling::sect3|
-                      preceding-sibling::sect4|
-                      preceding-sibling::sect5">
+                      preceding-sibling::section">
         <xsl:value-of select="(preceding-sibling::chapter|
                              preceding-sibling::appendix|
-                             preceding-sibling::section|
-                             preceding-sibling::sect1|
-                             preceding-sibling::sect2|
-                             preceding-sibling::sect3|
-                             preceding-sibling::sect4|
-                             preceding-sibling::sect5)[last()]/@id"/>
+                             preceding-sibling::section)[last()]/@id"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:value-of select="$up"/>

@@ -247,11 +222,11 @@
 
 <xsl:template name="generate-menu">
 
-  <xsl:if test="chapter|appendix|section|sect1|sect2|sect3|sect4|sect5">
+  <xsl:if test="chapter|appendix|section">
     <xsl:value-of select="$newline"/>
     <xsl:text>@menu</xsl:text>
     <xsl:value-of select="$newline"/>
-    <xsl:for-each select="chapter|appendix|section|sect1|sect2|sect3|sect4|sect5">
+    <xsl:for-each select="chapter|appendix|section">
       <xsl:text>* </xsl:text>
       <xsl:value-of select="@id"/>
       <xsl:text>::  </xsl:text>

@@ -344,7 +319,7 @@
   <xsl:value-of select="$newline"/>
 </xsl:template>
 
-<xsl:template match="chapter|appendix|section|sect1|sect2|sect3|sect4|sect5">
+<xsl:template match="chapter|appendix|section">
   <xsl:call-template name="generate-node"/>
   <xsl:call-template name="generate-menu"/>
   <xsl:apply-templates select="@* | node()"/>


Modified: trunk/xsl.d/make-toc-entries.xsl
===================================================================
--- trunk/xsl.d/make-toc-entries.xsl	2006-11-21 03:10:43 UTC (rev 3994)
+++ trunk/xsl.d/make-toc-entries.xsl	2006-11-21 03:20:19 UTC (rev 3995)
Changed blocks: 6, Lines Added: 1, Lines Deleted: 23; 2657 bytes

@@ -12,8 +12,7 @@
   Root element is <toc-entries>.  Within the root, generate <toc-entry>
   elements from title elements of part, chapter, appendix, section,
   elements.  (Also handles subsection and subsubsection as used in the
-  4.0 Study Guide, and sect1 through sect5, which may still be present
-  in some older documents.)
+  4.0 Study Guide.)
 
   Each <toc-entry> element contains:
   - a <toc-section-type> element indicating the section type ("Chapter",

@@ -63,11 +62,6 @@
       <xsl:text>Appendix</xsl:text>
     </xsl:when>
     <xsl:when test="self::section
-                   |self::sect1
-                   |self::sect2
-                   |self::sect3
-                   |self::sect4
-                   |self::sect5
                    |self::subsection
                    |self::subsubsection">
       <xsl:text>Section</xsl:text>

@@ -90,7 +84,6 @@
   This numbers chapters (with numbers) and appendixes (with letters).
   Within chapters and appendixes, it also numbers:
   - section
-  - sect1 through sect5
   - subsection, subsubsection (used in 4.0 Study Guide)
 
   Chapters are numbered with "any" so that numbering increases across

@@ -112,11 +105,6 @@
       <xsl:number count="chapter" level="any" format="1"/>
       <xsl:if test="ancestor::chapter">
         <xsl:number count="section
-                          |sect1
-                          |sect2
-                          |sect3
-                          |sect4
-                          |sect5
                           |subsection
                           |subsubsection"
             level="multiple"

@@ -127,11 +115,6 @@
       <xsl:number count="appendix" level="any" format="A"/>
       <xsl:if test="ancestor::appendix">
         <xsl:number count="section
-                          |sect1
-                          |sect2
-                          |sect3
-                          |sect4
-                          |sect5
                           |subsection
                           |subsubsection"
             level="multiple"

@@ -157,11 +140,6 @@
                          |//appendix
                          |//example
                          |//section
-                         |//sect1
-                         |//sect2
-                         |//sect3
-                         |//sect4
-                         |//sect5
                          |//subsection
                          |//subsubsection">
       <toc-entry id="{@id}">


Modified: trunk/xsl.d/make-toc.xsl
===================================================================
--- trunk/xsl.d/make-toc.xsl	2006-11-21 03:10:43 UTC (rev 3994)
+++ trunk/xsl.d/make-toc.xsl	2006-11-21 03:20:19 UTC (rev 3995)
Changed blocks: 2, Lines Added: 3, Lines Deleted: 4; 1127 bytes

@@ -8,7 +8,6 @@
 - chapter
 - appendix
 - section
-- sect[1-5]
 
 All titles but those from book or preface are numbered.  Any formatting
 within a title is ignored (markup is stripped).

@@ -98,17 +97,17 @@
   </xsl:if>
   <xsl:apply-templates select="title"/>
   <!-- Do the chapter/appendix contents -->
-  <xsl:apply-templates select="section[@id]|sect1[@id]"/>
+  <xsl:apply-templates select="section[@id]"/>
 </xsl:template>
 
 <!-- Various section levels -->
 
-<xsl:template match="section[@id]|sect1[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]">
+<xsl:template match="section[@id]">
   <xsl:apply-templates select="title">
     <xsl:with-param name="indent" select="' '"/>
   </xsl:apply-templates>
   <!-- work on whatever's beneath -->
-  <xsl:apply-templates select="section[@id]|sect2[@id]|sect3[@id]|sect4[@id]|sect5[@id]"/>
+  <xsl:apply-templates select="section[@id]"/>
 </xsl:template>
 
 </xsl:stylesheet>


Thread
svn commit - mysqldoc@docsrva: r3995 - in trunk: . xsl.dpaul21 Nov