db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chaa...@apache.org
Subject svn commit: r1298138 - /db/derby/docs/trunk/lib/dita2htmlImpl.xsl
Date Wed, 07 Mar 2012 21:35:53 GMT
Author: chaase3
Date: Wed Mar  7 21:35:53 2012
New Revision: 1298138

URL: http://svn.apache.org/viewvc?rev=1298138&view=rev
Log:
DERBY-5640  Use <desc> element for table summary

Modified lib/dita2htmlImpl.xsl (contributed by Raymond Gallardo of Oracle); edited two Getting
Started topics to show success of change.

Patch: DERBY-5640.diff


Modified:
    db/derby/docs/trunk/lib/dita2htmlImpl.xsl

Modified: db/derby/docs/trunk/lib/dita2htmlImpl.xsl
URL: http://svn.apache.org/viewvc/db/derby/docs/trunk/lib/dita2htmlImpl.xsl?rev=1298138&r1=1298137&r2=1298138&view=diff
==============================================================================
--- db/derby/docs/trunk/lib/dita2htmlImpl.xsl (original)
+++ db/derby/docs/trunk/lib/dita2htmlImpl.xsl Wed Mar  7 21:35:53 2012
@@ -1398,17 +1398,14 @@
  <xsl:call-template name="setaname"/>
 
  <!-- Fix this; this table has no summary -->
-
-
+ <!-- FIXED: The summary of the table is desc, or title if desc doesn't exist -->
 
  <table cellpadding="4" cellspacing="0">
 
    <xsl:attribute name="summary">
-     <xsl:call-template name="CREATE-CAPTION-TEXT"/>
+     <xsl:call-template name="CREATE-SUMMARY-TEXT"/>
    </xsl:attribute>
 
-
-
   <xsl:variable name="colsep">
     <xsl:choose>
       <xsl:when test="*[contains(@class,' topic/tgroup ')]/@colsep"><xsl:value-of
select="*[contains(@class,' topic/tgroup ')]/@colsep"/></xsl:when>
@@ -2081,7 +2078,7 @@
 
   <table cellpadding="4" cellspacing="0">
      <xsl:attribute name="summary">
-       <xsl:call-template name="CREATE-CAPTION-TEXT"/>
+       <xsl:call-template name="CREATE-SUMMARY-TEXT"/>
      </xsl:attribute>
 
 
@@ -3461,7 +3458,7 @@
   </xsl:if>
 </xsl:template>
 
-<xsl:template name="CREATE-CAPTION-TEXT">
+<xsl:template name="CREATE-SUMMARY-TEXT">
   <xsl:param name="stringName"/>
   <xsl:variable name="tbl-count">                  <!-- Number of table/title's
before this one -->
     <xsl:number count="*/*[contains(@class,' topic/table ')]/*[contains(@class,' topic/title
')]" level="any"/>
@@ -3482,9 +3479,15 @@
 
   <xsl:choose>
 
-    <!-- title -or- title & desc -->
-    <xsl:when test="*[contains(@class,' topic/title ')]">
+    <!-- desc or title (if desc does't exist) -->
+    <xsl:when test="*[contains(@class,' topic/desc ')]">
+      <xsl:apply-templates select="./*[contains(@class,' topic/desc ')]" mode="tabledesc"/>
+    </xsl:when>
+    
+    <xsl:otherwise>
+
       <xsl:choose>     <!-- Hungarian: "1. Table " -->
+      
         <xsl:when test="( (string-length($ancestorlang)=5 and contains($ancestorlang,'hu-hu'))
or (string-length($ancestorlang)=2 and contains($ancestorlang,'hu')) )">
           <!-- Change all value-of to concat($CAPTION-TEXT, ...) -->
           <xsl:value-of select="$tbl-count-actual"/><xsl:text>. </xsl:text>
@@ -3492,30 +3495,24 @@
               <xsl:with-param name="stringName" select="'Table'"/>
             </xsl:call-template><xsl:text> </xsl:text>
         </xsl:when>
+        
         <xsl:otherwise>
           <xsl:call-template name="getString">
             <xsl:with-param name="stringName" select="'Table'"/>
           </xsl:call-template><xsl:text> </xsl:text><xsl:value-of select="$tbl-count-actual"/><xsl:text>.
</xsl:text>
         </xsl:otherwise>
+        
       </xsl:choose>
 
        <xsl:apply-templates select="./*[contains(@class,' topic/title ')]" mode="tabletitle"/>
-       <xsl:if test="*[contains(@class,' topic/desc ')]">
-         <xsl:text>. </xsl:text>
-         <xsl:apply-templates select="./*[contains(@class,' topic/desc ')]" mode="tabledesc"/>
-       </xsl:if>
-    </xsl:when>
-
-    <!-- desc -->
-    <xsl:when test="*[contains(@class,' topic/desc ')]">
-      <xsl:apply-templates select="./*[contains(@class,' topic/desc ')]" mode="tabledesc"/>
-    </xsl:when>
+    </xsl:otherwise>
 
   </xsl:choose>
 
 </xsl:template>
 
 
+
 <!-- table caption -->
 <xsl:template name="place-tbl-lbl">
 <xsl:param name="stringName"/>
@@ -3533,6 +3530,9 @@
   </xsl:variable>
   <xsl:choose>
     <!-- title -or- title & desc -->
+    
+    <!-- UPDATE: title ONLY; do not use desc -->
+    
     <xsl:when test="*[contains(@class,' topic/title ')]">
       <caption>
        <xsl:choose>     <!-- Hungarian: "1. Table " -->
@@ -3549,13 +3549,24 @@
         </xsl:otherwise>
        </xsl:choose>
        <xsl:apply-templates select="./*[contains(@class,' topic/title ')]" mode="tabletitle"/>
+       
+       <!-- Do NOT add the desc to the caption -->
+       
+       <!--
        <xsl:if test="*[contains(@class,' topic/desc ')]">
         <xsl:text>. </xsl:text>
         <xsl:apply-templates select="./*[contains(@class,' topic/desc ')]" mode="tabledesc"/>
        </xsl:if>
+       
+       -->
+       
       </caption>
     </xsl:when>
+    
+    
     <!-- desc -->
+    <!-- I don't know what this is for -->
+    
     <xsl:when test="*[contains(@class,' topic/desc ')]">
       <div><xsl:apply-templates select="./*[contains(@class,' topic/desc ')]" mode="tabledesc"/></div>
     </xsl:when>



Mime
View raw message