[yelp-xsl] First attempts at using the common HTML output module for DocBook



commit 31e2f976d125aa45461e781e76fb4b584f830cd0
Author: Shaun McCance <shaunm gnome org>
Date:   Wed May 26 16:09:33 2010 -0500

    First attempts at using the common HTML output module for DocBook

 xslt/common/html.xsl                   |   27 ++++-
 xslt/docbook/common/db-chunk.xsl       |   55 +--------
 xslt/docbook/html/db2html-division.xsl |  191 +++++++++++++++++---------------
 xslt/docbook/html/db2html-table.xsl    |    8 +-
 xslt/docbook/html/db2html.xsl          |   62 +----------
 xslt/docbook/html/db2xhtml.xsl         |   44 ++------
 xslt/mallard/html/mal2xhtml.xsl        |    2 +-
 7 files changed, 152 insertions(+), 237 deletions(-)
---
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index 9bc45dc..00bcf3a 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -19,8 +19,9 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 xmlns:html="http://www.w3.org/1999/xhtml";
                 xmlns:exsl="http://exslt.org/common";
+                xmlns:set="http://exslt.org/sets";
                 xmlns="http://www.w3.org/1999/xhtml";
-                exclude-result-prefixes="html"
+                exclude-result-prefixes="html set"
                 extension-element-prefixes="exsl"
                 version="1.0">
 
@@ -122,10 +123,10 @@ should include the leading dot. By default, #{.xhtml} will be used if
 <xsl:param name="html.extension">
   <xsl:choose>
     <xsl:when test="$html.xhtml">
-      <xsl:text>.html</xsl:text>
+      <xsl:text>.xhtml</xsl:text>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:text>.xhtml</xsl:text>
+      <xsl:text>.html</xsl:text>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:param>
@@ -147,6 +148,10 @@ filename and append @{html.extension} to it. The base filename is generated
 as follows: If an #{xml:id} attribute is present, it is used; otherwise, if
 an #{id} attribute is present, it is uses; otherwise, if ${node} is the root
 element, @{html.basename} is used; otherwise, #{generate-id()} is called.
+
+After calling #{exsl:document}, this template calls the %{html.output.after.mode}
+mode on ${node}. Importing stylesheets that create multiple output files can
+use this to process output files without blocking earlier output.
 -->
 <xsl:template name="html.output">
   <xsl:param name="node" select="."/>
@@ -158,7 +163,7 @@ element, @{html.basename} is used; otherwise, #{generate-id()} is called.
       <xsl:when test="$node/@id">
         <xsl:value-of select="concat($node/@id, $html.extension)"/>
       </xsl:when>
-      <xsl:when test="exsl:has-same-node($node, /*)">
+      <xsl:when test="set:has-same-node($node, /*)">
         <xsl:value-of select="concat($html.basename, $html.extension)"/>
       </xsl:when>
       <xsl:otherwise>
@@ -171,9 +176,23 @@ element, @{html.basename} is used; otherwise, #{generate-id()} is called.
       <xsl:with-param name="node" select="$node"/>
     </xsl:call-template>
   </exsl:document>
+  <xsl:apply-templates mode="html.output.after.mode" select="$node"/>
 </xsl:template>
 
 
+
+<!--%%==========================================================================
+html.output.after.mode
+Process an element after its content are output.
+:Revision:version="1.0" date="2010-05-26" status="final"
+
+This mode is called by *{html.output} after #{exsl:document} has finished. It
+can be used to create further output files without blocking the output of
+parent elements.
+-->
+<xsl:template mode="html.output.after.mode" match="*"/>
+
+
 <!--**==========================================================================
 html.page
 Create an HTML document.
diff --git a/xslt/docbook/common/db-chunk.xsl b/xslt/docbook/common/db-chunk.xsl
index 53ad05e..4edeee3 100644
--- a/xslt/docbook/common/db-chunk.xsl
+++ b/xslt/docbook/common/db-chunk.xsl
@@ -185,12 +185,14 @@ chunking mechanism without having to duplicate the content-generation code.
       <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
     </xsl:call-template>
   </exsl:document>
