]> granicus.if.org Git - docbook-dsssl/commitdiff
Fixed handling of admonitions that are children of Para element.
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 9 Mar 2006 11:04:07 +0000 (11:04 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 9 Mar 2006 11:04:07 +0000 (11:04 +0000)
Previously, handling of Caution, Important, Note, Tip, Warning
fails if they are children of Para. The reason is that they are
not included in the list of elements that we check when handling
"mixed block" content. Fixed by adding them to the list.
Closes bug #1446282. Thanks to Daniel Leidert for reporting.

xsl/manpages/utility.xsl

index c8efaf39eda6d2e6f31d10d71356fd99c142d638..9b0a9144c27151635c9c48701dcd5dc3ae62fed5 100644 (file)
           <xsl:apply-templates select="."/>
         </xsl:when>
         <!-- * Check to see if this node is a list; if it is, we don't -->
-        <!-- * want to normalize-space(), so we just apply-templates -->
+        <!-- * want to normalize-space(), so we just apply-templates. -->
+        <!-- * Do same for all admonitions -->
         <xsl:when test="(self::itemizedlist|self::orderedlist|
                         self::variablelist|self::glosslist|
-                        self::simplelist[@type !='inline'])">
+                        self::simplelist[@type !='inline']|
+                        self::caution|self::important|
+                        self::note|self::tip|self::warning)">
           <xsl:apply-templates select="."/>
         </xsl:when>
         <xsl:when test="self::text()">
                     and normalize-space($content) != ''
                     and not(
                     preceding-sibling::*[1][
+                    self::caution or
+                    self::important or
+                    self::note or
+                    self::tip or
+                    self::warning or
                     self::variablelist or
                     self::glosslistlist or
                     self::itemizedlist or
         </xsl:when>
         <xsl:otherwise>
           <!-- * At this point, we know that this node is not a verbatim -->
-          <!-- * environment, list, or text node; so we can safely -->
-          <!-- * normalize-space() it. -->
+          <!-- * environment, list, admonition, or text node; so we can -->
+          <!-- * safely normalize-space() it. -->
           <xsl:variable name="content">
             <xsl:apply-templates select="."/>
           </xsl:variable>