[yelp-xsl] db2html: Fix DocBook CSS, QandA fixes



commit 045d6749297be2260e29aab1e4ca076ea2751724
Author: Shaun McCance <shaunm gnome org>
Date:   Tue May 10 16:29:56 2011 -0400

    db2html: Fix DocBook CSS, QandA fixes

 xslt/docbook/common/db-title.xsl       |   13 ++
 xslt/docbook/html/db2html-css.xsl      |  120 +++++-------------
 xslt/docbook/html/db2html-division.xsl |   40 ++++++
 xslt/docbook/html/db2html-list.xsl     |  217 +++++++++++---------------------
 xslt/docbook/html/db2html-qanda.xsl    |  147 ---------------------
 xslt/docbook/html/db2xhtml.xsl         |    1 -
 6 files changed, 158 insertions(+), 380 deletions(-)
---
diff --git a/xslt/docbook/common/db-title.xsl b/xslt/docbook/common/db-title.xsl
index 951c839..71a00b0 100644
--- a/xslt/docbook/common/db-title.xsl
+++ b/xslt/docbook/common/db-title.xsl
@@ -250,6 +250,19 @@ REMARK: Describe this mode
   </xsl:choose>
 </xsl:template>
 
+<!-- = db.title.mode % qandaentry = -->
+<xsl:template mode="db.title.mode" match="qandaentry | db:qandaentry">
+  <xsl:apply-templates mode="db.title.mode" select="question | db:question"/>
+</xsl:template>
+
+<!-- = db.title.mode % question = -->
+<xsl:template mode="db.title.mode" match="question">
+  <xsl:apply-templates select=".//para/node()"/>
+</xsl:template>
+<xsl:template mode="db.title.mode" match="db:question">
+  <xsl:apply-templates select=".//db:para/node()"/>
+</xsl:template>
+
 <!-- = db.title.mode % part = -->
 <xsl:template mode="db.title.mode" match="part | db:part">
   <xsl:choose>
diff --git a/xslt/docbook/html/db2html-css.xsl b/xslt/docbook/html/db2html-css.xsl
index 8a47c9a..50f4dbc 100644
--- a/xslt/docbook/html/db2html-css.xsl
+++ b/xslt/docbook/html/db2html-css.xsl
@@ -29,77 +29,20 @@ REMARK: Describe this module
 -->
 
 
-<!--@@==========================================================================
-db2html.css.file
-The file to output CSS to
-
-This parameter allows you to output the CSS to separate file which is referenced
-by each HTML file.  If this parameter is blank, then the CSS is embedded inside
-a #{style} tag in the HTML instead.
--->
-<xsl:param name="db2html.css.file" select="''"/>
-
-
-<!--**==========================================================================
-db2html.css
-Outputs the CSS that controls the appearance of the entire document
-$css_file: Whether to create a CSS file when @{db2html.css.file} is set.
-
-This template outputs a #{style} or #{link} tag and calls *{db2html.css.content}
-to output the actual CSS directives.  An external CSS file will only be created
-when ${css_file} is true.  This is only set to true by the top-level chunk to
-avoid creating the same file multiple times.
--->
-<xsl:template name="db2html.css">
-  <xsl:param name="css_file" select="false()"/>
-  <xsl:choose>
-    <xsl:when test="$db2html.css.file != ''">
-      <xsl:if test="$css_file">
-        <exsl:document href="{$db2html.css.file}" method="text">
-          <xsl:call-template name="db2html.css.content"/>
-        </exsl:document>
-      </xsl:if>
-      <link rel="stylesheet" type="text/css" href="{$db2html.css.file}"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <style type="text/css">
-        <xsl:call-template name="db2html.css.content"/>
-      </style>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db2html.css.content
-Outputs the actual CSS directives
-
-This template is called by *{db2html.css} to output CSS content.  It also calls
-templates from other modules to output CSS specific to the content addressed in
-those modules.
-
-This template calls *{db2html.css.custom} at the end.  That template may be used
-by extension stylesheets to extend or override the CSS.
--->
-<xsl:template name="db2html.css.content">
-  <xsl:variable name="direction">
+<xsl:template mode="html.css.mode" match="*">
+  <xsl:param name="direction">
     <xsl:call-template name="l10n.direction"/>