+  <!-- DONE
   <xsl:if test="string($template) = ''">
     <xsl:call-template name="db.chunk.children">
       <xsl:with-param name="node" select="$node"/>
       <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
     </xsl:call-template>
   </xsl:if>
+  -->
 </xsl:template>
 
 
@@ -234,55 +236,6 @@ parameters with appropriate values to the templates it calls.
 </xsl:template>
 
 
-<!--**==========================================================================
-db.chunk.children
-Creates new output pages for the children of an element
-$node: The parent element whose children will be chunked
-$depth_of_chunk: The depth of ${node} in the document
-
-REMARK: We need a lot more explanation about chunk flow
--->
-<xsl:template name="db.chunk.children">
-  <xsl:param name="node" select="."/>
-  <xsl:param name="depth_of_chunk">
-    <xsl:call-template name="db.chunk.depth-of-chunk">
-      <xsl:with-param name="node" select="$node"/>
-    </xsl:call-template>
-  </xsl:param>
-  <xsl:if test="$depth_of_chunk &lt; $db.chunk.max_depth">
-    <xsl:for-each select="
-                  $node/appendix   | $node/article    | $node/bibliography |
-                  $node/bibliodiv  |
-                  $node/book       | $node/chapter    | $node/colophon     |
-                  $node/dedication | $node/glossary   | $node/glossdiv     |
-                  $node/index      | $node/lot        | $node/part         |
-                  $node/preface    | $node/refentry   | $node/reference    |
-                  $node/sect1      | $node/sect2      | $node/sect3        |
-                  $node/sect4      | $node/sect5      | $node/section      |
-                  $node/setindex   | $node/simplesect | $node/toc          |
-                  $node/db:appendix   | $node/db:article    | $node/db:bibliography |
-                  $node/db:bibliodiv  |
-                  $node/db:book       | $node/db:chapter    | $node/db:colophon     |
-                  $node/db:dedication | $node/db:glossary   | $node/db:glossdiv     |
-                  $node/db:index      | $node/db:lot        | $node/db:part         |
-                  $node/db:preface    | $node/db:refentry   | $node/db:reference    |
-                  $node/db:sect1      | $node/db:sect2      | $node/db:sect3        |
-                  $node/db:sect4      | $node/db:sect5      | $node/db:section      |
-                  $node/db:setindex   | $node/db:simplesect | $node/db:toc          ">
-      <xsl:call-template name="db.chunk">
-        <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk + 1"/>
-      </xsl:call-template>
-    </xsl:for-each>
-  </xsl:if>
-  <xsl:if test="$db.chunk.info_chunk and $depth_of_chunk = 0">
-    <xsl:call-template name="db.chunk">
-      <xsl:with-param name="node" select="$node"/>
-      <xsl:with-param name="template" select="'info'"/>
-      <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk + 1"/>
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
 
 <!--**==========================================================================
 db.chunk.depth-in-chunk
@@ -599,7 +552,7 @@ markup for the output page.
 
 <!-- == Matched Templates == -->
 
-<xsl:template match="/">
+<xsl:template match="/false">
   <xsl:choose>
     <xsl:when test="$db.chunk.chunk_top">
       <xsl:call-template name="db.chunk">
@@ -612,10 +565,12 @@ markup for the output page.
         <xsl:with-param name="depth_in_chunk" select="0"/>
         <xsl:with-param name="depth_of_chunk" select="0"/>
       </xsl:apply-templates>
+      <!-- DONE
       <xsl:call-template name="db.chunk.children">
         <xsl:with-param name="node" select="*[1]"/>
         <xsl:with-param name="depth_of_chunk" select="0"/>
       </xsl:call-template>
+      -->
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index 6181411..92b9126 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -24,21 +24,78 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
                 version="1.0">
 
 <!--!!==========================================================================
-DocBook to HTML - Division Elements
+DocBook to HTML - Divisions
 :Requires: db-chunk db-label db-title db-xref db2html-autotoc db2html-css db2html-footnote db2html-info db2html-xref gettext
 
 REMARK: Describe this module
 -->
 
 
