]> granicus.if.org Git - docbook-dsssl/commitdiff
Use the textobject/phrase for the table summary attribute, if one is present
authorNorman Walsh <ndw@nwalsh.com>
Mon, 25 Mar 2002 12:48:31 +0000 (12:48 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 25 Mar 2002 12:48:31 +0000 (12:48 +0000)
xsl/html/table.xsl

index 4e4d20ac06f6f48705db943016760d836921e46f..ffdc38a76ffa62fa66f5ab0bcaa03a50e5a39106 100644 (file)
 <xsl:template match="tgroup">
   <table>
     <xsl:choose>
+      <!-- If there's a textobject/phrase for the table summary, use it -->
+      <xsl:when test="../textobject/phrase">
+        <xsl:attribute name="summary">
+          <xsl:value-of select="../textobject/phrase"/>
+        </xsl:attribute>
+      </xsl:when>
+
       <!-- If there's a <?dbhtml table-summary="foo"?> PI, use it for
            the HTML table summary attribute -->
       <xsl:when test="processing-instruction('dbhtml')">
           </xsl:attribute>
         </xsl:if>
       </xsl:when>
+
       <!-- Otherwise, if there's a title, use that -->
       <xsl:when test="../title">
         <xsl:attribute name="summary">
           <xsl:value-of select="string(../title)"/>
         </xsl:attribute>
       </xsl:when>
+
       <!-- Otherwise, forget the whole idea -->
       <xsl:otherwise><!-- nevermind --></xsl:otherwise>
     </xsl:choose>