]> granicus.if.org Git - docbook-dsssl/commitdiff
Allow calloutlist to have block content before the first callout
authorNorman Walsh <ndw@nwalsh.com>
Sun, 25 Jul 2004 21:25:56 +0000 (21:25 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 25 Jul 2004 21:25:56 +0000 (21:25 +0000)
xsl/html/lists.xsl

index 770add69aa856f4ece3ec5e1b608ee420c7fd1ff..8c528bd54a2d339ade0cac75452397a03da883ee 100644 (file)
     <xsl:if test="title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
+
+    <!-- Preserve order of PIs and comments -->
+    <xsl:apply-templates 
+         select="*[not(self::callout or self::title or self::titleabbrev)]
+                   |comment()[not(preceding-sibling::callout)]
+                  |processing-instruction()[not(preceding-sibling::callout)]"/>
+
     <xsl:choose>
       <xsl:when test="$callout.list.table != 0">
         <table border="0" summary="Callout list">
-          <xsl:apply-templates/>
-        </table>
+         <xsl:apply-templates select="callout
+                               |comment()[preceding-sibling::calllout]
+                               |processing-instruction()[preceding-sibling::callout]"/>
+       </table>
       </xsl:when>
       <xsl:otherwise>
-        <dl compact="compact"><xsl:apply-templates/></dl>
+       <dl compact="compact">
+         <xsl:apply-templates select="callout
+                               |comment()[preceding-sibling::calllout]
+                               |processing-instruction()[preceding-sibling::callout]"/>
+       </dl>
       </xsl:otherwise>
     </xsl:choose>
   </div>