-<!--@@==========================================================================
-db2html.linktrail
-Whether to place a link trail under the header
+<xsl:template mode="html.title.mode" match="*">
+  <xsl:variable name="title">
+    <xsl:call-template name="db.title">
+      <xsl:with-param name="node" select="."/>
+    </xsl:call-template>
+  </xsl:variable>
+  <xsl:value-of select="normalize-space($title)"/>
+</xsl:template>
+
+<xsl:template mode="html.header.mode" match="*">
+  <xsl:call-template name="db2html.linktrail"/>
+</xsl:template>
+
+<xsl:template mode="html.body.mode" match="*">
+  <xsl:choose>
+    <xsl:when test="self::db:info or self::bookinfo or self::articleinfo">
+      <!-- FIXME
+      <xsl:call-template name="db2html.info.div">
+        <xsl:with-param name="node" select=".."/>
+        <xsl:with-param name="info" select="."/>
+      </xsl:call-template>
+      -->
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select=".">
+        <xsl:with-param name="depth_in_chunk" select="0"/>
+      </xsl:apply-templates>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="html.output.after.mode" match="*">
+  <xsl:param name="depth_of_chunk">
+    <xsl:call-template name="db.chunk.depth-of-chunk"/>
+  </xsl:param>
+  <xsl:if test="count(ancestor::*) &lt; $db.chunk.max_depth">
+    <xsl:for-each select="appendix     | db:appendix     |
+                          article      | db:article      |
+                          bibliography | db:bibliography | bibliodiv  | db:bibliodiv  |
+                          book         | db:book         | chapter    | db:chapter    |
+                          colophon     | db:colophon     | dedication | db:dedication |
+                          glossary     | db:glossary     | glossdiv   | db:glossdiv   |
+                          index        | db:index        | lot        | db:lot        |
+                          part         | db:part         |
+                          preface      | db:preface      |
+                          refentry     | db:refentry     | reference  | db:reference  |
+                          sect1    | sect2    | sect3    | sect4    | sect5    | section    |
+                          db:sect1 | db:sect2 | db:sect3 | db:sect4 | db:sect5 | db:section |
+                          setindex     | db:setindex     |
+                          simplesect   | db:simplesect   |
+                          toc          | db:toc          ">
+      <xsl:call-template name="html.output">
+        <xsl:with-param name="node" select="."/>
+      </xsl:call-template>
+    </xsl:for-each>
+  </xsl:if>
+  <xsl:if test="$db.chunk.info_chunk and $depth_of_chunk = 0 and
+                (local-name(.) = 'book' or local-name(.) = 'article')">
+    <xsl:call-template name="html.output">
+      <xsl:with-param name="node" select="bookinfo | articleinfo | db:info"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
 
-This boolean parameter specifies whether a block containing links to
-ancestor elements should be included under the header.
--->
-<xsl:param name="db2html.linktrail" select="true()"/>
 
 <!--@@==========================================================================
 db2html.navbar.top
@@ -207,21 +264,7 @@ REMARK: Put in a word about the chunk flow; talk about what templates get called
         <xsl:with-param name="next_node" select="$next_node"/>
       </xsl:call-template>
       <div class="body">
-        <xsl:choose>
-          <xsl:when test="$template = 'info'">
-            <xsl:call-template name="db2html.info.div">
-              <xsl:with-param name="node" select="$node"/>
-              <xsl:with-param name="info" select="$info"/>
-              <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="$node">
-              <xsl:with-param name="depth_in_chunk" select="0"/>
-              <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
-            </xsl:apply-templates>
-          </xsl:otherwise>
-        </xsl:choose>
+        <!-- DONE -->
       </div>
       <xsl:call-template name="db2html.division.bottom">
         <xsl:with-param name="node" select="$node"/>
@@ -319,13 +362,11 @@ REMARK: Talk about some of the parameters
         <xsl:value-of select="$node/@id"/>
       </xsl:attribute>
     </xsl:if>
