]> granicus.if.org Git - docbook-dsssl/commitdiff
Handle sidebar and simplesect correctly
authorNorman Walsh <ndw@nwalsh.com>
Sun, 16 Oct 2005 22:17:27 +0000 (22:17 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Sun, 16 Oct 2005 22:17:27 +0000 (22:17 +0000)
docbook/relaxng/tools/db4-upgrade.xsl

index 0f088ddf60b3e34177ed9e0bf96c0b0b61a6c319..0f249d3905efa0fcde518d5f4825061f8745126a 100644 (file)
                      |caution|important|note|warning|tip
                      |bibliodiv|glossarydiv|indexdiv
                     |orderedlist|itemizedlist|variablelist|procedure
-                    |task|tasksummary|taskprerequisites|taskrelated"
+                    |task|tasksummary|taskprerequisites|taskrelated
+                    |sidebar"
              priority="200">
   <xsl:choose>
     <xsl:when test="blockinfo">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section|simplesect"
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section"
              priority="200">
   <section>
     <xsl:call-template name="copy.attributes"/>
   </section>
 </xsl:template>
 
+<xsl:template match="simplesect"
+             priority="200">
+  <simplesect>
+    <xsl:call-template name="copy.attributes"/>
+
+    <xsl:if test="not(sect1info|sect2info|sect3info|sect4info|sect5info|sectioninfo)">
+      <info>
+        <xsl:apply-templates select="title" mode="copy"/>
+        <xsl:apply-templates select="titleabbrev" mode="copy"/>
+        <xsl:apply-templates select="subtitle" mode="copy"/>
+      </info>
+    </xsl:if>
+    <xsl:apply-templates/>
+  </simplesect>
+</xsl:template>
+
 <xsl:template match="refsect1|refsect2|refsect3|refsection" priority="200">
   <refsection>
     <xsl:call-template name="copy.attributes"/>