-  </xsl:variable>
-  <xsl:variable name="left">
+  </xsl:param>
+  <xsl:param name="left">
     <xsl:call-template name="l10n.align.start">
       <xsl:with-param name="direction" select="$direction"/>
     </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="right">
+  </xsl:param>
+  <xsl:param name="right">
     <xsl:call-template name="l10n.align.end">
       <xsl:with-param name="direction" select="$direction"/>
     </xsl:call-template>
-  </xsl:variable>
-  <xsl:call-template name="theme.html.css">
-    <xsl:with-param name="direction" select="$direction"/>
-    <xsl:with-param name="left" select="$left"/>
-    <xsl:with-param name="right" select="$right"/>
-  </xsl:call-template>
+  </xsl:param>
   <xsl:text>
 <!-- == common == -->
 sub { font-size: 0.83em; }
@@ -118,11 +61,11 @@ div.title span.label { font-weight: normal; }
 
 div.sidenav {
   padding: 0.5em 1em 0 1em;
-  background-color: </xsl:text><xsl:value-of select="$theme.color.background"/><xsl:text>;
-  border: solid 1px </xsl:text><xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
+  background-color: </xsl:text><xsl:value-of select="$color.background"/><xsl:text>;
+  border: solid 1px </xsl:text><xsl:value-of select="$color.gray_border"/><xsl:text>;
 }
 div.sidenav div.sectionlinks {
-  background-color: </xsl:text><xsl:value-of select="$theme.color.background"/><xsl:text>;
+  background-color: </xsl:text><xsl:value-of select="$color.background"/><xsl:text>;
   border: none; padding: 0; margin: 0;
 }
 div.sidenav div.sectionlinks li { margin-bottom: 0.5em; }