-    <xsl:call-template name="db2html.header">
+    <xsl:call-template name="db2html.hgroup">
       <xsl:with-param name="node" select="$node"/>
       <xsl:with-param name="title_node" select="$title_node"/>
       <xsl:with-param name="subtitle_node" select="$subtitle_node"/>
       <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
-      <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
-      <xsl:with-param name="generate_label" select="$depth_in_chunk != 0"/>
       <xsl:with-param name="title_content" select="$title_content"/>
       <xsl:with-param name="subtitle_content" select="$subtitle_content"/>
     </xsl:call-template>
@@ -391,92 +432,73 @@ REMARK: Talk about how this works with #{callback}
 
 
 <!--**==========================================================================
-db2html.header
-Generates a header with a title and optional subtitle
-$node: The element containing the title
-$title_node: The #{title} element to render
-$subtitle_node: The #{subtitle} element to render
-$depth_in_chunk: The depth of ${node} in the containing chunk
-$depth_of_chunk: The depth of the containing chunk in the document
-$generate_label: Whether to generate a label in the title
-$title_content: An optional string containing the title
-$subtitle_content: An optional string containing the subtitle
+db2html.hgroup
+Output the title and subtitle for an element.
+$node: The element containing the title.
+$title_node: The #{title} element to render.
+$subtitle_node: The #{subtitle} element to render.
+$depth: The depth of ${node} in the containing output.
+$title_content: An optional string containing the title.
+$subtitle_content: An optional string containing the subtitle.
 
 REMARK: Talk about the different kinds of title blocks
 -->
-<xsl:template name="db2html.header">
+<xsl:template name="db2html.hgroup">
   <xsl:param name="node" select="."/>
-  <xsl:param name="title_node" select="$node/title | $node/db:title | $node/db:info/db:title"/>
-  <xsl:param name="subtitle_node" select="$node/subtitle | $node/db:subtitle | $node/db:info/db:subtitle"/>
-  <xsl:param name="depth_in_chunk">
+  <xsl:param name="title_node" select="($node/title | $node/db:title | $node/db:info/db:title)[1]"/>
+  <xsl:param name="subtitle_node" select="($node/subtitle | $node/db:subtitle | $node/db:info/db:subtitle)[1]"/>
+  <xsl:param name="depth">
     <xsl:call-template name="db.chunk.depth-in-chunk">
       <xsl:with-param name="node" select="$node"/>
     </xsl:call-template>
   </xsl:param>
-  <xsl:param name="depth_of_chunk">
-    <xsl:call-template name="db.chunk.depth-of-chunk">
-      <xsl:with-param name="node" select="$node"/>
-    </xsl:call-template>
-  </xsl:param>
-  <xsl:param name="generate_label" select="true()"/>
   <xsl:param name="title_content"/>
   <xsl:param name="subtitle_content"/>
 
   <xsl:variable name="title_h">
     <xsl:choose>
-      <xsl:when test="$depth_in_chunk &lt; 7">
-        <xsl:value-of select="concat('h', $depth_in_chunk + 1)"/>
+      <xsl:when test="$depth &lt; 6">
+        <xsl:value-of select="concat('h', $depth + 1)"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:text>h7</xsl:text>
+        <xsl:text>h6</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
   <xsl:variable name="subtitle_h">
     <xsl:choose>
-      <xsl:when test="$depth_in_chunk &lt; 6">
-        <xsl:value-of select="concat('h', $depth_in_chunk + 2)"/>
+      <xsl:when test="$depth &lt; 5">
+        <xsl:value-of select="concat('h', $depth + 2)"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:text>h7</xsl:text>
+        <xsl:text>h6</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
 
-  <div class="header">
-    <xsl:element name="{$title_h}" namespace="{$db2html.namespace}">
+  <div class="hgroup">
+    <xsl:element name="{$title_h}" namespace="{$html.namespace}">
       <xsl:attribute name="class">
-        <xsl:value-of select="concat(local-name($node), ' ', local-name($title_node))"/>
+        <xsl:text>title</xsl:text>
       </xsl:attribute>
