]> granicus.if.org Git - docbook-dsssl/commitdiff
Preserve titles on lists; improve handling of float attribute
authorNorman Walsh <ndw@nwalsh.com>
Wed, 12 Oct 2005 14:55:13 +0000 (14:55 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 12 Oct 2005 14:55:13 +0000 (14:55 +0000)
docbook/relaxng/tools/db4-upgrade.xsl

index dcda8a41526ca5651c554dfb618f14102b68090d..0f088ddf60b3e34177ed9e0bf96c0b0b61a6c319 100644 (file)
 
 <xsl:template match="formalpara|figure|table[tgroup]|example|blockquote
                      |caution|important|note|warning|tip
-                     |bibliodiv|glossarydiv|indexdiv" priority="200">
+                     |bibliodiv|glossarydiv|indexdiv
+                    |orderedlist|itemizedlist|variablelist|procedure
+                    |task|tasksummary|taskprerequisites|taskrelated"
+             priority="200">
   <xsl:choose>
     <xsl:when test="blockinfo">
       <xsl:copy>
       </xsl:when>
       <xsl:when test="$suppress = local-name(.)"/>
       <xsl:when test="local-name(.) = 'float'">
-        <xsl:message>
-          <xsl:text>Discarding float on </xsl:text>
-          <xsl:value-of select="local-name($src)"/>
-        </xsl:message>
-       <xsl:if test="not($src/@floatstyle)">
-         <xsl:message>
-           <xsl:text>Adding floatstyle='normal' on </xsl:text>
-           <xsl:value-of select="local-name($src)"/>
-         </xsl:message>
-         <xsl:attribute name="floatstyle">
-           <xsl:text>normal</xsl:text>
-         </xsl:attribute>
-       </xsl:if>
+       <xsl:choose>
+         <xsl:when test=". = '1'">
+           <xsl:message>
+             <xsl:text>Discarding float on </xsl:text>
+             <xsl:value-of select="local-name($src)"/>
+           </xsl:message>
+           <xsl:if test="not($src/@floatstyle)">
+             <xsl:message>
+               <xsl:text>Adding floatstyle='normal' on </xsl:text>
+               <xsl:value-of select="local-name($src)"/>
+             </xsl:message>
+             <xsl:attribute name="floatstyle">
+               <xsl:text>normal</xsl:text>
+             </xsl:attribute>
+           </xsl:if>
+         </xsl:when>
+         <xsl:when test=". = '0'">
+           <xsl:message>
+             <xsl:text>Discarding float on </xsl:text>
+             <xsl:value-of select="local-name($src)"/>
+           </xsl:message>
+         </xsl:when>
+         <xsl:otherwise>
+           <xsl:message>
+             <xsl:text>Discarding float on </xsl:text>
+             <xsl:value-of select="local-name($src)"/>
+           </xsl:message>
+           <xsl:if test="not($src/@floatstyle)">
+             <xsl:message>
+               <xsl:text>Adding floatstyle='</xsl:text>
+               <xsl:value-of select="."/>
+               <xsl:text>' on </xsl:text>
+               <xsl:value-of select="local-name($src)"/>
+             </xsl:message>
+             <xsl:attribute name="floatstyle">
+               <xsl:value-of select="."/>
+             </xsl:attribute>
+           </xsl:if>
+         </xsl:otherwise>
+       </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
         <xsl:copy/>