@@ -135,7 +78,7 @@ div.sidenav div.sectionlinks div.sectionlinks div.sectionlinks li { margin-botto
 
 <!-- == bibliography == -->
 span.bibliolabel {
-  color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
+  color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
 }
 
 <!-- == block == -->
@@ -143,11 +86,11 @@ div.epigraph {
   text-align: </xsl:text><xsl:value-of select="$right"/><xsl:text>;
   margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 20%;
   margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 0;
-  color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
+  color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
 }
 div.programlisting .userinput {
   font-weight: bold;
-  color: </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
+  color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
 }
 div.verbatim { white-space: pre; }
 
@@ -164,7 +107,7 @@ div.simplelist table { margin-left: 0; border: none; }
 div.simplelist td {
   padding: 0.5em;
   border-</xsl:text><xsl:value-of select="$left"/><xsl:text>: solid 1px </xsl:text>
-    <xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
+    <xsl:value-of select="$color.gray_border"/><xsl:text>;
 }
 <!--
 div.simplelist td.td-first {
@@ -195,22 +138,27 @@ span.prompt { font-family: monospace; }
 span.wordasword { font-style: italic; }
 <!-- FIXME below -->
 
+dt.question {
+  margin-left: 0;
+  margin-right: 0;
+  font-weight: bold;
+}
+dd + dt.question { margin-top: 1em; }
+dd.answer {
+  margin-top: 1em;
+  margin-left: 2em;
+  margin-right: 2em;
+}
+div.qanda-label {
+  line-height: 1.72em;
+  float: </xsl:text><xsl:value-of select="$left"/><xsl:text>;
+  margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 1em;
+  font-weight: bold;
+}
+dl.qandaset ol, dl.qandaset ul, dl.qandaset table { clear: both; }
 </xsl:text>
-  <xsl:call-template name="db2html.footnote.css"/>
-  <xsl:call-template name="db2html.callout.css"/>
-  <xsl:call-template name="db2html.qanda.css"/>
-<xsl:call-template name="db2html.css.custom"/>
+<xsl:call-template name="db2html.footnote.css"/>
+<xsl:call-template name="db2html.callout.css"/>
 </xsl:template>
 
-
-<!--**==========================================================================
-db2html.css.custom
-Allows extension stylesheets to extend or override CSS
-:Stub: true
-
-This stub template has no content.  Extension stylesheets can override this
-template to output extra CSS.
--->
-<xsl:template name="db2html.css.custom"/>
-
 </xsl:stylesheet>
diff --git a/xslt/docbook/html/db2html-division.xsl b/xslt/docbook/html/db2html-division.xsl
index edfa193..ce66cf8 100644
--- a/xslt/docbook/html/db2html-division.xsl
+++ b/xslt/docbook/html/db2html-division.xsl
@@ -949,6 +949,46 @@ REMARK: Describe this template
   </xsl:call-template>
 </xsl:template>
 
+<!-- = qandadiv = -->
+<xsl:template match="qandadiv | db:qandadiv">
+  <xsl:param name="depth_in_chunk">
+    <xsl:call-template name="db.chunk.depth-in-chunk"/>
+  </xsl:param>
+  <xsl:param name="depth_of_chunk">
+    <xsl:call-template name="db.chunk.depth-of-chunk"/>
+  </xsl:param>
+  <xsl:call-template name="db2html.division.div">
+    <xsl:with-param name="info" select="blockinfo | db:info"/>
+    <xsl:with-param name="entries" select="qandaentry | db:qandaentry"/>
+    <xsl:with-param name="divisions" select="qandadiv | db:qandadiv"/>
+    <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="chunk_divisions" select="false()"/>
+    <xsl:with-param name="chunk_info" select="false()"/>
+    <xsl:with-param name="autotoc_divisions" select="false()"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- = qandaset = -->
+<xsl:template match="qandaset | db:qandaset">
+  <xsl:param name="depth_in_chunk">
+    <xsl:call-template name="db.chunk.depth-in-chunk"/>
+  </xsl:param>
+  <xsl:param name="depth_of_chunk">
+    <xsl:call-template name="db.chunk.depth-of-chunk"/>
+  </xsl:param>
+  <xsl:call-template name="db2html.division.div">
+    <xsl:with-param name="info" select="blockinfo | db:info"/>
+    <xsl:with-param name="entries" select="qandaentry | db:qandaentry"/>
+    <xsl:with-param name="divisions" select="qandadiv | db:qandadiv"/>
+    <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="chunk_divisions" select="false()"/>
+    <xsl:with-param name="chunk_info" select="false()"/>
+    <xsl:with-param name="autotoc_divisions" select="true()"/>
+  </xsl:call-template>
+</xsl:template>
+
 <!-- = reference = -->
 <xsl:template match="reference | db:reference">
   <xsl:param name="depth_in_chunk">
diff --git a/xslt/docbook/html/db2html-list.xsl b/xslt/docbook/html/db2html-list.xsl
index fe9d9dc..1226359 100644
--- a/xslt/docbook/html/db2html-list.xsl
+++ b/xslt/docbook/html/db2html-list.xsl
@@ -23,7 +23,7 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 <!--!!==========================================================================
 DocBook to HTML - Lists
-:Requires: db-common db2html-inline db2html-xref gettext
+:Requires: db-common db2html-inline db2html-xref gettext html
 
 REMARK: Describe this module
 -->
@@ -31,16 +31,10 @@ REMARK: Describe this module
 
 <!-- == Matched Templates == -->
 
-<!-- = variablelist = -->
+<!-- = glosslist = -->
 <xsl:template match="glosslist | db:glosslist">
   <div class="list glosslist">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates select="title | db:title | db:info/db:title"/>
     <dl class="glosslist">
@@ -52,13 +46,7 @@ REMARK: Describe this module
 <!-- = itemizedlist = -->
 <xsl:template match="itemizedlist | db:itemizedlist">
   <div class="list itemizedlist">
-    <xsl:if test="@xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates select="db:info/db:title"/>
     <xsl:apply-templates select="*[not(self::listitem) and not(self::db:listitem)]"/>
@@ -87,13 +75,7 @@ REMARK: Describe this module
 <!-- = itemizedlist/listitem = -->
 <xsl:template match="itemizedlist/listitem | db:itemizedlist/db:listitem">
   <li class="list itemizedlist">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:if test="@override">
       <xsl:attribute name="style">
         <xsl:text>list-style-type: </xsl:text>
@@ -127,13 +109,7 @@ REMARK: Describe this module
   </xsl:variable>
   <!-- FIXME: auto-numeration for nested lists -->
   <div class="list orderedlist">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates select="db:info/db:title"/>
     <xsl:apply-templates select="*[not(self::listitem) and not(self::db:listitem)]"/>
@@ -170,13 +146,7 @@ REMARK: Describe this module
 <!-- = orderedlist/listitem = -->
 <xsl:template match="orderedlist/listitem | db:orderedlist/db:listitem">
   <li class="list orderedlist">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:if test="@override">
       <xsl:attribute name="value">
         <xsl:value-of select="@override"/>
@@ -190,13 +160,7 @@ REMARK: Describe this module
 <!-- = procedure = -->
 <xsl:template match="procedure | db:procedure">
   <div class="steps">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates select="db:info/db:title"/>
     <xsl:apply-templates select="*[not(self::step) and not(self::db:step)]"/>
@@ -215,19 +179,64 @@ REMARK: Describe this module
   </div>
 </xsl:template>
 
+<!-- = answer = -->
+<xsl:template match="answer | db:answer">
+  <dd class="answer">
+    <xsl:call-template name="html.lang.attrs"/>
+    <xsl:choose>
+      <xsl:when test="label | db:label">
+        <div class="qanda-label">
+          <xsl:apply-templates select="label/node() | db:label/node()"/>
+        </div>
+      </xsl:when>
+      <xsl:when test="ancestor::qandaset/@defaultlabel = 'qanda' or
+                      ancestor::db:qandaset/@defaultlabel = 'qanda'">
+        <div class="qanda-label">
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'A:'"/>
+          </xsl:call-template>
+        </div>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:apply-templates/>
+  </dd>
+</xsl:template>
+
+<!-- = qandaentry = -->
+<xsl:template match="qandaentry | db:qandaentry">
+  <xsl:apply-templates/>
+</xsl:template>
+
+<!-- = question = -->
+<xsl:template match="question | db:question">
+  <dt class="question">
+    <xsl:call-template name="html.lang.attrs"/>
+    <xsl:choose>
+      <xsl:when test="label | db:label">
+        <div class="qanda-label">
+          <xsl:apply-templates select="label/node() | db:label/node()"/>
+        </div>
+      </xsl:when>
+      <xsl:when test="ancestor::qandaset/@defaultlabel = 'qanda' or
+                      ancestor::db:qandaset/@defaultlabel = 'qanda'">
+        <div class="qanda-label">
+          <xsl:call-template name="l10n.gettext">
+            <xsl:with-param name="msgid" select="'Q:'"/>
+          </xsl:call-template>
+        </div>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:apply-templates/>
+  </dt>
+</xsl:template>
+
 <!-- = seg = -->
 <xsl:template match="seg | db:seg">
   <xsl:variable name="position"
                 select="count(preceding-sibling::seg) +
                         count(preceding-sibling::db:seg) + 1"/>
   <p class="seg">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:apply-templates select="../../segtitle[position() = $position] |
                                  ../../db:segtitle[position() = $position]"/>
     <xsl:apply-templates/>
@@ -240,13 +249,7 @@ REMARK: Describe this module
               select="count(preceding-sibling::seglistitem) +
                       count(preceding-sibling::db:seglistitem) + 1"/>
   <div class="seglistitem">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <div>
       <xsl:attribute name="class">
         <xsl:choose>
@@ -267,13 +270,7 @@ REMARK: Describe this module
 <!-- = segmentedlist = -->
 <xsl:template match="segmentedlist | db:segmentedlist">
   <div class="list segmentedlist">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates select="title | db:title | db:info/db:title"/>
     <xsl:apply-templates select="seglistitem | db:seglistitem"/>
@@ -284,13 +281,7 @@ REMARK: Describe this module
 <xsl:template match="segtitle | db:segtitle">
   <!-- FIXME: no style tags -->
   <b>
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:apply-templates/>
     <!-- FIXME: i18n -->
     <xsl:text>: </xsl:text>
@@ -312,13 +303,7 @@ REMARK: Describe this module
   <xsl:choose>
     <xsl:when test="@type = 'inline'">
       <span class="simplelist">
-        <xsl:if test="@lang | @xml:lang">
-          <xsl:attribute name="dir">
-            <xsl:call-template name="l10n.direction">
-              <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-            </xsl:call-template>
-          </xsl:attribute>
-        </xsl:if>
+        <xsl:call-template name="html.lang.attrs"/>
         <xsl:call-template name="db2html.anchor"/>
         <xsl:for-each select="member | db:member">
           <xsl:if test="position() != 1">
@@ -332,13 +317,7 @@ REMARK: Describe this module
     </xsl:when>
     <xsl:when test="@type = 'horiz'">
       <div class="list simplelist">
-        <xsl:if test="@lang | @xml:lang">
-          <xsl:attribute name="dir">
-            <xsl:call-template name="l10n.direction">
-              <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-            </xsl:call-template>
-          </xsl:attribute>
-        </xsl:if>
+        <xsl:call-template name="html.lang.attrs"/>
         <xsl:call-template name="db2html.anchor"/>
         <table class="simplelist">
           <xsl:for-each select="(member | db:member)[$columns = 1 or position() mod $columns = 1]">
@@ -365,13 +344,7 @@ REMARK: Describe this module
     </xsl:when>
     <xsl:otherwise>
       <div class="list simplelist">
-        <xsl:if test="@lang | @xml:lang">
-          <xsl:attribute name="dir">
-            <xsl:call-template name="l10n.direction">
-              <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-            </xsl:call-template>
-          </xsl:attribute>
-        </xsl:if>
+        <xsl:call-template name="html.lang.attrs"/>
         <xsl:call-template name="db2html.anchor"/>
         <xsl:variable name="rows"
                       select="ceiling(count(member | db:member) div $columns)"/>
@@ -407,13 +380,7 @@ REMARK: Describe this module
 <!-- = step = -->
 <xsl:template match="step | db:step">
   <li class="steps">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:apply-templates/>
   </li>
 </xsl:template>
@@ -424,13 +391,7 @@ REMARK: Describe this module
   <xsl:variable name="depth" select="count(ancestor::substeps |
                                            ancestor::db:substeps)"/>
   <div class="steps substeps">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <ol class="steps substeps">
       <xsl:attribute name="type">
@@ -448,22 +409,7 @@ REMARK: Describe this module
 <!-- = term = -->
 <xsl:template match="term | db:term">
   <dt class="terms">
-    <xsl:choose>
-      <xsl:when test="@lang | @xml:lang">
-        <xsl:attribute name="dir">
-          <xsl:call-template name="l10n.direction">
-            <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:when>
-      <xsl:when test="../@lang | ../@xml:lang">
-        <xsl:attribute name="dir">
-          <xsl:call-template name="l10n.direction">
-            <xsl:with-param name="lang" select="../@lang | ../@xml:lang"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:when>
-    </xsl:choose>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:if test="(../varlistentry/@id and not(preceding-sibling::term)) or
                   (../db:varlistentry/@xml:id and not(preceding-sibling::db:term))">
       <xsl:call-template name="db2html.anchor">
@@ -478,13 +424,7 @@ REMARK: Describe this module
 <!-- = variablelist = -->
 <xsl:template match="variablelist | db:variablelist">
   <div class="terms variablelist">
-    <xsl:if test="@lang | @xml:lang">
-      <xsl:attribute name="dir">
-        <xsl:call-template name="l10n.direction">
-          <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-        </xsl:call-template>
-      </xsl:attribute>
-    </xsl:if>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates select="db:info/db:title"/>
     <xsl:apply-templates select="*[not(self::varlistentry) and
@@ -504,22 +444,7 @@ REMARK: Describe this module
 <!-- = varlistentry/listitem = -->
 <xsl:template match="varlistentry/listitem | db:varlistentry/db:listitem">
   <dd class="terms">
-    <xsl:choose>
-      <xsl:when test="@lang | @xml:lang">
-        <xsl:attribute name="dir">
-          <xsl:call-template name="l10n.direction">
-            <xsl:with-param name="lang" select="@lang | @xml:lang"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:when>
-      <xsl:when test="../@lang or ../@xml:lang">
-        <xsl:attribute name="dir">
-          <xsl:call-template name="l10n.direction">
-            <xsl:with-param name="lang" select="../@lang | ../@xml:lang"/>
-          </xsl:call-template>
-        </xsl:attribute>
-      </xsl:when>
-    </xsl:choose>
+    <xsl:call-template name="html.lang.attrs"/>
     <xsl:call-template name="db2html.anchor"/>
     <xsl:apply-templates/>
   </dd>
diff --git a/xslt/docbook/html/db2xhtml.xsl b/xslt/docbook/html/db2xhtml.xsl
index 099ca51..226f6ec 100644
--- a/xslt/docbook/html/db2xhtml.xsl
+++ b/xslt/docbook/html/db2xhtml.xsl
@@ -53,7 +53,6 @@ DocBook to XHTML
 <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"/>



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