-      <span class="title">
-        <xsl:if test="$title_node">
-          <xsl:call-template name="db2html.anchor">
-            <xsl:with-param name="node" select="$title_node"/>
-          </xsl:call-template>
-        </xsl:if>
-        <xsl:if test="$generate_label">
-          <span class="label">
-            <xsl:call-template name="db.label">
-              <xsl:with-param name="node" select="$node"/>
-              <xsl:with-param name="role" select="'header'"/>
-              <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
-            </xsl:call-template>
-          </span>
-        </xsl:if>
-        <xsl:choose>
-          <xsl:when test="$title_content">
-            <xsl:value-of select="$title_content"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="$title_node/node()"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </span>
+      <xsl:if test="$title_node">
+        <xsl:call-template name="db2html.anchor">
+          <xsl:with-param name="node" select="$title_node"/>
+        </xsl:call-template>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="$title_content">
+          <xsl:value-of select="$title_content"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="$title_node/node()"/>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:element>
     <xsl:if test="$subtitle_node or $subtitle_content">
-      <xsl:element name="{$subtitle_h}" namespace="{$db2html.namespace}">
+      <xsl:element name="{$subtitle_h}" namespace="{$html.namespace}">
         <xsl:attribute name="class">
-          <xsl:value-of select="concat(local-name($node), ' ', local-name($subtitle_node))"/>
+          <xsl:text>subtitle</xsl:text>
         </xsl:attribute>
         <xsl:choose>
           <xsl:when test="$subtitle_content">
@@ -500,7 +522,7 @@ $node: The element to generate links for
 REMARK: Describe this
 -->
 <xsl:template name="db2html.linktrail">
-  <xsl:param name="node"/>
+  <xsl:param name="node" select="."/>
   <xsl:if test="$node/ancestor::*">
     <div class="trails">
       <div class="trail">
@@ -746,11 +768,6 @@ REMARK: Describe this template
         <xsl:with-param name="next_node" select="$next_node"/>
       </xsl:call-template>
     </xsl:if>
-    <xsl:if test="$db2html.linktrail">
-      <xsl:call-template name="db2html.linktrail">
-        <xsl:with-param name="node" select="$node"/>
-      </xsl:call-template>
-    </xsl:if>
   </div>
 </xsl:template>
 
diff --git a/xslt/docbook/html/db2html-table.xsl b/xslt/docbook/html/db2html-table.xsl
index 0132a8f..4fbadf3 100644
--- a/xslt/docbook/html/db2html-table.xsl
+++ b/xslt/docbook/html/db2html-table.xsl
@@ -419,7 +419,7 @@ element to output the next #{td}.
         </xsl:choose>
       </xsl:variable>
       <!-- Finally, output the td or th element -->
-      <xsl:element name="{$element}" namespace="{$db2html.namespace}">
+      <xsl:element name="{$element}" namespace="{$html.namespace}">
         <xsl:choose>
           <xsl:when test="@lang or @xml:lang">
             <xsl:attribute name="dir">
@@ -569,7 +569,7 @@ able to output the #{td} for the #{entry} element.
 
   <xsl:choose>
     <xsl:when test="$spanstr != '' and not(starts-with($spanstr, '0:'))">
-      <xsl:element name="{$element}" namespace="{$db2html.namespace}">
+      <xsl:element name="{$element}" namespace="{$html.namespace}">
         <xsl:if test="$class != ''">
           <xsl:attribute name="class">
             <xsl:value-of select="normalize-space($class)"/>
@@ -592,7 +592,7 @@ able to output the #{td} for the #{entry} element.
       </xsl:call-template>
     </xsl:when>
     <xsl:when test="$colnum - $colpos = 1">
-      <xsl:element name="{$element}" namespace="{$db2html.namespace}">
+      <xsl:element name="{$element}" namespace="{$html.namespace}">
         <xsl:if test="$class != ''">
           <xsl:attribute name="class">
             <xsl:value-of select="normalize-space($class)"/>
@@ -1146,7 +1146,7 @@ REMARK: This template needs to be explained in detail, but I forgot how it works
   <xsl:param name="spanspecs"/>
   <xsl:param name="colsep" select="''"/>
   <xsl:param name="rowsep" select="''"/>
-  <xsl:element name="{local-name(.)}" namespace="{$db2html.namespace}">
+  <xsl:element name="{local-name(.)}" namespace="{$html.namespace}">
     <xsl:if test="@lang or @xml:lang">
       <xsl:attribute name="dir">
         <xsl:call-template name="l10n.direction">
diff --git a/xslt/docbook/html/db2html.xsl b/xslt/docbook/html/db2html.xsl
index 842de35..f0099f2 100644
--- a/xslt/docbook/html/db2html.xsl
+++ b/xslt/docbook/html/db2html.xsl
@@ -20,69 +20,15 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
                 xmlns:html="http://www.w3.org/1999/xhtml";
                 version="1.0">
 
-<xsl:import href="../../gettext/gettext.xsl"/>
-
-<!--#@ db.chunk.doctype_public -->
-<xsl:param name="db.chunk.doctype_public" select="'-//W3C//DTD HTML 4.01 Transitional//EN'"/>
-
-<!--#@ db.chunk.doctype_system -->
-<xsl:param name="db.chunk.doctype_system" select="'http://www.w3.org/TR/html4/loose.dtd'"/>
-
-<xsl:output method="html"
-            doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
-            doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
-<xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default"/>
-
-<!--#@ db2html.namespace -->
-<xsl:param name="db2html.namespace" select="''"/>
-
 <!--!!==========================================================================
 DocBook to HTML
 -->
 
-<!--#@ db.chunk.extension -->
-<xsl:param name="db.chunk.extension" select="'.html'"/>
-
-<xsl:include href="../../theme/theme-colors.xsl"/>
-<xsl:include href="../../theme/theme-icons.xsl"/>
-<xsl:include href="../../theme/theme-html.xsl"/>
+<xsl:include href="db2xhtml.xsl" pass="true"><?pass?></xsl:include>
 
-<xsl:include href="../common/db-chunk.xsl"/>
-<xsl:include href="../common/db-common.xsl"/>
-<xsl:include href="../common/db-label.xsl"/>
-<xsl:include href="../common/db-title.xsl"/>
-<xsl:include href="../common/db-xref.xsl"/>
+<!--#@ html.xhtml -->
+<xsl:param name="html.xhtml" select="false()"/>
 
-<xsl:include href="db2html-autotoc.xsl"/>
-<xsl:include href="db2html-bibliography.xsl"/>
-<xsl:include href="db2html-block.xsl"/>
-<xsl:include href="db2html-callout.xsl"/>
-<xsl:include href="db2html-classsynopsis.xsl"/>
-<xsl:include href="db2html-cmdsynopsis.xsl"/>
-<xsl:include href="db2html-css.xsl"/>
-<xsl:include href="db2html-division.xsl"/>
-<xsl:include href="db2html-ebnf.xsl"/>
-<xsl:include href="db2html-funcsynopsis.xsl"/>
-<xsl:include href="db2html-index.xsl"/>
-<xsl:include href="db2html-info.xsl"/>
-<xsl:include href="db2html-inline.xsl"/>
-<xsl:include href="db2html-l10n.xsl"/>
-<xsl:include href="db2html-media.xsl"/>
-<xsl:include href="db2html-list.xsl"/>
-<xsl:include href="db2html-qanda.xsl"/>
-<xsl:include href="db2html-refentry.xsl"/>
-<xsl:include href="db2html-suppressed.xsl"/>
-<xsl:include href="db2html-table.xsl"/>
-<xsl:include href="db2html-title.xsl"/>
-<xsl:include href="db2html-xref.xsl"/>
-<xsl:include href="db2html-footnote.xsl"/>
-
-<xsl:template match="*">
-  <xsl:message>
-    <xsl:text>Unmatched element: </xsl:text>
-    <xsl:value-of select="name(.)"/>
-  </xsl:message>
-  <xsl:apply-templates select="node()"/>
-</xsl:template>
+<xsl:namespace-alias stylesheet-prefix="html" result-prefix="#default"/>
 
 </xsl:stylesheet>
diff --git a/xslt/docbook/html/db2xhtml.xsl b/xslt/docbook/html/db2xhtml.xsl
index 387491d..bdd02b2 100644
--- a/xslt/docbook/html/db2xhtml.xsl
+++ b/xslt/docbook/html/db2xhtml.xsl
@@ -20,37 +20,23 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
                 xmlns="http://www.w3.org/1999/xhtml";
                 version="1.0">
 
-<xsl:import href="../../gettext/gettext.xsl"/>
-
-<!--#@ db.chunk.doctype_public -->
-<xsl:param name="db.chunk.doctype_public" select="'-//W3C//DTD XHTML 1.0 Strict//EN'"/>
-
-<!--#@ db.chunk.doctype_system -->
-<xsl:param name="db.chunk.doctype_system" select="'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'"/>
-
-<xsl:output method="xml"
-            doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
-            doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
-
-<!--#@ db2html.namespace -->
-<xsl:param name="db2html.namespace" select="'http://www.w3.org/1999/xhtml'"/>
-
 <!--!!==========================================================================
 DocBook to XHTML
 -->
 
-<!--#@ db.chunk.extension -->
-<xsl:param name="db.chunk.extension" select="'.xhtml'"/>
+<xsl:import href="../../gettext/gettext.xsl"/>
+<xsl:import href="../../common/color.xsl"/>
+<xsl:import href="../../common/icons.xsl"/>
+<xsl:import href="../../common/html.xsl"/>
+<xsl:import href="../../common/utils.xsl"/>
 
-<xsl:include href="../../theme/theme-colors.xsl"/>
-<xsl:include href="../../theme/theme-icons.xsl"/>
-<xsl:include href="../../theme/theme-html.xsl"/>
+<xsl:import href="../common/db-chunk.xsl"/>
+<xsl:import href="../common/db-common.xsl"/>
+<xsl:import href="../common/db-label.xsl"/>
+<xsl:import href="../common/db-title.xsl"/>
+<xsl:import href="../common/db-xref.xsl"/>
 
-<xsl:include href="../common/db-chunk.xsl"/>
-<xsl:include href="../common/db-common.xsl"/>
-<xsl:include href="../common/db-label.xsl"/>
-<xsl:include href="../common/db-title.xsl"/>
-<xsl:include href="../common/db-xref.xsl"/>
+<xsl:param name="db.chunk.extension" select="$html.extension"/>
 
 <xsl:include href="db2html-autotoc.xsl"/>
 <xsl:include href="db2html-bibliography.xsl"/>
@@ -76,12 +62,4 @@ DocBook to XHTML
 <xsl:include href="db2html-xref.xsl"/>
 <xsl:include href="db2html-footnote.xsl"/>
 
-<xsl:template match="*">
-  <xsl:message>
-    <xsl:text>Unmatched element: </xsl:text>
-    <xsl:value-of select="name(.)"/>
-  </xsl:message>
-  <xsl:apply-templates select="node()"/>
-</xsl:template>
-
 </xsl:stylesheet>
diff --git a/xslt/mallard/html/mal2xhtml.xsl b/xslt/mallard/html/mal2xhtml.xsl
index b1f8468..8311264 100644
--- a/xslt/mallard/html/mal2xhtml.xsl
+++ b/xslt/mallard/html/mal2xhtml.xsl
@@ -30,7 +30,7 @@ REMARK: Describe this module
 -->
 
 <xsl:import href="../../gettext/gettext.xsl"/>
-<xsl:import href="../../common/colors.xsl"/>
+<xsl:import href="../../common/color.xsl"/>
 <xsl:import href="../../common/icons.xsl"/>
 <xsl:import href="../../common/html.xsl"/>
 <xsl:import href="../../common/utils.xsl"/>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]