]> granicus.if.org Git - docbook-dsssl/commitdiff
Convert stylesheets to be namespace-aware.
authorStefan Seefeld <stefan@seefeld.name>
Mon, 24 Oct 2016 14:21:32 +0000 (10:21 -0400)
committerStefan Seefeld <stefan@seefeld.name>
Mon, 24 Oct 2016 14:21:32 +0000 (10:21 -0400)
181 files changed:
xsl/assembly/assemble.xsl
xsl/assembly/topic-maker-chunk.xsl
xsl/assembly/topic-maker.xsl
xsl/common/autoidx-kimber.xsl
xsl/common/autoidx-kosek.xsl
xsl/common/charmap.xsl
xsl/common/common.xsl
xsl/common/entities.ent
xsl/common/gentext.xsl
xsl/common/insertfile.xsl
xsl/common/l10n.xsl
xsl/common/labels.xsl
xsl/common/pi.xsl
xsl/common/refentry.xsl
xsl/common/subtitles.xsl
xsl/common/table.xsl
xsl/common/targets.xsl
xsl/common/titles.xsl
xsl/common/utility.xsl
xsl/eclipse/eclipse.xsl
xsl/eclipse/eclipse3.xsl
xsl/epub/bin/spec/files/test_cust.xsl
xsl/epub/bin/spec/tools/obfuscate_regression_submission.xsl
xsl/epub/bin/xslt/obfuscate.xsl
xsl/epub/docbook.xsl
xsl/epub3/chunk.xsl
xsl/epub3/chunkfast.xsl
xsl/epub3/docbook.xsl
xsl/epub3/epub3-chunk-mods.xsl
xsl/epub3/epub3-element-mods.xsl
xsl/epub3/profile-chunk.xsl
xsl/epub3/profile-docbook.xsl
xsl/fo/admon.xsl
xsl/fo/annotations.xsl
xsl/fo/autoidx-kimber.xsl
xsl/fo/autoidx-kosek.xsl
xsl/fo/autoidx-ng.xsl
xsl/fo/autoidx.xsl
xsl/fo/autotoc.xsl
xsl/fo/axf.xsl
xsl/fo/biblio-iso690.xsl
xsl/fo/biblio.xsl
xsl/fo/block.xsl
xsl/fo/callout.xsl
xsl/fo/component.xsl
xsl/fo/division.xsl
xsl/fo/docbook.xsl
xsl/fo/ebnf.xsl
xsl/fo/fo-rtf.xsl
xsl/fo/fo.xsl
xsl/fo/footnote.xsl
xsl/fo/fop.xsl
xsl/fo/fop1.xsl
xsl/fo/formal.xsl
xsl/fo/glossary.xsl
xsl/fo/graphics.xsl
xsl/fo/highlight.xsl
xsl/fo/htmltbl.xsl
xsl/fo/index.xsl
xsl/fo/info.xsl
xsl/fo/inline.xsl
xsl/fo/keywords.xsl
xsl/fo/lists.xsl
xsl/fo/math.xsl
xsl/fo/pagesetup.xsl
xsl/fo/passivetex.xsl
xsl/fo/pi.xsl
xsl/fo/ptc.xsl
xsl/fo/publishers.xsl
xsl/fo/qandaset.xsl
xsl/fo/refentry.xsl
xsl/fo/sections.xsl
xsl/fo/spaces.xsl
xsl/fo/synop.xsl
xsl/fo/table.xsl
xsl/fo/task.xsl
xsl/fo/titlepage.xsl
xsl/fo/toc.xsl
xsl/fo/verbatim.xsl
xsl/fo/xep.xsl
xsl/fo/xref.xsl
xsl/highlighting/common.xsl
xsl/html/admon.xsl
xsl/html/annotations.xsl
xsl/html/autoidx-kimber.xsl
xsl/html/autoidx-kosek.xsl
xsl/html/autoidx-ng.xsl
xsl/html/autoidx.xsl
xsl/html/autotoc.xsl
xsl/html/biblio-iso690.xsl
xsl/html/biblio.xsl
xsl/html/block.xsl
xsl/html/callout.xsl
xsl/html/changebars.xsl
xsl/html/chunk-changebars.xsl
xsl/html/chunk-code.xsl
xsl/html/chunk-common.xsl
xsl/html/chunk.xsl
xsl/html/chunker.xsl
xsl/html/chunkfast.xsl
xsl/html/chunktoc.xsl
xsl/html/component.xsl
xsl/html/division.xsl
xsl/html/docbook.xsl
xsl/html/ebnf.xsl
xsl/html/footnote.xsl
xsl/html/formal.xsl
xsl/html/glossary.xsl
xsl/html/graphics.xsl
xsl/html/highlight.xsl
xsl/html/html.xsl
xsl/html/htmltbl.xsl
xsl/html/index.xsl
xsl/html/info.xsl
xsl/html/inline.xsl
xsl/html/its.xsl
xsl/html/keywords.xsl
xsl/html/lists.xsl
xsl/html/maketoc.xsl
xsl/html/manifest.xsl
xsl/html/math.xsl
xsl/html/oldchunker.xsl
xsl/html/onechunk.xsl
xsl/html/pi.xsl
xsl/html/profile-chunk.xsl
xsl/html/profile-onechunk.xsl
xsl/html/publishers.xsl
xsl/html/qandaset.xsl
xsl/html/refentry.xsl
xsl/html/sections.xsl
xsl/html/synop.xsl
xsl/html/table.xsl
xsl/html/task.xsl
xsl/html/titlepage.xsl
xsl/html/toc.xsl
xsl/html/verbatim.xsl
xsl/html/xref.xsl
xsl/htmlhelp/htmlhelp-common.xsl
xsl/htmlhelp/htmlhelp.xsl
xsl/htmlhelp/profile-htmlhelp.xsl
xsl/javahelp/javahelp.xsl
xsl/manpages/block.xsl
xsl/manpages/charmap.groff.xsl
xsl/manpages/docbook.xsl
xsl/manpages/endnotes.xsl
xsl/manpages/info.xsl
xsl/manpages/inline.xsl
xsl/manpages/lists.xsl
xsl/manpages/other.xsl
xsl/manpages/pi.xsl
xsl/manpages/refentry.xsl
xsl/manpages/synop.xsl
xsl/manpages/table.xsl
xsl/manpages/utility.xsl
xsl/profiling/profile-mode.xsl
xsl/profiling/profile.xsl
xsl/profiling/strip-attributes.xsl
xsl/profiling/xsl2profile.xsl
xsl/roundtrip/blocks2dbk.xsl
xsl/roundtrip/dbk2ooo.xsl
xsl/roundtrip/dbk2pages.xsl
xsl/roundtrip/dbk2wordml.xsl
xsl/roundtrip/dbk2wp.xsl
xsl/roundtrip/normalise2sections.xsl
xsl/roundtrip/pages2normalise.xsl
xsl/roundtrip/sections2blocks.xsl
xsl/roundtrip/wordml2normalise.xsl
xsl/template/titlepage.xsl
xsl/webhelp/xsl/titlepage.templates.xsl
xsl/webhelp/xsl/webhelp-common.xsl
xsl/webhelp/xsl/webhelp.xsl
xsl/xhtml5/chunk.xsl
xsl/xhtml5/chunkfast.xsl
xsl/xhtml5/docbook.xsl
xsl/xhtml5/html5-chunk-mods.xsl
xsl/xhtml5/html5-element-mods.xsl
xsl/xhtml5/onechunk.xsl
xsl/xhtml5/profile-chunk.xsl
xsl/xhtml5/profile-docbook.xsl
xsl/xhtml5/xhtml-profile-docbook.xsl
xsl/xhtml5/xhtml2xhtml5.xsl

index cd28c1b9b429b6057dc417b8c003bddd67a96229..22e4db75af7202592546f2a36185e3bb11b3156b 100644 (file)
@@ -1,14 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns="http://docbook.org/ns/docbook"
-  exclude-result-prefixes="exsl d xlink"
+  exclude-result-prefixes="exsl d xlink d"
   version="1.0">
 
 <xsl:preserve-space elements="*"/>
-<xsl:strip-space elements="assembly structure module resources resource"/>
+<xsl:strip-space elements="d:assembly d:structure d:module d:resources d:resource"/>
 
 <xsl:key name="id" match="*" use="@id|@xml:id"/>
 
 <xsl:template match="processing-instruction('oxygen')"/>
 
 <!-- skip assembly info elements -->
-<xsl:template match="info"/>
+<xsl:template match="d:info"/>
 
 <!-- including for structure info element -->
-<xsl:template match="structure/info"/>
+<xsl:template match="d:structure/d:info"/>
 
 <!-- handle omittitles, but only top level title of resource -->
-<xsl:template match="/*/title 
-                   | /*/info/title 
-                   | /*/subtitle  
-                   | /*/info/subtitle
-                   | /*/titleabbrev  
-                   | /*/info/titleabbrev"
+<xsl:template match="/*/d:title
+                   | /*/d:info/d:title
+                   | /*/d:subtitle
+                   | /*/d:info/d:subtitle
+                   | /*/d:titleabbrev
+                   | /*/d:info/d:titleabbrev"
               mode="copycontent">
   <xsl:param name="omittitles"/>
 
 </xsl:template>
 
 <!-- handled in a mode -->
-<xsl:template match="resources"/>
-<xsl:template match="output|filterin|filterout|merge|revhistory"/>
-<xsl:template match="output|filterin|filterout|merge|revhistory"
+<xsl:template match="d:resources"/>
+<xsl:template match="d:output|d:filterin|d:filterout|d:merge|d:revhistory"/>
+<xsl:template match="d:output|d:filterin|d:filterout|d:merge|d:revhistory"
               mode="copycontent"/>
 
-<xsl:template match="assembly">
+<xsl:template match="d:assembly">
   <xsl:choose>
     <xsl:when test="$structure.id != ''">
       <xsl:variable name="id.structure" select="key('id', $structure.id)"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
-    <xsl:when test="$output.type != '' and not(structure[@type = $output.type])">
+    <xsl:when test="$output.type != '' and not(d:structure[@type = $output.type])">
       <xsl:message terminate="yes">
         <xsl:text>ERROR: output.type param set to '</xsl:text>
         <xsl:value-of select="$output.type"/>
         <xsl:text> but no structure element has that type attribute. Exiting.</xsl:text>
       </xsl:message>
     </xsl:when>
-    <xsl:when test="$output.type != '' and structure[@type = $output.type]">
-      <xsl:apply-templates select="structure[@type = $output.type][1]"/>
+    <xsl:when test="$output.type != '' and d:structure[@type = $output.type]">
+      <xsl:apply-templates select="d:structure[@type = $output.type][1]"/>
     </xsl:when>
     <xsl:otherwise>
       <!-- otherwise process the first structure -->
-      <xsl:apply-templates select="structure[1]"/>
+      <xsl:apply-templates select="d:structure[1]"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="structure[not(@resourceref)]">
+<xsl:template match="d:structure[not(@resourceref)]">
 
   <xsl:variable name="output.root.element">
     <xsl:apply-templates select="." mode="compute.element.name"/>
 
     <!-- use the merge element if present -->
     <xsl:call-template name="merge.info">
-      <xsl:with-param name="merge.element" select="merge"/>
+      <xsl:with-param name="merge.element" select="d:merge"/>
     </xsl:call-template>
 
     <xsl:apply-templates> 
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="glossary|bibliography|index|toc">
+<xsl:template match="d:glossary|d:bibliography|d:index|d:toc">
    <xsl:param name="parent" select="''"/>
   <xsl:apply-templates select="." mode="copycontent"/>
 </xsl:template>
 
-<xsl:template match="title|titleabbrev|subtitle">
+<xsl:template match="d:title|d:titleabbrev|d:subtitle">
    <xsl:param name="parent" select="''"/>
   <xsl:apply-templates select="." mode="copycontent"/>
 </xsl:template>
 
 <!-- module without a resourceref creates an element -->
-<xsl:template match="module[not(@resourceref)]">
+<xsl:template match="d:module[not(@resourceref)]">
   <xsl:param name="parent" select="''"/>
   
   <xsl:variable name="module" select="."/>
     </xsl:choose>
 
     <xsl:call-template name="merge.info">
-      <xsl:with-param name="merge.element" select="$module/merge"/>
+      <xsl:with-param name="merge.element" select="$module/d:merge"/>
     </xsl:call-template>
       
     <xsl:apply-templates>
   <xsl:param name="property" select="''"/>
   
   <xsl:variable name="default.format"
-                select="ancestor::structure/@defaultformat"/>
+                select="ancestor::d:structure/@defaultformat"/>
 
   <xsl:variable name="property.value">
     <xsl:choose>
            and it has that property -->
       <!-- The format attribute can be multivalued -->
       <xsl:when test="$output.format != '' and 
-                      output[contains(concat(' ', normalize-space(@format), ' '),  
+                      d:output[contains(concat(' ', normalize-space(@format), ' '),
                                  $output.format)]
                         [@*[local-name() = $property]]">
         <xsl:value-of 
-           select="output[contains(concat(' ', normalize-space(@format), ' '), 
+           select="d:output[contains(concat(' ', normalize-space(@format), ' '),
                               $output.format)]
                            [@*[local-name() = $property]][1]
                            /@*[local-name() = $property]"/>
       </xsl:when>
       <!-- try with the structure's @defaultformat -->
       <xsl:when test="$default.format != '' and 
-                      output[contains(concat(' ', normalize-space(@format), ' '),  
+                      d:output[contains(concat(' ', normalize-space(@format), ' '),
                                  $default.format)]
                         [@*[local-name() = $property]]">
         <xsl:value-of 
-           select="output[contains(concat(' ', normalize-space(@format), ' '), 
+           select="d:output[contains(concat(' ', normalize-space(@format), ' '),
                               $default.format)]
                            [@*[local-name() = $property]][1]
                            /@*[local-name() = $property]"/>
       </xsl:when>
       <!-- try the first output with the property-->
-      <xsl:when test="output[@*[local-name() = $property]]">
+      <xsl:when test="d:output[@*[local-name() = $property]]">
         <xsl:value-of 
-           select="output[@*[local-name() = $property]][1]
+           select="d:output[@*[local-name() = $property]][1]
                            /@*[local-name() = $property]"/>
       </xsl:when>
       <!-- and try the module element itself -->
   <xsl:value-of select="$property.value"/>
 </xsl:template>
 
-<xsl:template match="module[not(@resourceref)]" mode="compute.element.name">
+<xsl:template match="d:module[not(@resourceref)]" mode="compute.element.name">
 
   <xsl:variable name="renderas">
     <xsl:call-template name="compute.renderas"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="module[@resourceref]" mode="compute.element.name">
+<xsl:template match="d:module[@resourceref]" mode="compute.element.name">
   <xsl:param name="ref.name" select="''"/>
 
   <xsl:variable name="renderas">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="structure" mode="compute.element.name">
+<xsl:template match="d:structure" mode="compute.element.name">
   <xsl:param name="ref.name" select="''"/>
 
   <xsl:variable name="renderas">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="module[@resourceref] | structure[@resourceref]">
+<xsl:template match="d:module[@resourceref] | d:structure[@resourceref]">
   <xsl:param name="parent" select="''"/>
 
   <xsl:variable name="module" select="."/>
         <xsl:text>'.</xsl:text>
       </xsl:message>
     </xsl:when>
-    <xsl:when test="not($resource/self::resource)">
+    <xsl:when test="not($resource/self::d:resource)">
       <xsl:message terminate="yes">
         <xsl:text>ERROR: xml:id matching @resourceref = '</xsl:text>
         <xsl:value-of select="$resourceref"/>
 
   <xsl:variable name="fileref">
     <xsl:choose>
-      <xsl:when test="$resource/ancestor::resources/@xml:base">
+      <xsl:when test="$resource/ancestor::d:resources/@xml:base">
         <xsl:value-of 
-            select="concat($resource/ancestor::resources[@xml:base][1]/@xml:base,
+            select="concat($resource/ancestor::d:resources[@xml:base][1]/@xml:base,
                                  '/', $filename)"/>
       </xsl:when>
       <xsl:otherwise>
               </xsl:choose>
           
               <xsl:call-template name="merge.info">
-                <xsl:with-param name="merge.element" select="$module/merge"/>
+                <xsl:with-param name="merge.element" select="$module/d:merge"/>
                 <xsl:with-param name="ref.content" select="$ref.content"/>
                 <xsl:with-param name="omittitles" select="$omittitles.property"/>
               </xsl:call-template>
             </xsl:choose>
         
             <xsl:call-template name="merge.info">
-              <xsl:with-param name="merge.element" select="merge"/>
+              <xsl:with-param name="merge.element" select="d:merge"/>
               <xsl:with-param name="ref.content" select="$ref.content"/>
               <xsl:with-param name="omittitles" select="$omittitles.property"/>
             </xsl:call-template>
             <xsl:text>'.</xsl:text>
           </xsl:message>
         </xsl:when>
-        <xsl:when test="not($resource/self::resource)">
+        <xsl:when test="not($resource/self::d:resource)">
           <xsl:message terminate="yes">
             <xsl:text>ERROR: xml:id matching @resourceref = '</xsl:text>
             <xsl:value-of select="$resourceref"/>
 
       <xsl:variable name="fileref">
         <xsl:choose>
-          <xsl:when test="$resource/ancestor::resources/@xml:base">
+          <xsl:when test="$resource/ancestor::d:resources/@xml:base">
             <xsl:value-of 
-                select="concat($resource/ancestor::resources[@xml:base][1]/@xml:base,
+                select="concat($resource/ancestor::d:resources[@xml:base][1]/@xml:base,
                                '/', $href.att)"/>
           </xsl:when>
           <xsl:otherwise>
   </xsl:variable>
 
   <xsl:variable name="merge.ref.info" 
-                select="exsl:node-set($merge.ref.content)//info[1]"/>
+                select="exsl:node-set($merge.ref.content)//d:info[1]"/>
 
   <xsl:if test="$merge.element/@resourceref and not($merge.ref.info)">
     <xsl:message terminate="yes">
   <!-- output info if there is any -->
   <xsl:if test="$merge.element/node() or 
                 $merge.ref.info/node() or
-                $ref.content/info/node() or
-                $ref.content/title[$omittitles.boolean = 0] or
-                $ref.content/subtitle[$omittitles.boolean = 0] or
-                $ref.content/titleabbrev[$omittitles.boolean = 0]">
-
-    <xsl:variable name="ref.info" select="$ref.content/info"/>
-    <xsl:variable name="ref.title" select="$ref.content/title"/>
-    <xsl:variable name="ref.subtitle" select="$ref.content/subtitle"/>
-    <xsl:variable name="ref.titleabbrev" select="$ref.content/titleabbrev"/>
-    <xsl:variable name="ref.info.title" select="$ref.content/info/title"/>
-    <xsl:variable name="ref.info.subtitle" select="$ref.content/info/subtitle"/>
-    <xsl:variable name="ref.info.titleabbrev" select="$ref.content/info/titleabbrev"/>
+                $ref.content/d:info/node() or
+                $ref.content/d:title[$omittitles.boolean = 0] or
+                $ref.content/d:subtitle[$omittitles.boolean = 0] or
+                $ref.content/d:titleabbrev[$omittitles.boolean = 0]">
+
+    <xsl:variable name="ref.info" select="$ref.content/d:info"/>
+    <xsl:variable name="ref.title" select="$ref.content/d:title"/>
+    <xsl:variable name="ref.subtitle" select="$ref.content/d:subtitle"/>
+    <xsl:variable name="ref.titleabbrev" select="$ref.content/d:titleabbrev"/>
+    <xsl:variable name="ref.info.title" select="$ref.content/d:info/d:title"/>
+    <xsl:variable name="ref.info.subtitle" select="$ref.content/d:info/d:subtitle"/>
+    <xsl:variable name="ref.info.titleabbrev" select="$ref.content/d:info/d:titleabbrev"/>
 
     <info>
       <!-- First copy through any merge attributes and elements and comments -->
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="relationships">
+<xsl:template match="d:relationships">
   <xsl:message>
     <xsl:text>WARNING: the &lt;relationships&gt; element is not currently </xsl:text>
     <xsl:text>supported by this stylesheet.</xsl:text>
   </xsl:message>
 </xsl:template>
 
-<xsl:template match="transforms">
+<xsl:template match="d:transforms">
   <xsl:message>
     <xsl:text>WARNING: the &lt;transforms&gt; element is not currently </xsl:text>
     <xsl:text>supported by this stylesheet.</xsl:text>
   </xsl:message>
 </xsl:template>
 
-<xsl:template match="filterin">
+<xsl:template match="d:filterin">
   <xsl:message>
     <xsl:text>WARNING: the &lt;filterin&gt; element is not currently </xsl:text>
     <xsl:text>supported by this stylesheet.</xsl:text>
   </xsl:message>
 </xsl:template>
 
-<xsl:template match="filterout">
+<xsl:template match="d:filterout">
   <xsl:message>
     <xsl:text>WARNING: the &lt;filterin&gt; element is not currently </xsl:text>
     <xsl:text>supported by this stylesheet.</xsl:text>
index 8f411dd03ac0083ad0710dd4c8137d82b3e2b809..4554359e2f7e286f9f5deb04b3a6283686b65d40 100644 (file)
@@ -1,9 +1,10 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
                 xmlns="http://docbook.org/ns/docbook"
                version="1.0"
-                exclude-result-prefixes="exsl">
+                exclude-result-prefixes="exsl d">
 
 
 <xsl:import href="topic-maker.xsl"/>
@@ -72,7 +73,7 @@
           <xsl:value-of select="$root.resourceref"/>
         </xsl:attribute>
     
-        <xsl:copy-of select="($root/title | $root/info/title)[1]"/>
+        <xsl:copy-of select="($root/d:title | $root/d:info/d:title)[1]"/>
     
         <!-- Put the title and info stuff in a content-only module -->
         <module resourceref="{$root.resourceref}{$root.id.suffix}" contentonly="true"/>
index 5938e53fa3d069fb53c9bb795e1ee15f9e8cb61c..25e64a601027f08ea93791dc0b3a5bec97651f45 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns="http://docbook.org/ns/docbook"
-  exclude-result-prefixes="exsl"
+  exclude-result-prefixes="exsl d"
   version="1.0">
 
 <!-- This stylesheet convert DocBook elements into topic element.
@@ -47,7 +48,7 @@
    </xsl:copy>
 </xsl:template>
 
-<xsl:template match="preface|chapter|appendix|section|article">
+<xsl:template match="d:preface|d:chapter|d:appendix|d:section|d:article">
   <xsl:variable name="element.name">
     <xsl:call-template name="element.name"/>
   </xsl:variable>
index fb2cb1cb30ce4cf635ab35cd23cd12d85076a902..be1049a67e0865147c31c3324d602836c2245aa3 100644 (file)
@@ -8,9 +8,10 @@
 <!ENTITY lang 'concat(/*/@lang, /*/@xml:lang)'>
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0"
                 xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService"
-                exclude-result-prefixes="k">
+                exclude-result-prefixes="k d">
 
 <!-- ********************************************************************
 
@@ -36,7 +37,7 @@
 
 <!-- The following key used in the kimber indexing method. -->
 <xsl:key name="k-group"
-         match="indexterm"
+         match="d:indexterm"
          use="k:getIndexGroupKey(&lang;, &primary;)"/>
 
 </xsl:stylesheet>
index 7b6bf109ada8a1b8425f2688ec41d7641d0791ff..9f8ae4f565f8e5769284d322e00f2adc86005546 100644 (file)
@@ -4,13 +4,14 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0"
                 xmlns:func="http://exslt.org/functions"
                 xmlns:exslt="http://exslt.org/common"
                 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 extension-element-prefixes="func exslt"
-                exclude-result-prefixes="func exslt i l"
+                exclude-result-prefixes="func exslt i l d"
                 xmlns:i="urn:cz-kosek:functions:index">
 
 <!-- ********************************************************************
 </func:function>
 
 <xsl:key name="group-code"
-         match="indexterm"
+         match="d:indexterm"
          use="i:group-index(&primary;)"/>
 
 </xsl:stylesheet>
index 81c9fdb4bdd96e16305ed44cbcddc0fdc0b23d48..5adc9ded424b489711585414e34dc28f01482a12 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:dyn="http://exslt.org/dynamic"
                 xmlns:saxon="http://icl.com/saxon"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="doc dyn saxon"
+                exclude-result-prefixes="doc dyn saxon d"
                 version='1.0'>
 
 <!-- ********************************************************************
index 2ad182d61a42c0dd92e68f22ea2aef0178e78bf5..59f51dfd0a183905c2d5ef5f8a62979cca88a910 100644 (file)
@@ -4,10 +4,11 @@
 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
  ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:dyn="http://exslt.org/dynamic"
                 xmlns:saxon="http://icl.com/saxon"
-                exclude-result-prefixes="doc dyn saxon"
+                exclude-result-prefixes="doc dyn saxon d"
                 version='1.0'>
 
 <!-- ********************************************************************
 <xsl:preserve-space elements="*"/>
 
 <xsl:strip-space elements="
-abstract affiliation anchor answer appendix area areaset areaspec
-artheader article audiodata audioobject author authorblurb authorgroup
-beginpage bibliodiv biblioentry bibliography biblioset blockquote book
-bookinfo callout calloutlist caption caution chapter
-citerefentry cmdsynopsis co collab colophon colspec confgroup
-copyright dedication docinfo editor entrytbl epigraph equation
-example figure footnote footnoteref formalpara funcprototype
-funcsynopsis glossary glossdef glossdiv glossentry glosslist graphicco
-group highlights imagedata imageobject imageobjectco important index
-indexdiv indexentry indexterm info informalequation informalexample
-informalfigure informaltable inlineequation inlinemediaobject
-itemizedlist itermset keycombo keywordset legalnotice listitem lot
-mediaobject mediaobjectco menuchoice msg msgentry msgexplan msginfo
-msgmain msgrel msgset msgsub msgtext note objectinfo
-orderedlist othercredit part partintro preface printhistory procedure
-programlistingco publisher qandadiv qandaentry qandaset question
-refentry reference refmeta refnamediv refsection refsect1 refsect1info refsect2
-refsect2info refsect3 refsect3info refsynopsisdiv refsynopsisdivinfo
-revhistory revision row sbr screenco screenshot sect1 sect1info sect2
-sect2info sect3 sect3info sect4 sect4info sect5 sect5info section
-sectioninfo seglistitem segmentedlist seriesinfo set setindex setinfo
-shortcut sidebar simplelist simplesect spanspec step subject
-subjectset substeps synopfragment table tbody textobject tfoot tgroup
-thead tip toc tocchap toclevel1 toclevel2 toclevel3 toclevel4
-toclevel5 tocpart topic varargs variablelist varlistentry videodata
-videoobject void warning subjectset
-
-classsynopsis
-constructorsynopsis
-destructorsynopsis
-fieldsynopsis
-methodparam
-methodsynopsis
-ooclass
-ooexception
-oointerface
-simplemsgentry
-manvolnum
+d:abstract d:affiliation d:anchor d:answer d:appendix d:area d:areaset d:areaspec
+d:artheader d:article d:audiodata d:audioobject d:author d:authorblurb d:authorgroup
+d:beginpage d:bibliodiv d:biblioentry d:bibliography d:biblioset d:blockquote d:book
+d:bookinfo d:callout d:calloutlist d:caption d:caution d:chapter
+d:citerefentry d:cmdsynopsis d:co d:collab d:colophon d:colspec d:confgroup
+d:copyright d:dedication d:docinfo d:editor d:entrytbl d:epigraph d:equation
+d:example d:figure d:footnote d:footnoteref d:formalpara d:funcprototype
+d:funcsynopsis d:glossary d:glossdef d:glossdiv d:glossentry d:glosslist d:graphicco
+d:group d:highlights d:imagedata d:imageobject d:imageobjectco d:important d:index
+d:indexdiv d:indexentry d:indexterm d:info d:informalequation d:informalexample
+d:informalfigure d:informaltable d:inlineequation d:inlinemediaobject
+d:itemizedlist d:itermset d:keycombo d:keywordset d:legalnotice d:listitem d:lot
+d:mediaobject d:mediaobjectco d:menuchoice d:msg d:msgentry d:msgexplan d:msginfo
+d:msgmain d:msgrel d:msgset d:msgsub d:msgtext d:note d:objectinfo
+d:orderedlist d:othercredit d:part d:partintro d:preface d:printhistory d:procedure
+d:programlistingco d:publisher d:qandadiv d:qandaentry d:qandaset d:question
+d:refentry d:reference d:refmeta d:refnamediv d:refsection d:refsect1 d:refsect1info d:refsect2
+d:refsect2info d:refsect3 d:refsect3info d:refsynopsisdiv d:refsynopsisdivinfo
+d:revhistory d:revision d:row d:sbr d:screenco d:screenshot d:sect1 d:sect1info d:sect2
+d:sect2info d:sect3 d:sect3info d:sect4 d:sect4info d:sect5 d:sect5info d:section
+d:sectioninfo d:seglistitem d:segmentedlist d:seriesinfo d:set d:setindex d:setinfo
+d:shortcut d:sidebar d:simplelist d:simplesect d:spanspec d:step d:subject
+d:subjectset d:substeps d:synopfragment d:table d:tbody d:textobject d:tfoot d:tgroup
+d:thead d:tip d:toc d:tocchap d:toclevel1 d:toclevel2 d:toclevel3 d:toclevel4
+d:toclevel5 d:tocpart d:topic d:varargs d:variablelist d:varlistentry d:videodata
+d:videoobject d:void d:warning d:subjectset
+
+d:classsynopsis
+d:constructorsynopsis
+d:destructorsynopsis
+d:fieldsynopsis
+d:methodparam
+d:methodsynopsis
+d:ooclass
+d:ooexception
+d:oointerface
+d:simplemsgentry
+d:manvolnum
 "/>
 <!-- ====================================================================== -->
 
@@ -203,11 +204,11 @@ Defaults to the context node.</para>
     <xsl:when test="local-name($node)='sect5'">5</xsl:when>
     <xsl:when test="local-name($node)='section'">
       <xsl:choose>
-        <xsl:when test="$node/../../../../../../section">6</xsl:when>
-        <xsl:when test="$node/../../../../../section">5</xsl:when>
-        <xsl:when test="$node/../../../../section">4</xsl:when>
-        <xsl:when test="$node/../../../section">3</xsl:when>
-        <xsl:when test="$node/../../section">2</xsl:when>
+        <xsl:when test="$node/../../../../../../d:section">6</xsl:when>
+        <xsl:when test="$node/../../../../../d:section">5</xsl:when>
+        <xsl:when test="$node/../../../../d:section">4</xsl:when>
+        <xsl:when test="$node/../../../d:section">3</xsl:when>
+        <xsl:when test="$node/../../d:section">2</xsl:when>
         <xsl:otherwise>1</xsl:otherwise>
       </xsl:choose>
     </xsl:when>
@@ -222,16 +223,16 @@ Defaults to the context node.</para>
     </xsl:when>
     <xsl:when test="local-name($node)='simplesect'">
       <xsl:choose>
-        <xsl:when test="$node/../../sect1">2</xsl:when>
-        <xsl:when test="$node/../../sect2">3</xsl:when>
-        <xsl:when test="$node/../../sect3">4</xsl:when>
-        <xsl:when test="$node/../../sect4">5</xsl:when>
-        <xsl:when test="$node/../../sect5">5</xsl:when>
-        <xsl:when test="$node/../../section">
+        <xsl:when test="$node/../../d:sect1">2</xsl:when>
+        <xsl:when test="$node/../../d:sect2">3</xsl:when>
+        <xsl:when test="$node/../../d:sect3">4</xsl:when>
+        <xsl:when test="$node/../../d:sect4">5</xsl:when>
+        <xsl:when test="$node/../../d:sect5">5</xsl:when>
+        <xsl:when test="$node/../../d:section">
           <xsl:choose>
-            <xsl:when test="$node/../../../../../section">5</xsl:when>
-            <xsl:when test="$node/../../../../section">4</xsl:when>
-            <xsl:when test="$node/../../../section">3</xsl:when>
+            <xsl:when test="$node/../../../../../d:section">5</xsl:when>
+            <xsl:when test="$node/../../../../d:section">4</xsl:when>
+            <xsl:when test="$node/../../../d:section">3</xsl:when>
             <xsl:otherwise>2</xsl:otherwise>
           </xsl:choose>
         </xsl:when>
@@ -258,16 +259,16 @@ Defaults to the context node.</para>
 
 <xsl:template name="qanda.section.level">
   <xsl:variable name="section"
-                select="(ancestor::section
-                         |ancestor::simplesect
-                         |ancestor::sect5
-                         |ancestor::sect4
-                         |ancestor::sect3
-                         |ancestor::sect2
-                         |ancestor::sect1
-                         |ancestor::refsect3
-                         |ancestor::refsect2
-                         |ancestor::refsect1)[last()]"/>
+                select="(ancestor::d:section
+                         |ancestor::d:simplesect
+                         |ancestor::d:sect5
+                         |ancestor::d:sect4
+                         |ancestor::d:sect3
+                         |ancestor::d:sect2
+                         |ancestor::d:sect1
+                         |ancestor::d:refsect3
+                         |ancestor::d:refsect2
+                         |ancestor::d:refsect1)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="count($section) = '0'">1</xsl:when>
@@ -288,7 +289,7 @@ Defaults to the context node.</para>
 
   <xsl:variable name="RElevel">
     <xsl:call-template name="refentry.level">
-      <xsl:with-param name="node" select="$node/ancestor::refentry[1]"/>
+      <xsl:with-param name="node" select="$node/ancestor::d:refentry[1]"/>
     </xsl:call-template>
   </xsl:variable>
 
@@ -300,10 +301,10 @@ Defaults to the context node.</para>
       <xsl:when test="local-name($node)='refsect3'">3</xsl:when>
       <xsl:when test="local-name($node)='refsection'">
         <xsl:choose>
-          <xsl:when test="$node/../../../../../refsection">5</xsl:when>
-          <xsl:when test="$node/../../../../refsection">4</xsl:when>
-          <xsl:when test="$node/../../../refsection">3</xsl:when>
-          <xsl:when test="$node/../../refsection">2</xsl:when>
+          <xsl:when test="$node/../../../../../d:refsection">5</xsl:when>
+          <xsl:when test="$node/../../../../d:refsection">4</xsl:when>
+          <xsl:when test="$node/../../../d:refsection">3</xsl:when>
+          <xsl:when test="$node/../../d:refsection">2</xsl:when>
           <xsl:otherwise>1</xsl:otherwise>
         </xsl:choose>
       </xsl:when>
@@ -317,12 +318,12 @@ Defaults to the context node.</para>
 <xsl:template name="refentry.level">
   <xsl:param name="node" select="."/>
   <xsl:variable name="container"
-                select="($node/ancestor::section |
-                        $node/ancestor::sect1 |
-                        $node/ancestor::sect2 |
-                        $node/ancestor::sect3 |
-                        $node/ancestor::sect4 |
-                        $node/ancestor::sect5)[last()]"/>
+                select="($node/ancestor::d:section |
+                        $node/ancestor::d:sect1 |
+                        $node/ancestor::d:sect2 |
+                        $node/ancestor::d:sect3 |
+                        $node/ancestor::d:sect4 |
+                        $node/ancestor::d:sect5)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="$container">
@@ -341,7 +342,7 @@ Defaults to the context node.</para>
   <xsl:variable name="section.level">
     <xsl:call-template name="qanda.section.level"/>
   </xsl:variable>
-  <xsl:variable name="anc.divs" select="ancestor::qandadiv"/>
+  <xsl:variable name="anc.divs" select="ancestor::d:qandadiv"/>
 
   <xsl:value-of select="count($anc.divs) + number($section.level)"/>
 </xsl:template>
@@ -408,17 +409,17 @@ Defaults to the context node.</para>
     </xsl:when>
     <xsl:when test="$deflabel = 'number'
                     and local-name(.) = 'question'">
-      <xsl:apply-templates select="ancestor::qandaset[1]"
+      <xsl:apply-templates select="ancestor::d:qandaset[1]"
                            mode="number"/>
       <xsl:choose>
-        <xsl:when test="ancestor::qandadiv">
-          <xsl:apply-templates select="ancestor::qandadiv[1]"
+        <xsl:when test="ancestor::d:qandadiv">
+          <xsl:apply-templates select="ancestor::d:qandadiv[1]"
                                mode="number"/>
-          <xsl:apply-templates select="ancestor::qandaentry"
+          <xsl:apply-templates select="ancestor::d:qandaentry"
                                mode="number"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="ancestor::qandaentry"
+          <xsl:apply-templates select="ancestor::d:qandaentry"
                                mode="number"/>
         </xsl:otherwise>
       </xsl:choose>
@@ -429,21 +430,21 @@ Defaults to the context node.</para>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="qandaset" mode="number">
+<xsl:template match="d:qandaset" mode="number">
   <!-- FIXME: -->
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="number">
-  <xsl:number level="multiple" from="qandaset" format="1."/>
+<xsl:template match="d:qandadiv" mode="number">
+  <xsl:number level="multiple" from="d:qandaset" format="1."/>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="number">
+<xsl:template match="d:qandaentry" mode="number">
   <xsl:choose>
-    <xsl:when test="ancestor::qandadiv">
-      <xsl:number level="single" from="qandadiv" format="1."/>
+    <xsl:when test="ancestor::d:qandadiv">
+      <xsl:number level="single" from="d:qandadiv" format="1."/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:number level="single" from="qandaset" format="1."/>
+      <xsl:number level="single" from="d:qandaset" format="1."/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
@@ -492,9 +493,9 @@ Defaults to the context node.</para>
 
   <xsl:choose>
     <!-- the personname element is a specialcase -->
-    <xsl:when test="$node/personname">
+    <xsl:when test="$node/d:personname">
       <xsl:call-template name="person.name">
-        <xsl:with-param name="node" select="$node/personname"/>
+        <xsl:with-param name="node" select="$node/d:personname"/>
       </xsl:call-template>
     </xsl:when>
 
@@ -509,7 +510,7 @@ Defaults to the context node.</para>
     <xsl:otherwise>
       <xsl:choose>
         <!-- Handle case when personname contains only general markup (DocBook 5.0) -->
-        <xsl:when test="$node/self::personname and not($node/firstname or $node/honorific or $node/lineage or $node/othername or $node/surname)">
+        <xsl:when test="$node/self::d:personname and not($node/d:firstname or $node/d:honorific or $node/d:lineage or $node/d:othername or $node/d:surname)">
           <xsl:apply-templates select="$node/node()"/>
         </xsl:when>
         <xsl:when test="$style = 'family-given'">
@@ -537,13 +538,13 @@ Defaults to the context node.</para>
 
   <!-- The family-given style applies a convention for identifying given -->
   <!-- and family names in locales where it may be ambiguous -->
-  <xsl:apply-templates select="$node//surname[1]"/>
+  <xsl:apply-templates select="$node//d:surname[1]"/>
 
-  <xsl:if test="$node//surname and $node//firstname">
+  <xsl:if test="$node//d:surname and $node//d:firstname">
     <xsl:text> </xsl:text>
   </xsl:if>
 
-  <xsl:apply-templates select="$node//firstname[1]"/>
+  <xsl:apply-templates select="$node//d:firstname[1]"/>
 
   <xsl:text> [FAMILY Given]</xsl:text>
 </xsl:template>
@@ -551,48 +552,48 @@ Defaults to the context node.</para>
 <xsl:template name="person.name.last-first">
   <xsl:param name="node" select="."/>
 
-  <xsl:apply-templates select="$node//surname[1]"/>
+  <xsl:apply-templates select="$node//d:surname[1]"/>
 
-  <xsl:if test="$node//surname and $node//firstname">
+  <xsl:if test="$node//d:surname and $node//d:firstname">
     <xsl:text>, </xsl:text>
   </xsl:if>
 
-  <xsl:apply-templates select="$node//firstname[1]"/>
+  <xsl:apply-templates select="$node//d:firstname[1]"/>
 </xsl:template>
 
 <xsl:template name="person.name.first-last">
   <xsl:param name="node" select="."/>
 
-  <xsl:if test="$node//honorific">
-    <xsl:apply-templates select="$node//honorific[1]"/>
+  <xsl:if test="$node//d:honorific">
+    <xsl:apply-templates select="$node//d:honorific[1]"/>
     <xsl:value-of select="$punct.honorific"/>
   </xsl:if>
 
-  <xsl:if test="$node//firstname">
-    <xsl:if test="$node//honorific">
+  <xsl:if test="$node//d:firstname">
+    <xsl:if test="$node//d:honorific">
       <xsl:text> </xsl:text>
     </xsl:if>
-    <xsl:apply-templates select="$node//firstname[1]"/>
+    <xsl:apply-templates select="$node//d:firstname[1]"/>
   </xsl:if>
 
-  <xsl:if test="$node//othername and $author.othername.in.middle != 0">
-    <xsl:if test="$node//honorific or $node//firstname">
+  <xsl:if test="$node//d:othername and $author.othername.in.middle != 0">
+    <xsl:if test="$node//d:honorific or $node//d:firstname">
       <xsl:text> </xsl:text>
     </xsl:if>
-    <xsl:apply-templates select="$node//othername[1]"/>
+    <xsl:apply-templates select="$node//d:othername[1]"/>
   </xsl:if>
 
-  <xsl:if test="$node//surname">
-    <xsl:if test="$node//honorific or $node//firstname
-                  or ($node//othername and $author.othername.in.middle != 0)">
+  <xsl:if test="$node//d:surname">
+    <xsl:if test="$node//d:honorific or $node//d:firstname
+                  or ($node//d:othername and $author.othername.in.middle != 0)">
       <xsl:text> </xsl:text>
     </xsl:if>
-    <xsl:apply-templates select="$node//surname[1]"/>
+    <xsl:apply-templates select="$node//d:surname[1]"/>
   </xsl:if>
 
-  <xsl:if test="$node//lineage">
+  <xsl:if test="$node//d:lineage">
     <xsl:text>, </xsl:text>
-    <xsl:apply-templates select="$node//lineage[1]"/>
+    <xsl:apply-templates select="$node//d:lineage[1]"/>
   </xsl:if>
 </xsl:template>
 
@@ -608,7 +609,7 @@ Defaults to the context node.</para>
        John Doe, Jane Doe, and A. Nonymous
   -->
   <xsl:param name="person.list"
-             select="author|corpauthor|othercredit|editor"/>
+             select="d:author|d:corpauthor|d:othercredit|d:editor"/>
   <xsl:param name="person.count" select="count($person.list)"/>
   <xsl:param name="count" select="1"/>
 
@@ -853,8 +854,8 @@ in the list is appropriate.</para>
 
 <xsl:template name="select.mediaobject">
   <xsl:param name="olist"
-             select="imageobject|imageobjectco
-                     |videoobject|audioobject|textobject"/>
+             select="d:imageobject|d:imageobjectco
+                     |d:videoobject|d:audioobject|d:textobject"/>
   
   <xsl:variable name="mediaobject.index">
     <xsl:call-template name="select.mediaobject.index">
@@ -916,8 +917,8 @@ recursive process.</para>
 
 <xsl:template name="select.mediaobject.index">
   <xsl:param name="olist"
-             select="imageobject|imageobjectco
-                     |videoobject|audioobject|textobject"/>
+             select="d:imageobject|d:imageobjectco
+                     |d:videoobject|d:audioobject|d:textobject"/>
   <xsl:param name="count">1</xsl:param>
 
   <xsl:choose>
@@ -979,23 +980,23 @@ recursive process.</para>
             </xsl:when>
             <!-- skip textobject if also video, audio, or image out of order -->
             <xsl:when test="local-name($object) = 'textobject' and
-                            ../imageobject or
-                            ../audioobject or
-                            ../videoobject">
+                            ../d:imageobject or
+                            ../d:audioobject or
+                            ../d:videoobject">
               <xsl:text>0</xsl:text> 
             </xsl:when>
             <!-- The phrase is used only when contains TeX Math and output is FO -->
-            <xsl:when test="local-name($object)='textobject' and $object/phrase
+            <xsl:when test="local-name($object)='textobject' and $object/d:phrase
                             and $object/@role='tex' and $stylesheet.result.type = 'fo'
                             and $tex.math.in.alt != ''">
               <xsl:text>1</xsl:text> 
             </xsl:when>
             <!-- The phrase is never used -->
-            <xsl:when test="local-name($object)='textobject' and $object/phrase">
+            <xsl:when test="local-name($object)='textobject' and $object/d:phrase">
               <xsl:text>0</xsl:text>
             </xsl:when>
             <xsl:when test="local-name($object)='textobject'
-                            and $object/ancestor::equation ">
+                            and $object/ancestor::d:equation ">
             <!-- The first textobject is not a reasonable fallback
                  for equation image -->
               <xsl:text>0</xsl:text>
@@ -1007,8 +1008,8 @@ recursive process.</para>
             </xsl:when>
             <!-- don't use graphic when output is FO, TeX Math is used 
                  and there is math in alt element -->
-            <xsl:when test="$object/ancestor::equation and 
-                            $object/ancestor::equation/alt[@role='tex']
+            <xsl:when test="$object/ancestor::d:equation and
+                            $object/ancestor::d:equation/d:alt[@role='tex']
                             and $stylesheet.result.type = 'fo'
                             and $tex.math.in.alt != ''">
               <xsl:text>0</xsl:text>
@@ -1023,7 +1024,7 @@ recursive process.</para>
                 <!-- peek inside imageobjectco to simplify the test -->
                 <xsl:when test="local-name($object) = 'imageobjectco'">
                   <xsl:call-template name="is.acceptable.mediaobject">
-                    <xsl:with-param name="object" select="$object/imageobject"/>
+                    <xsl:with-param name="object" select="$object/d:imageobject"/>
                   </xsl:call-template>
                 </xsl:when>
                 <xsl:otherwise>
@@ -1091,9 +1092,9 @@ object is recognized as a graphic.</para>
   </xsl:variable>
 
   <!-- there will only be one -->
-  <xsl:variable name="data" select="$object/videodata
-                                    |$object/imagedata
-                                    |$object/audiodata"/>
+  <xsl:variable name="data" select="$object/d:videodata
+                                    |$object/d:imagedata
+                                    |$object/d:audiodata"/>
 
   <xsl:variable name="format" select="$data/@format"/>
 
@@ -1126,9 +1127,9 @@ object is recognized as a graphic.</para>
 <xsl:template name="mediaobject.filename">
   <xsl:param name="object"></xsl:param>
 
-  <xsl:variable name="data" select="$object/videodata
-                                    |$object/imagedata
-                                    |$object/audiodata
+  <xsl:variable name="data" select="$object/d:videodata
+                                    |$object/d:imagedata
+                                    |$object/d:audiodata
                                     |$object"/>
 
   <xsl:variable name="filename">
@@ -1283,7 +1284,7 @@ pointed to by the link is one of the elements listed in
   <xsl:choose>
     <xsl:when test="local-name($context) = 'substeps'">
       <xsl:variable name="ssdepth"
-                    select="count($context/ancestor::substeps)"/>
+                    select="count($context/ancestor::d:substeps)"/>
       <xsl:variable name="sstype" select="($ssdepth mod $format.length)+2"/>
       <xsl:choose>
         <xsl:when test="$sstype &gt; $format.length">
@@ -1296,7 +1297,7 @@ pointed to by the link is one of the elements listed in
     </xsl:when>
     <xsl:when test="local-name($context) = 'step'">
       <xsl:variable name="sdepth"
-                    select="count($context/ancestor::substeps)"/>
+                    select="count($context/ancestor::d:substeps)"/>
       <xsl:variable name="stype" select="($sdepth mod $format.length)+1"/>
       <xsl:value-of select="substring($procedure.step.numeration.formats,$stype,1)"/>
     </xsl:when>
@@ -1309,18 +1310,18 @@ pointed to by the link is one of the elements listed in
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="step" mode="number">
+<xsl:template match="d:step" mode="number">
   <xsl:param name="rest" select="''"/>
   <xsl:param name="recursive" select="1"/>
   <xsl:variable name="format">
     <xsl:call-template name="procedure.step.numeration"/>
   </xsl:variable>
   <xsl:variable name="num">
-    <xsl:number count="step" format="{$format}"/>
+    <xsl:number count="d:step" format="{$format}"/>
   </xsl:variable>
   <xsl:choose>
-    <xsl:when test="$recursive != 0 and ancestor::step">
-      <xsl:apply-templates select="ancestor::step[1]" mode="number">
+    <xsl:when test="$recursive != 0 and ancestor::d:step">
+      <xsl:apply-templates select="ancestor::d:step[1]" mode="number">
         <xsl:with-param name="rest" select="concat('.', $num, $rest)"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -1350,12 +1351,12 @@ pointed to by the link is one of the elements listed in
     <xsl:otherwise>
       <!-- match on previous list at same nesting level -->
       <xsl:variable name="prevlist" 
-       select="$list/preceding::orderedlist
-                [count($list/ancestor::orderedlist) = count(ancestor::orderedlist)][1]"/>
+       select="$list/preceding::d:orderedlist
+                [count($list/ancestor::d:orderedlist) = count(ancestor::d:orderedlist)][1]"/>
       <xsl:choose>
         <xsl:when test="count($prevlist) = 0">2</xsl:when>
         <xsl:otherwise>
-          <xsl:variable name="prevlength" select="count($prevlist/listitem)"/>
+          <xsl:variable name="prevlength" select="count($prevlist/d:listitem)"/>
           <xsl:variable name="prevstart">
             <xsl:call-template name="orderedlist-starting-number">
               <xsl:with-param name="list" select="$prevlist"/>
@@ -1375,10 +1376,10 @@ pointed to by the link is one of the elements listed in
     <xsl:when test="$node/@override">
       <xsl:value-of select="$node/@override"/>
     </xsl:when>
-    <xsl:when test="$node/preceding-sibling::listitem">
+    <xsl:when test="$node/preceding-sibling::d:listitem">
       <xsl:variable name="pnum">
         <xsl:call-template name="orderedlist-item-number">
-          <xsl:with-param name="node" select="$node/preceding-sibling::listitem[1]"/>
+          <xsl:with-param name="node" select="$node/preceding-sibling::d:listitem[1]"/>
         </xsl:call-template>
       </xsl:variable>
       <xsl:value-of select="$pnum + 1"/>
@@ -1413,11 +1414,11 @@ pointed to by the link is one of the elements listed in
     </xsl:when>
     <xsl:otherwise>
       <xsl:choose>
-        <xsl:when test="$node/ancestor::orderedlist">
+        <xsl:when test="$node/ancestor::d:orderedlist">
           <xsl:call-template name="next.numeration">
             <xsl:with-param name="numeration">
               <xsl:call-template name="list.numeration">
-                <xsl:with-param name="node" select="$node/ancestor::orderedlist[1]"/>
+                <xsl:with-param name="node" select="$node/ancestor::d:orderedlist[1]"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
@@ -1430,10 +1431,10 @@ pointed to by the link is one of the elements listed in
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem" mode="item-number">
+<xsl:template match="d:orderedlist/d:listitem" mode="item-number">
   <xsl:variable name="numeration">
     <xsl:call-template name="list.numeration">
-      <xsl:with-param name="node" select="parent::orderedlist"/>
+      <xsl:with-param name="node" select="parent::d:orderedlist"/>
     </xsl:call-template>
   </xsl:variable>
 
@@ -1459,9 +1460,9 @@ pointed to by the link is one of the elements listed in
     <xsl:call-template name="orderedlist-item-number"/>
   </xsl:variable>
 
-  <xsl:if test="parent::orderedlist/@inheritnum='inherit'
-                and ancestor::listitem[parent::orderedlist]">
-    <xsl:apply-templates select="ancestor::listitem[parent::orderedlist][1]"
+  <xsl:if test="parent::d:orderedlist/@inheritnum='inherit'
+                and ancestor::d:listitem[parent::d:orderedlist]">
+    <xsl:apply-templates select="ancestor::d:listitem[parent::d:orderedlist][1]"
                          mode="item-number"/>
   </xsl:if>
 
@@ -1493,11 +1494,11 @@ pointed to by the link is one of the elements listed in
     </xsl:when>
     <xsl:otherwise>
       <xsl:choose>
-        <xsl:when test="$node/ancestor::itemizedlist">
+        <xsl:when test="$node/ancestor::d:itemizedlist">
           <xsl:call-template name="next.itemsymbol">
             <xsl:with-param name="itemsymbol">
               <xsl:call-template name="list.itemsymbol">
-                <xsl:with-param name="node" select="$node/ancestor::itemizedlist[1]"/>
+                <xsl:with-param name="node" select="$node/ancestor::d:itemizedlist[1]"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
index 427ef0dd8f81fc8b65d0b774fab1a8ca0cb83286..93f20807eccd118e18300937707566902ce9d080 100644 (file)
      If @sortas is not present, the first item is empty, and the added space
      is removed when normalize-space is applied, leaving just the entry -->
 
-<!ENTITY primary   'normalize-space(concat(primary/@sortas, " ", primary))'>
-<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, " ", secondary))'>
-<!ENTITY tertiary  'normalize-space(concat(tertiary/@sortas, " ", tertiary))'>
+<!ENTITY primary   'normalize-space(concat(d:primary/@sortas, " ", d:primary))'>
+<!ENTITY secondary 'normalize-space(concat(d:secondary/@sortas, " ", d:secondary))'>
+<!ENTITY tertiary  'normalize-space(concat(d:tertiary/@sortas, " ", d:tertiary))'>
 
-<!ENTITY section   '(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]'>
+<!ENTITY section   '(ancestor-or-self::d:set|ancestor-or-self::d:book|ancestor-or-self::d:part|ancestor-or-self::d:reference|ancestor-or-self::d:partintro|ancestor-or-self::d:chapter|ancestor-or-self::d:appendix|ancestor-or-self::d:preface|ancestor-or-self::d:article|ancestor-or-self::d:section|ancestor-or-self::d:sect1|ancestor-or-self::d:sect2|ancestor-or-self::d:sect3|ancestor-or-self::d:sect4|ancestor-or-self::d:sect5|ancestor-or-self::d:refentry|ancestor-or-self::d:refsect1|ancestor-or-self::d:refsect2|ancestor-or-self::d:refsect3|ancestor-or-self::d:simplesect|ancestor-or-self::d:bibliography|ancestor-or-self::d:glossary|ancestor-or-self::d:index|ancestor-or-self::d:webpage|ancestor-or-self::d:topic)[last()]'>
 
 <!ENTITY section.id 'generate-id(&section;)'>
 <!ENTITY sep '" "'>
 '>
 
 <!-- Entity used in html/inline.xsl and fo/inline.xsl -->
-<!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
-                                parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
-                                parent::glossary|parent::glossdiv|parent::important|parent::index|
-                                parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
-                                parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
-                                parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
-                                parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
-                                parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
-                                parent::sect5|parent::section|parent::setindex|parent::sidebar|
-                                parent::simplesect|parent::taskprerequisites|parent::taskrelated|
-                                parent::tasksummary|parent::warning|parent::topic">
+<!ENTITY comment.block.parents "parent::d:answer|parent::d:appendix|parent::d:article|parent::d:bibliodiv|
+                                parent::d:bibliography|parent::d:blockquote|parent::d:caution|parent::d:chapter|
+                                parent::d:glossary|parent::d:glossdiv|parent::d:important|parent::d:index|
+                                parent::d:indexdiv|parent::d:listitem|parent::d:note|parent::d:orderedlist|
+                                parent::d:partintro|parent::d:preface|parent::d:procedure|parent::d:qandadiv|
+                                parent::d:qandaset|parent::d:question|parent::d:refentry|parent::d:refnamediv|
+                                parent::d:refsect1|parent::d:refsect2|parent::d:refsect3|parent::d:refsection|
+                                parent::d:refsynopsisdiv|parent::d:sect1|parent::d:sect2|parent::d:sect3|parent::d:sect4|
+                                parent::d:sect5|parent::d:section|parent::d:setindex|parent::d:sidebar|
+                                parent::d:simplesect|parent::d:taskprerequisites|parent::d:taskrelated|
+                                parent::d:tasksummary|parent::d:warning|parent::d:topic">
index a15e437810d3aa6d224857404d8633d29153b156..38dc46e136a25a8869d292d03045907b97a29441 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -24,7 +25,7 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="chapter" mode="object.title.template">
+<xsl:template match="d:chapter" mode="object.title.template">
   <xsl:choose>
     <xsl:when test="string($chapter.autolabel) != 0">
       <xsl:call-template name="gentext.template">
@@ -45,7 +46,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="appendix" mode="object.title.template">
+<xsl:template match="d:appendix" mode="object.title.template">
   <xsl:choose>
     <xsl:when test="string($appendix.autolabel) != 0">
       <xsl:call-template name="gentext.template">
@@ -66,7 +67,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="part" mode="object.title.template">
+<xsl:template match="d:part" mode="object.title.template">
   <xsl:choose>
     <xsl:when test="string($part.autolabel) != 0">
       <xsl:call-template name="gentext.template">
@@ -87,8 +88,8 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
-                     |bridgehead|topic"
+<xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:simplesect
+                     |d:bridgehead|d:topic"
               mode="object.title.template">
   <xsl:variable name="is.numbered">
     <xsl:call-template name="label.this.section"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="procedure" mode="object.title.template">
-  <xsl:variable name="title" select="title|blockinfo/title|info/title"/>
+<xsl:template match="d:procedure" mode="object.title.template">
+  <xsl:variable name="title" select="d:title|d:blockinfo/d:title|d:info/d:title"/>
   <xsl:choose>
     <xsl:when test="$formal.procedures != 0 and $title">
       <xsl:call-template name="gentext.template">
   <xsl:value-of select="'0'"/>
 </xsl:template>
 
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5" 
+<xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5"
               mode="is.autonumber">
   <xsl:call-template name="label.this.section"/>
 </xsl:template>
 
-<xsl:template match="figure|example|table|equation" mode="is.autonumber">
+<xsl:template match="d:figure|d:example|d:table|d:equation" mode="is.autonumber">
   <xsl:value-of select="'1'"/>
 </xsl:template>
 
-<xsl:template match="appendix" mode="is.autonumber">
+<xsl:template match="d:appendix" mode="is.autonumber">
   <xsl:value-of select="$appendix.autolabel"/>
 </xsl:template>
 
-<xsl:template match="chapter" mode="is.autonumber">
+<xsl:template match="d:chapter" mode="is.autonumber">
   <xsl:value-of select="$chapter.autolabel"/>
 </xsl:template>
 
-<xsl:template match="part" mode="is.autonumber">
+<xsl:template match="d:part" mode="is.autonumber">
   <xsl:value-of select="$part.autolabel"/>
 </xsl:template>
 
-<xsl:template match="preface" mode="is.autonumber">
+<xsl:template match="d:preface" mode="is.autonumber">
   <xsl:value-of select="$preface.autolabel"/>
 </xsl:template>
 
-<xsl:template match="question|answer" mode="is.autonumber">
+<xsl:template match="d:question|d:answer" mode="is.autonumber">
   <xsl:choose>
     <xsl:when test="$qanda.defaultlabel = 'number'
-                    and not(label)">
+                    and not(d:label)">
       <xsl:value-of select="'1'"/>
     </xsl:when>
     <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="is.autonumber">
+<xsl:template match="d:qandadiv" mode="is.autonumber">
   <xsl:value-of select="$qandadiv.autolabel"/>
 </xsl:template>
 
-<xsl:template match="bridgehead" mode="is.autonumber">
+<xsl:template match="d:bridgehead" mode="is.autonumber">
   <!-- bridgeheads are not numbered -->
   <xsl:text>0</xsl:text>
 </xsl:template>
 
-<xsl:template match="procedure" mode="is.autonumber">
+<xsl:template match="d:procedure" mode="is.autonumber">
   <xsl:value-of select="$formal.procedures"/>
 </xsl:template>
 
 
   <xsl:variable name="context">
     <xsl:choose>
-      <xsl:when test="self::equation and not(title) and not(info/title)">
+      <xsl:when test="self::d:equation and not(d:title) and not(d:info/d:title)">
          <xsl:value-of select="'xref-number'"/>
       </xsl:when>
       <xsl:when test="string($autonumber) != 0 
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="listitem" mode="object.xref.markup">
+<xsl:template match="d:listitem" mode="object.xref.markup">
   <xsl:param name="verbose" select="1"/>
 
   <xsl:choose>
-    <xsl:when test="parent::orderedlist">
+    <xsl:when test="parent::d:orderedlist">
       <xsl:variable name="template">
         <xsl:apply-templates select="." mode="object.xref.template"/>
       </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="question" mode="object.xref.markup">
+<xsl:template match="d:question" mode="object.xref.markup">
   <xsl:param name="purpose"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="referrer"/>
   <xsl:variable name="template">
     <xsl:choose>
       <!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
-      <xsl:when test="$deflabel = 'qanda' and not(label)">%n</xsl:when>
+      <xsl:when test="$deflabel = 'qanda' and not(d:label)">%n</xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates select="." mode="object.xref.template">
           <xsl:with-param name="purpose" select="$purpose"/>
               <xsl:choose>
                 <xsl:when test="$referrer">
                   <xsl:variable name="referent-is-below">
-                    <xsl:for-each select="preceding::xref">
+                    <xsl:for-each select="preceding::d:xref">
                       <xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
                     </xsl:for-each>
                   </xsl:variable>
index 310e30f83f8ff314523a5c8ab9ee72aae20108ec..94bd0496e2fbf057ba753dc16ebde4c69c8110a8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xi="http://www.w3.org/2001/XInclude"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xi="http://www.w3.org/2001/XInclude"
                 version='1.0'>
 
 <!-- ********************************************************************
 
 <!-- ==================================================================== -->
 
-<xsl:template match="textobject[child::textdata[@entityref|@fileref]]">
-  <xsl:apply-templates select="textdata"/>
+<xsl:template match="d:textobject[child::d:textdata[@entityref|@fileref]]">
+  <xsl:apply-templates select="d:textdata"/>
 </xsl:template>
 
-<xsl:template match="textdata[@entityref|@fileref]">
+<xsl:template match="d:textdata[@entityref|@fileref]">
   <xsl:variable name="filename">
     <xsl:call-template name="get.external.filename"/>
   </xsl:variable>
 <!-- ==================================================================== -->
 
 <xsl:template
-    match="inlinemediaobject
-           [child::imageobject
-           [child::imagedata
+    match="d:inlinemediaobject
+           [child::d:imageobject
+           [child::d:imagedata
            [@format = 'linespecific' and
            (@entityref|@fileref)]]]">
-  <xsl:apply-templates select="imageobject/imagedata"/>
+  <xsl:apply-templates select="d:imageobject/d:imagedata"/>
 </xsl:template>
 
-<xsl:template match="imagedata
+<xsl:template match="d:imagedata
                      [@format = 'linespecific' and
                      (@entityref|@fileref)]">
   <xsl:variable name="filename">
@@ -88,7 +90,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="inlinegraphic
+<xsl:template match="d:inlinegraphic
                      [@format = 'linespecific' and
                      (@entityref|@fileref)]">
   <xsl:variable name="filename">
index 83614c4e4e08f782711b08baef513685118193fc..63a19630b49b2b74231406edefdeb3f952ee6313 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-                exclude-result-prefixes="l"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
+                exclude-result-prefixes="l d"
                 version='1.0'>
 
 <!-- ********************************************************************
index df04e7ad8d9e1a28050e362ec4db74a5f2b928f0..2f132273b5647bdd193b23f91f9e50b832f83876 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -47,13 +48,13 @@ element label.</para>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="set|book" mode="label.markup">
+<xsl:template match="d:set|d:book" mode="label.markup">
   <xsl:if test="@label">
     <xsl:value-of select="@label"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="part" mode="label.markup">
+<xsl:template match="d:part" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
@@ -64,30 +65,30 @@ element label.</para>
           <xsl:with-param name="format" select="$part.autolabel"/>
         </xsl:call-template>
       </xsl:variable>
-      <xsl:number from="book" count="part" format="{$format}"/>
+      <xsl:number from="d:book" count="d:part" format="{$format}"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="partintro" mode="label.markup">
+<xsl:template match="d:partintro" mode="label.markup">
   <!-- no label -->
 </xsl:template>
 
-<xsl:template match="preface" mode="label.markup">
+<xsl:template match="d:preface" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="string($preface.autolabel) != 0">
       <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
+                      ancestor::d:part">
         <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="label.markup"/>
         </xsl:variable>
         <xsl:if test="$part.label != ''">
           <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="intralabel.punctuation">
             <xsl:with-param name="object" select="."/>
           </xsl:apply-templates>
@@ -99,32 +100,32 @@ element label.</para>
         </xsl:call-template>
       </xsl:variable>
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="preface" format="{$format}" level="any"/>
+        <xsl:when test="$label.from.part != 0 and ancestor::d:part">
+          <xsl:number from="d:part" count="d:preface" format="{$format}" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number from="book" count="preface" format="{$format}" level="any"/>
+          <xsl:number from="d:book" count="d:preface" format="{$format}" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="chapter" mode="label.markup">
+<xsl:template match="d:chapter" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="string($chapter.autolabel) != 0">
       <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
+                      ancestor::d:part">
         <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="label.markup"/>
         </xsl:variable>
         <xsl:if test="$part.label != ''">
           <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="intralabel.punctuation">
             <xsl:with-param name="object" select="."/>
           </xsl:apply-templates>
@@ -136,32 +137,32 @@ element label.</para>
         </xsl:call-template>
       </xsl:variable>
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="chapter" format="{$format}" level="any"/>
+        <xsl:when test="$label.from.part != 0 and ancestor::d:part">
+          <xsl:number from="d:part" count="d:chapter" format="{$format}" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number from="book" count="chapter" format="{$format}" level="any"/>
+          <xsl:number from="d:book" count="d:chapter" format="{$format}" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="appendix" mode="label.markup">
+<xsl:template match="d:appendix" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="string($appendix.autolabel) != 0">
       <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
+                      ancestor::d:part">
         <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="label.markup"/>
         </xsl:variable>
         <xsl:if test="$part.label != ''">
           <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="intralabel.punctuation">
             <xsl:with-param name="object" select="."/>
           </xsl:apply-templates>
@@ -173,45 +174,45 @@ element label.</para>
         </xsl:call-template>
       </xsl:variable>
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="appendix" format="{$format}" level="any"/>
+        <xsl:when test="$label.from.part != 0 and ancestor::d:part">
+          <xsl:number from="d:part" count="d:appendix" format="{$format}" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number from="book|article"
-                      count="appendix" format="{$format}" level="any"/>
+          <xsl:number from="d:book|d:article"
+                      count="d:appendix" format="{$format}" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="article" mode="label.markup">
+<xsl:template match="d:article" mode="label.markup">
   <xsl:if test="@label">
     <xsl:value-of select="@label"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="dedication|colophon" mode="label.markup">
+<xsl:template match="d:dedication|d:colophon" mode="label.markup">
   <xsl:if test="@label">
     <xsl:value-of select="@label"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="reference" mode="label.markup">
+<xsl:template match="d:reference" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
     </xsl:when>
     <xsl:when test="string($reference.autolabel) != 0">
       <xsl:if test="$component.label.includes.part.label != 0 and
-                      ancestor::part">
+                      ancestor::d:part">
         <xsl:variable name="part.label">
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="label.markup"/>
         </xsl:variable>
         <xsl:if test="$part.label != ''">
           <xsl:value-of select="$part.label"/>
-          <xsl:apply-templates select="ancestor::part" 
+          <xsl:apply-templates select="ancestor::d:part"
                                mode="intralabel.punctuation">
             <xsl:with-param name="object" select="."/>
           </xsl:apply-templates>
@@ -223,24 +224,24 @@ element label.</para>
         </xsl:call-template>
       </xsl:variable>
       <xsl:choose>
-        <xsl:when test="$label.from.part != 0 and ancestor::part">
-          <xsl:number from="part" count="reference" format="{$format}" level="any"/>
+        <xsl:when test="$label.from.part != 0 and ancestor::d:part">
+          <xsl:number from="d:part" count="d:reference" format="{$format}" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number from="book" count="reference" format="{$format}" level="any"/>
+          <xsl:number from="d:book" count="d:reference" format="{$format}" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="refentry" mode="label.markup">
+<xsl:template match="d:refentry" mode="label.markup">
   <xsl:if test="@label">
     <xsl:value-of select="@label"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="section" mode="label.markup">
+<xsl:template match="d:section" mode="label.markup">
   <!-- if this is a nested section, label the parent -->
   <xsl:if test="local-name(..) = 'section'">
     <xsl:variable name="parent.section.label">
@@ -285,7 +286,7 @@ element label.</para>
 
 <!--
   <xsl:message>
-    test: <xsl:value-of select="$label"/>, <xsl:number count="section"/>
+    test: <xsl:value-of select="$label"/>, <xsl:number count="d:section"/>
   </xsl:message>
 -->
 
@@ -299,12 +300,12 @@ element label.</para>
           <xsl:with-param name="format" select="$section.autolabel"/>
         </xsl:call-template>
       </xsl:variable>
-      <xsl:number format="{$format}" count="section"/>
+      <xsl:number format="{$format}" count="d:section"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="sect1" mode="label.markup">
+<xsl:template match="d:sect1" mode="label.markup">
   <!-- if the parent is a component, maybe label that too -->
   <xsl:variable name="parent.is.component">
     <xsl:call-template name="is.component">
@@ -343,12 +344,12 @@ element label.</para>
         </xsl:call-template>
       </xsl:variable>
       <xsl:copy-of select="$component.label"/>
-      <xsl:number format="{$format}" count="sect1"/>
+      <xsl:number format="{$format}" count="d:sect1"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
+<xsl:template match="d:sect2|d:sect3|d:sect4|d:sect5" mode="label.markup">
   <!-- label the parent -->
   <xsl:variable name="parent.section.label">
     <xsl:call-template name="label.this.section">
@@ -378,16 +379,16 @@ element label.</para>
       </xsl:variable>
       <xsl:choose>
         <xsl:when test="local-name(.) = 'sect2'">
-          <xsl:number format="{$format}" count="sect2"/>
+          <xsl:number format="{$format}" count="d:sect2"/>
         </xsl:when>
         <xsl:when test="local-name(.) = 'sect3'">
-          <xsl:number format="{$format}" count="sect3"/>
+          <xsl:number format="{$format}" count="d:sect3"/>
         </xsl:when>
         <xsl:when test="local-name(.) = 'sect4'">
-          <xsl:number format="{$format}" count="sect4"/>
+          <xsl:number format="{$format}" count="d:sect4"/>
         </xsl:when>
         <xsl:when test="local-name(.) = 'sect5'">
-          <xsl:number format="{$format}" count="sect5"/>
+          <xsl:number format="{$format}" count="d:sect5"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:message>label.markup: this can't happen!</xsl:message>
@@ -397,11 +398,11 @@ element label.</para>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bridgehead" mode="label.markup">
+<xsl:template match="d:bridgehead" mode="label.markup">
   <!-- bridgeheads are not normally numbered -->
 </xsl:template>
 
-<xsl:template match="refsect1" mode="label.markup">
+<xsl:template match="d:refsect1" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
@@ -412,12 +413,12 @@ element label.</para>
           <xsl:with-param name="format" select="$section.autolabel"/>
         </xsl:call-template>
       </xsl:variable>
-      <xsl:number count="refsect1" format="{$format}"/>
+      <xsl:number count="d:refsect1" format="{$format}"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="refsect2|refsect3" mode="label.markup">
+<xsl:template match="d:refsect2|d:refsect3" mode="label.markup">
   <!-- label the parent -->
   <xsl:variable name="parent.label">
     <xsl:apply-templates select=".." mode="label.markup"/>
@@ -441,17 +442,17 @@ element label.</para>
       </xsl:variable>
       <xsl:choose>
         <xsl:when test="local-name(.) = 'refsect2'">
-          <xsl:number count="refsect2" format="{$format}"/>
+          <xsl:number count="d:refsect2" format="{$format}"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number count="refsect3" format="{$format}"/>
+          <xsl:number count="d:refsect3" format="{$format}"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="simplesect" mode="label.markup">
+<xsl:template match="d:simplesect" mode="label.markup">
   <!-- if this is a nested section, label the parent -->
   <xsl:if test="local-name(..) = 'section'
                 or local-name(..) = 'sect1'
@@ -507,31 +508,31 @@ element label.</para>
           <xsl:with-param name="format" select="$section.autolabel"/>
         </xsl:call-template>
       </xsl:variable>
-      <xsl:number format="{$format}" count="simplesect"/>
+      <xsl:number format="{$format}" count="d:simplesect"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="topic" mode="label.markup">
+<xsl:template match="d:topic" mode="label.markup">
   <!-- topics are not numbered by default -->
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="label.markup">
-  <xsl:variable name="lparent" select="(ancestor::set
-                                       |ancestor::book
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::section
-                                       |ancestor::simplesect
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3)[last()]"/>
+<xsl:template match="d:qandadiv" mode="label.markup">
+  <xsl:variable name="lparent" select="(ancestor::d:set
+                                       |ancestor::d:book
+                                       |ancestor::d:chapter
+                                       |ancestor::d:appendix
+                                       |ancestor::d:preface
+                                       |ancestor::d:section
+                                       |ancestor::d:simplesect
+                                       |ancestor::d:sect1
+                                       |ancestor::d:sect2
+                                       |ancestor::d:sect3
+                                       |ancestor::d:sect4
+                                       |ancestor::d:sect5
+                                       |ancestor::d:refsect1
+                                       |ancestor::d:refsect2
+                                       |ancestor::d:refsect3)[last()]"/>
 
   <xsl:variable name="lparent.prefix">
     <xsl:apply-templates select="$lparent" mode="label.markup"/>
@@ -556,27 +557,27 @@ element label.</para>
         </xsl:call-template>
       </xsl:variable>
       <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandadiv" format="{$format}"/>
+      <xsl:number level="multiple" count="d:qandadiv" format="{$format}"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="question|answer" mode="label.markup">
-  <xsl:variable name="lparent" select="(ancestor::set
-                                       |ancestor::book
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::section
-                                       |ancestor::simplesect
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3)[last()]"/>
+<xsl:template match="d:question|d:answer" mode="label.markup">
+  <xsl:variable name="lparent" select="(ancestor::d:set
+                                       |ancestor::d:book
+                                       |ancestor::d:chapter
+                                       |ancestor::d:appendix
+                                       |ancestor::d:preface
+                                       |ancestor::d:section
+                                       |ancestor::d:simplesect
+                                       |ancestor::d:sect1
+                                       |ancestor::d:sect2
+                                       |ancestor::d:sect3
+                                       |ancestor::d:sect4
+                                       |ancestor::d:sect5
+                                       |ancestor::d:refsect1
+                                       |ancestor::d:refsect2
+                                       |ancestor::d:refsect3)[last()]"/>
 
   <xsl:variable name="lparent.prefix">
     <xsl:apply-templates select="$lparent" mode="label.markup"/>
@@ -585,13 +586,13 @@ element label.</para>
   <xsl:variable name="prefix">
     <xsl:if test="$qanda.inherit.numeration != 0">
       <xsl:choose>
-        <xsl:when test="ancestor::qandadiv">
+        <xsl:when test="ancestor::d:qandadiv">
           <xsl:variable name="div.label">
-            <xsl:apply-templates select="ancestor::qandadiv[1]" mode="label.markup"/>
+            <xsl:apply-templates select="ancestor::d:qandadiv[1]" mode="label.markup"/>
           </xsl:variable>
           <xsl:if test="string-length($div.label) != 0">
             <xsl:copy-of select="$div.label"/>
-            <xsl:apply-templates select="ancestor::qandadiv[1]"
+            <xsl:apply-templates select="ancestor::d:qandadiv[1]"
                                  mode="intralabel.punctuation">
               <xsl:with-param name="object" select="."/>
             </xsl:apply-templates>
@@ -608,7 +609,7 @@ element label.</para>
   </xsl:variable>
 
   <xsl:variable name="inhlabel"
-                select="ancestor-or-self::qandaset/@defaultlabel[1]"/>
+                select="ancestor-or-self::d:qandaset/@defaultlabel[1]"/>
 
   <xsl:variable name="deflabel">
     <xsl:choose>
@@ -621,60 +622,60 @@ element label.</para>
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:variable name="label" select="label"/>
+  <xsl:variable name="label" select="d:label"/>
 
   <xsl:choose>
     <xsl:when test="count($label)>0">
       <xsl:apply-templates select="$label"/>
     </xsl:when>
 
-    <xsl:when test="$deflabel = 'qanda' and self::question">
+    <xsl:when test="$deflabel = 'qanda' and self::d:question">
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'Question'"/>
       </xsl:call-template>
     </xsl:when>
 
-    <xsl:when test="$deflabel = 'qanda' and self::answer">
+    <xsl:when test="$deflabel = 'qanda' and self::d:answer">
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'Answer'"/>
       </xsl:call-template>
     </xsl:when>
 
     <xsl:when test="($deflabel = 'qnumber' or
-                     $deflabel = 'qnumberanda') and self::question">
+                     $deflabel = 'qnumberanda') and self::d:question">
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'Question'"/>
       </xsl:call-template>
       <xsl:text>&#xA0;</xsl:text>
       <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandaentry" format="1"/>
+      <xsl:number level="multiple" count="d:qandaentry" format="1"/>
     </xsl:when>
 
-    <xsl:when test="$deflabel = 'qnumberanda' and self::answer">
+    <xsl:when test="$deflabel = 'qnumberanda' and self::d:answer">
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'Answer'"/>
       </xsl:call-template>
     </xsl:when>
 
-    <xsl:when test="$deflabel = 'number' and self::question">
+    <xsl:when test="$deflabel = 'number' and self::d:question">
       <xsl:value-of select="$prefix"/>
-      <xsl:number level="multiple" count="qandaentry" format="1"/>
+      <xsl:number level="multiple" count="d:qandaentry" format="1"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliography|glossary|
-                     qandaset|index|setindex" mode="label.markup">
+<xsl:template match="d:bibliography|d:glossary|
+                     d:qandaset|d:index|d:setindex" mode="label.markup">
   <xsl:if test="@label">
     <xsl:value-of select="@label"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="figure|table|example" mode="label.markup">
+<xsl:template match="d:figure|d:table|d:example" mode="label.markup">
   <xsl:variable name="pchap"
-                select="(ancestor::chapter
-                        |ancestor::appendix
-                        |ancestor::article[ancestor::book])[last()]"/>
+                select="(ancestor::d:chapter
+                        |ancestor::d:appendix
+                        |ancestor::d:article[ancestor::d:book])[last()]"/>
 
   <xsl:variable name="prefix">
     <xsl:if test="count($pchap) &gt; 0">
@@ -693,21 +694,21 @@ element label.</para>
             <xsl:apply-templates select="$pchap" mode="intralabel.punctuation">
               <xsl:with-param name="object" select="."/>
             </xsl:apply-templates>
-          <xsl:number format="1" from="chapter|appendix" level="any"/>
+          <xsl:number format="1" from="d:chapter|d:appendix" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number format="1" from="book|article" level="any"/>
+          <xsl:number format="1" from="d:book|d:article" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="procedure" mode="label.markup">
+<xsl:template match="d:procedure" mode="label.markup">
   <xsl:variable name="pchap"
-                select="ancestor::chapter
-                        |ancestor::appendix
-                        |ancestor::article[ancestor::book]"/>
+                select="ancestor::d:chapter
+                        |ancestor::d:appendix
+                        |ancestor::d:article[ancestor::d:book]"/>
 
   <xsl:variable name="prefix">
     <xsl:if test="count($pchap) &gt; 0">
@@ -731,23 +732,23 @@ element label.</para>
               <xsl:with-param name="object" select="."/>
             </xsl:apply-templates>
           </xsl:if>
-          <xsl:number count="procedure[title|blockinfo/title|info/title]" format="1" 
-                      from="chapter|appendix" level="any"/>
+          <xsl:number count="d:procedure[d:title|d:blockinfo/d:title|d:info/d:title]" format="1"
+                      from="d:chapter|d:appendix" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number count="procedure[title|blockinfo/title|info/title]" format="1" 
-                      from="book|article" level="any"/>
+          <xsl:number count="d:procedure[d:title|d:blockinfo/d:title|d:info/d:title]" format="1"
+                      from="d:book|d:article" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="equation" mode="label.markup">
+<xsl:template match="d:equation" mode="label.markup">
   <xsl:variable name="pchap"
-                select="ancestor::chapter
-                        |ancestor::appendix
-                        |ancestor::article[ancestor::book]"/>
+                select="ancestor::d:chapter
+                        |ancestor::d:appendix
+                        |ancestor::d:article[ancestor::d:book]"/>
 
   <xsl:variable name="prefix">
     <xsl:if test="count($pchap) &gt; 0">
@@ -768,22 +769,22 @@ element label.</para>
               <xsl:with-param name="object" select="."/>
             </xsl:apply-templates>
           </xsl:if>
-          <xsl:number format="1" count="equation" 
-                      from="chapter|appendix" level="any"/>
+          <xsl:number format="1" count="d:equation"
+                      from="d:chapter|d:appendix" level="any"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number format="1" count="equation" 
-                      from="book|article" level="any"/>
+          <xsl:number format="1" count="d:equation"
+                      from="d:book|d:article" level="any"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem" mode="label.markup">
+<xsl:template match="d:orderedlist/d:listitem" mode="label.markup">
   <xsl:variable name="numeration">
     <xsl:call-template name="list.numeration">
-      <xsl:with-param name="node" select="parent::orderedlist"/>
+      <xsl:with-param name="node" select="parent::d:orderedlist"/>
     </xsl:call-template>
   </xsl:variable>
 
@@ -812,23 +813,23 @@ element label.</para>
   <xsl:number value="$item-number" format="{$type}"/>
 </xsl:template>
 
-<xsl:template match="production" mode="label.markup">
-  <xsl:number count="production" level="any"/>
+<xsl:template match="d:production" mode="label.markup">
+  <xsl:number count="d:production" level="any"/>
 </xsl:template>
 
-<xsl:template match="abstract" mode="label.markup">
+<xsl:template match="d:abstract" mode="label.markup">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="sidebar" mode="label.markup">
+<xsl:template match="d:sidebar" mode="label.markup">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="glossdiv|glosslist" mode="label.markup">
+<xsl:template match="d:glossdiv|d:glosslist" mode="label.markup">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="glossentry" mode="label.markup">
+<xsl:template match="d:glossentry" mode="label.markup">
   <!-- nop -->
 </xsl:template>
 
@@ -843,7 +844,7 @@ element label.</para>
 
   <xsl:choose>
     <!-- bridgeheads are not numbered -->
-    <xsl:when test="$section/self::bridgehead">0</xsl:when>
+    <xsl:when test="$section/self::d:bridgehead">0</xsl:when>
     <xsl:when test="$level &lt;= $section.autolabel.max.depth">      
       <xsl:value-of select="$section.autolabel"/>
     </xsl:when>
index 39297685ef0455b9bef6f58cd88a3c447c80c97c..5178194c370d3f13abb21c53153b44b3d44b6869 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version='1.0'?>
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
   xmlns:date="http://exslt.org/dates-and-times"
   xmlns:exsl="http://exslt.org/common"
   xmlns:xlink="http://www.w3.org/1999/xlink"
-  exclude-result-prefixes="doc date exsl"
+  exclude-result-prefixes="doc date exsl d"
   extension-element-prefixes="date exsl"
   version='1.0'>
 
index 344206252319a28465c30de89071698728224004..6fd898f16ce87b894d06cee86da1a3cf42adb589 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:date="http://exslt.org/dates-and-times"
-                exclude-result-prefixes="doc date"
+                exclude-result-prefixes="doc date d"
                 version='1.0'>
 
 <!-- ********************************************************************
 <xsl:template name="get.refentry.title">
   <xsl:param name="refname"/>
   <xsl:choose>
-    <xsl:when test="refmeta/refentrytitle">
+    <xsl:when test="d:refmeta/d:refentrytitle">
       <xsl:copy>
-        <xsl:apply-templates select="refmeta/refentrytitle/node()"/>
+        <xsl:apply-templates select="d:refmeta/d:refentrytitle/node()"/>
       </xsl:copy>
     </xsl:when>
     <xsl:otherwise>
   <xsl:param name="refname"/>
   <xsl:param name="quiet" select="0"/>
   <xsl:choose>
-    <xsl:when test="refmeta/manvolnum">
-      <xsl:value-of select="refmeta/manvolnum"/>
+    <xsl:when test="d:refmeta/d:manvolnum">
+      <xsl:value-of select="d:refmeta/d:manvolnum"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:if test="$quiet = 0">
         </xsl:if>
       </xsl:if>
       <xsl:choose>
-        <xsl:when test=".//funcsynopsis">
+        <xsl:when test=".//d:funcsynopsis">
           <xsl:if test="$quiet = 0">
             <xsl:if test="$refentry.meta.get.quietly = 0">
               <xsl:call-template name="log.message">
         <!-- * in *info -->
         <xsl:choose>
           <!-- * look for date or pubdate in *info -->
-          <xsl:when test="$info/date/node()
-                          |$info/pubdate/node()">
+          <xsl:when test="$info/d:date/node()
+                          |$info/d:pubdate/node()">
             <xsl:apply-templates
-                select="(($info[date])[last()]/date)[1]|
-                        (($info[pubdate])[last()]/pubdate)[1]"/>
+                select="(($info[d:date])[last()]/d:date)[1]|
+                        (($info[d:pubdate])[last()]/d:pubdate)[1]"/>
           </xsl:when>
           <xsl:otherwise>
             <!-- * found no Date or Pubdate -->
       <!-- * the source.name profile is empty; so we need to look -->
       <!-- * for a name to use -->
       <xsl:choose>
-        <xsl:when test="refmeta/refmiscinfo[@class = 'source' or @class = 'software']">
+        <xsl:when test="d:refmeta/d:refmiscinfo[@class = 'source' or @class = 'software']">
           <xsl:apply-templates 
-              select="refmeta/refmiscinfo[@class = 'source' or @class='software'][1]/node()"/>
+              select="d:refmeta/d:refmiscinfo[@class = 'source' or @class='software'][1]/node()"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:choose>
-            <xsl:when test="$info/productname">
+            <xsl:when test="$info/d:productname">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[productname])[last()]"/>
+                    select="($info[d:productname])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[productname])[last()]/productname)[1]"/>
+                    select="(($info[d:productname])[last()]/d:productname)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info/corpname">
+            <xsl:when test="$info/d:corpname">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[corpname])[last()]"/>
+                    select="($info[d:corpname])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[corpname])[last()]/corpname)[1]"/>
+                    select="(($info[d:corpname])[last()]/d:corpname)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
                 <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info/corpcredit">
+            <xsl:when test="$info/d:corpcredit">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[corpcredit])[last()]"/>
+                    select="($info[d:corpcredit])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[corpcredit])[last()]/corpcredit)[1]"/>
+                    select="(($info[d:corpcredit])[last()]/d:corpcredit)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
                 <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info/corpauthor">
+            <xsl:when test="$info/d:corpauthor">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[corpauthor])[last()]"/>
+                    select="($info[d:corpauthor])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[corpauthor])[last()]/corpauthor)[1]"/>
+                    select="(($info[d:corpauthor])[last()]/d:corpauthor)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
                 <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//orgname">
+            <xsl:when test="$info//d:orgname">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//orgname])[last()]"/>
+                    select="($info[//d:orgname])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//orgname])[last()]//orgname)[1]"/>
+                    select="(($info[//d:orgname])[last()]//d:orgname)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
                 <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info//publishername">
+            <xsl:when test="$info//d:publishername">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[//publishername])[last()]"/>
+                    select="($info[//d:publishername])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[//publishername])[last()]//publishername)[1]"/>
+                    select="(($info[//d:publishername])[last()]//d:publishername)[1]"/>
                 <xsl:with-param name="context">source</xsl:with-param>
                 <xsl:with-param name="preferred">productname</xsl:with-param>
               </xsl:call-template>
       <!-- * the source.name profile is empty; so we need to look -->
       <!-- * for a name to use -->
       <xsl:choose>
-        <xsl:when test="refmeta/refmiscinfo[@class = 'version']">
+        <xsl:when test="d:refmeta/d:refmiscinfo[@class = 'version']">
           <xsl:apply-templates 
-              select="refmeta/refmiscinfo[@class = 'version'][1]/node()"/>
+              select="d:refmeta/d:refmiscinfo[@class = 'version'][1]/node()"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:choose>
-            <xsl:when test="$info/productnumber">
+            <xsl:when test="$info/d:productnumber">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[productnumber])[last()]"/>
+                    select="($info[d:productnumber])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[productnumber])[last()]/productnumber)[1]"/>
+                    select="(($info[d:productnumber])[last()]/d:productnumber)[1]"/>
                 <xsl:with-param name="context">version</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info/edition">
+            <xsl:when test="$info/d:edition">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[edition])[last()]"/>
+                    select="($info[d:edition])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[edition])[last()]/edition)[1]"/>
+                    select="(($info[d:edition])[last()]/d:edition)[1]"/>
                 <xsl:with-param name="context">version</xsl:with-param>
                 <xsl:with-param name="preferred">productnumber</xsl:with-param>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$info/releaseinfo">
+            <xsl:when test="$info/d:releaseinfo">
               <xsl:call-template name="set.refentry.metadata">
                 <xsl:with-param name="refname" select="$refname"/>
                 <xsl:with-param
                     name="info"
-                    select="($info[releaseinfo])[last()]"/>
+                    select="($info[d:releaseinfo])[last()]"/>
                 <xsl:with-param
                     name="contents"
-                    select="(($info[releaseinfo])[last()]/releaseinfo)[1]"/>
+                    select="(($info[d:releaseinfo])[last()]/d:releaseinfo)[1]"/>
                 <xsl:with-param name="context">version</xsl:with-param>
                 <xsl:with-param name="preferred">productnumber</xsl:with-param>
               </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
-          <xsl:when test="refmeta/refmiscinfo[@class = 'manual' or @class = 'sectdesc']">
+          <xsl:when test="d:refmeta/d:refmiscinfo[@class = 'manual' or @class = 'sectdesc']">
             <xsl:apply-templates 
-                select="refmeta/refmiscinfo[@class = 'manual' or @class = 'sectdesc'][1]/node()"/>
+                select="d:refmeta/d:refmiscinfo[@class = 'manual' or @class = 'sectdesc'][1]/node()"/>
           </xsl:when>
           <xsl:otherwise>
             <!-- * only in the case of choosing appropriate -->
             <!-- * (first) matching element instead of the -->
             <!-- * closest (last) matching one -->
             <xsl:choose>
-              <xsl:when test="ancestor::*/title">
+              <xsl:when test="ancestor::*/d:title">
                 <xsl:call-template name="set.refentry.metadata">
                   <xsl:with-param name="refname" select="$refname"/>
                   <xsl:with-param
                       name="info"
-                      select="(ancestor::*[title])[1]"/>
+                      select="(ancestor::*[d:title])[1]"/>
                   <xsl:with-param
                       name="contents"
-                      select="(ancestor::*[title])[1]/title"/>
+                      select="(ancestor::*[d:title])[1]/d:title"/>
                   <xsl:with-param name="context">manual</xsl:with-param>
                 </xsl:call-template>
               </xsl:when>
-              <xsl:when test="$info/title">
+              <xsl:when test="$info/d:title">
                 <xsl:call-template name="set.refentry.metadata">
                   <xsl:with-param name="refname" select="$refname"/>
                   <xsl:with-param
                       name="info"
-                      select="($info[title])[1]"/>
+                      select="($info[d:title])[1]"/>
                   <xsl:with-param
                       name="contents"
-                      select="(($info[title])[1]/title)[1]"/>
+                      select="(($info[d:title])[1]/d:title)[1]"/>
                   <xsl:with-param name="context">manual</xsl:with-param>
                 </xsl:call-template>
               </xsl:when>
index 3848cd9d367a19dbcdd13cb2db7baab727fc181d..a6390a1a9a8aac7e1e94fac8ae867702efb23bfc 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -37,137 +38,137 @@ subtitle of the element.
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="subtitle.markup">
+<xsl:template match="d:subtitle" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="set" mode="subtitle.markup">
+<xsl:template match="d:set" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(setinfo/subtitle|info/subtitle|subtitle)[1]"
+  <xsl:apply-templates select="(d:setinfo/d:subtitle|d:info/d:subtitle|d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="book" mode="subtitle.markup">
+<xsl:template match="d:book" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(bookinfo/subtitle|info/subtitle|subtitle)[1]"
+  <xsl:apply-templates select="(d:bookinfo/d:subtitle|d:info/d:subtitle|d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="part" mode="subtitle.markup">
+<xsl:template match="d:part" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(partinfo/subtitle
-                                |docinfo/subtitle
-                                |info/subtitle
-                                |subtitle)[1]"
+  <xsl:apply-templates select="(d:partinfo/d:subtitle
+                                |d:docinfo/d:subtitle
+                                |d:info/d:subtitle
+                                |d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="preface|chapter|appendix" mode="subtitle.markup">
+<xsl:template match="d:preface|d:chapter|d:appendix" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(docinfo/subtitle
-                                |info/subtitle
-                                |prefaceinfo/subtitle
-                                |chapterinfo/subtitle
-                                |appendixinfo/subtitle
-                                |subtitle)[1]"
+  <xsl:apply-templates select="(d:docinfo/d:subtitle
+                                |d:info/d:subtitle
+                                |d:prefaceinfo/d:subtitle
+                                |d:chapterinfo/d:subtitle
+                                |d:appendixinfo/d:subtitle
+                                |d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="article" mode="subtitle.markup">
+<xsl:template match="d:article" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(artheader/subtitle
-                                |articleinfo/subtitle
-                                |info/subtitle
-                                |subtitle)[1]"
+  <xsl:apply-templates select="(d:artheader/d:subtitle
+                                |d:articleinfo/d:subtitle
+                                |d:info/d:subtitle
+                                |d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="dedication|colophon" mode="subtitle.markup">
+<xsl:template match="d:dedication|d:colophon" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(subtitle|info/subtitle)[1]"
+  <xsl:apply-templates select="(d:subtitle|d:info/d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="reference" mode="subtitle.markup">
+<xsl:template match="d:reference" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(referenceinfo/subtitle
-                                |docinfo/subtitle
-                                |info/subtitle
-                                |subtitle)[1]"
+  <xsl:apply-templates select="(d:referenceinfo/d:subtitle
+                                |d:docinfo/d:subtitle
+                                |d:info/d:subtitle
+                                |d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="qandaset" mode="subtitle.markup">
+<xsl:template match="d:qandaset" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(blockinfo/subtitle|info/subtitle)[1]"
+  <xsl:apply-templates select="(d:blockinfo/d:subtitle|d:info/d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="refentry" mode="subtitle.markup">
+<xsl:template match="d:refentry" mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(refentryinfo/subtitle
-                                |info/subtitle
-                                |docinfo/subtitle)[1]"
+  <xsl:apply-templates select="(d:refentryinfo/d:subtitle
+                                |d:info/d:subtitle
+                                |d:docinfo/d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="section
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3
-                     |topic
-                     |simplesect"
+<xsl:template match="d:section
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
+                     |d:refsect1|d:refsect2|d:refsect3
+                     |d:topic
+                     |d:simplesect"
               mode="subtitle.markup">
   <xsl:param name="allow-anchors" select="'0'"/>
   <xsl:param name="verbose" select="1"/>
-  <xsl:apply-templates select="(info/subtitle
-                                |sectioninfo/subtitle
-                                |sect1info/subtitle
-                                |sect2info/subtitle
-                                |sect3info/subtitle
-                                |sect4info/subtitle
-                                |sect5info/subtitle
-                                |refsect1info/subtitle
-                                |refsect2info/subtitle
-                                |refsect3info/subtitle
-                                |subtitle)[1]"
+  <xsl:apply-templates select="(d:info/d:subtitle
+                                |d:sectioninfo/d:subtitle
+                                |d:sect1info/d:subtitle
+                                |d:sect2info/d:subtitle
+                                |d:sect3info/d:subtitle
+                                |d:sect4info/d:subtitle
+                                |d:sect5info/d:subtitle
+                                |d:refsect1info/d:subtitle
+                                |d:refsect2info/d:subtitle
+                                |d:refsect3info/d:subtitle
+                                |d:subtitle)[1]"
                        mode="subtitle.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
     <xsl:with-param name="verbose" select="$verbose"/>
index 66f52fdbf13fea68bc6a6c9dd6edd3dd4db26782..d5c46fe6c98358726a8e1c49eb82f90cce2e5d2c 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc d"
                 version="1.0">
 
 <!-- ********************************************************************
     <xsl:when test="$entry/@spanname">
       <xsl:variable name="spanname" select="$entry/@spanname"/>
       <xsl:variable name="spanspec"
-                    select="($entry/ancestor::tgroup/spanspec[@spanname=$spanname]
-                             |$entry/ancestor::entrytbl/spanspec[@spanname=$spanname])[last()]"/>
+                    select="($entry/ancestor::d:tgroup/d:spanspec[@spanname=$spanname]
+                             |$entry/ancestor::d:entrytbl/d:spanspec[@spanname=$spanname])[last()]"/>
       <xsl:variable name="colspec"
-                    select="($entry/ancestor::tgroup/colspec[@colname=$spanspec/@namest]
-                             |$entry/ancestor::entrytbl/colspec[@colname=$spanspec/@namest])[last()]"/>
+                    select="($entry/ancestor::d:tgroup/d:colspec[@colname=$spanspec/@namest]
+                             |$entry/ancestor::d:entrytbl/d:colspec[@colname=$spanspec/@namest])[last()]"/>
       <xsl:call-template name="colspec.colnum">
         <xsl:with-param name="colspec" select="$colspec"/>
       </xsl:call-template>
     <xsl:when test="$entry/@colname">
       <xsl:variable name="colname" select="$entry/@colname"/>
       <xsl:variable name="colspec"
-                    select="($entry/ancestor::tgroup/colspec[@colname=$colname]
-                             |$entry/ancestor::entrytbl/colspec[@colname=$colname])[last()]"/>
+                    select="($entry/ancestor::d:tgroup/d:colspec[@colname=$colname]
+                             |$entry/ancestor::d:entrytbl/d:colspec[@colname=$colname])[last()]"/>
       <xsl:call-template name="colspec.colnum">
         <xsl:with-param name="colspec" select="$colspec"/>
       </xsl:call-template>
     <xsl:when test="$entry/@namest">
       <xsl:variable name="namest" select="$entry/@namest"/>
       <xsl:variable name="colspec"
-                    select="($entry/ancestor::tgroup/colspec[@colname=$namest]
-                             |$entry/ancestor::entrytbl/colspec[@colname=$namest])[last()]"/>
+                    select="($entry/ancestor::d:tgroup/d:colspec[@colname=$namest]
+                             |$entry/ancestor::d:entrytbl/d:colspec[@colname=$namest])[last()]"/>
       <xsl:call-template name="colspec.colnum">
         <xsl:with-param name="colspec" select="$colspec"/>
       </xsl:call-template>
@@ -150,11 +151,11 @@ or 0 (the empty string)</para>
     <xsl:when test="$colspec/@colnum">
       <xsl:value-of select="$colspec/@colnum"/>
     </xsl:when>
-    <xsl:when test="$colspec/preceding-sibling::colspec">
+    <xsl:when test="$colspec/preceding-sibling::d:colspec">
       <xsl:variable name="prec.colspec.colnum">
         <xsl:call-template name="colspec.colnum">
           <xsl:with-param name="colspec"
-                          select="$colspec/preceding-sibling::colspec[1]"/>
+                          select="$colspec/preceding-sibling::d:colspec[1]"/>
         </xsl:call-template>
       </xsl:variable>
       <xsl:value-of select="$prec.colspec.colnum + 1"/>
@@ -167,8 +168,8 @@ or 0 (the empty string)</para>
   <xsl:param name="entry" select="."/>
   <xsl:variable name="spanname" select="$entry/@spanname"/>
   <xsl:variable name="spanspec"
-                select="($entry/ancestor::tgroup/spanspec[@spanname=$spanname]
-                         |$entry/ancestor::entrytbl/spanspec[@spanname=$spanname])[last()]"/>
+                select="($entry/ancestor::d:tgroup/d:spanspec[@spanname=$spanname]
+                         |$entry/ancestor::d:entrytbl/d:spanspec[@spanname=$spanname])[last()]"/>
 
   <xsl:variable name="namest">
     <xsl:choose>
@@ -195,16 +196,16 @@ or 0 (the empty string)</para>
   <xsl:variable name="scol">
     <xsl:call-template name="colspec.colnum">
       <xsl:with-param name="colspec"
-                      select="($entry/ancestor::tgroup/colspec[@colname=$namest]
-                               |$entry/ancestor::entrytbl/colspec[@colname=$namest])[last()]"/>
+                      select="($entry/ancestor::d:tgroup/d:colspec[@colname=$namest]
+                               |$entry/ancestor::d:entrytbl/d:colspec[@colname=$namest])[last()]"/>
     </xsl:call-template>
   </xsl:variable>
 
   <xsl:variable name="ecol">
     <xsl:call-template name="colspec.colnum">
       <xsl:with-param name="colspec"
-                      select="($entry/ancestor::tgroup/colspec[@colname=$nameend]
-                               |$entry/ancestor::entrytbl/colspec[@colname=$nameend])[last()]"/>
+                      select="($entry/ancestor::d:tgroup/d:colspec[@colname=$nameend]
+                               |$entry/ancestor::d:entrytbl/d:colspec[@colname=$nameend])[last()]"/>
     </xsl:call-template>
   </xsl:variable>
 
@@ -247,16 +248,16 @@ or 0 (the empty string)</para>
 
 <xsl:template name="inherited.table.attribute">
   <xsl:param name="entry" select="."/>
-  <xsl:param name="row" select="$entry/ancestor-or-self::row[1]"/>
+  <xsl:param name="row" select="$entry/ancestor-or-self::d:row[1]"/>
   <xsl:param name="colnum" select="0"/>
   <xsl:param name="attribute" select="'colsep'"/>
 
-  <xsl:variable name="tgroup" select="$row/parent::*/parent::tgroup[1]"/>
+  <xsl:variable name="tgroup" select="$row/parent::*/parent::d:tgroup[1]"/>
   <xsl:variable name="tbody" select="$row/parent::*[1]"/>
 
-  <xsl:variable name="table" select="($tgroup/ancestor::table
-                                     |$tgroup/ancestor::informaltable
-                                     |$entry/ancestor::entrytbl)[last()]"/>
+  <xsl:variable name="table" select="($tgroup/ancestor::d:table
+                                     |$tgroup/ancestor::d:informaltable
+                                     |$entry/ancestor::d:entrytbl)[last()]"/>
 
   <xsl:variable name="entry.value">
     <xsl:call-template name="get-attribute">
@@ -276,9 +277,9 @@ or 0 (the empty string)</para>
     <xsl:if test="$entry/@spanname">
       <xsl:variable name="spanname" select="$entry/@spanname"/>
       <xsl:variable name="spanspec"
-                    select="$tgroup/spanspec[@spanname=$spanname]"/>
+                    select="$tgroup/d:spanspec[@spanname=$spanname]"/>
       <xsl:variable name="span.colspec"
-                    select="$tgroup/colspec[@colname=$spanspec/@namest]"/>
+                    select="$tgroup/d:colspec[@colname=$spanspec/@namest]"/>
 
       <xsl:variable name="spanspec.value">
         <xsl:call-template name="get-attribute">
@@ -310,7 +311,7 @@ or 0 (the empty string)</para>
     <xsl:if test="$entry/@namest">
       <xsl:variable name="namest" select="$entry/@namest"/>
       <xsl:variable name="colspec"
-                    select="$tgroup/colspec[@colname=$namest]"/>
+                    select="$tgroup/d:colspec[@colname=$namest]"/>
 
       <xsl:variable name="inner.namest.value">
         <xsl:call-template name="get-attribute">
@@ -408,9 +409,9 @@ or 0 (the empty string)</para>
   <xsl:param name="colnum" select="0"/>
   <xsl:param name="attribute" select="'colname'"/>
   <xsl:param name="colspec.ancestor" 
-             select="(ancestor::tgroup|ancestor::entrytbl)
+             select="(ancestor::d:tgroup|ancestor::d:entrytbl)
                      [position() = last()]"/>
-  <xsl:param name="colspecs" select="$colspec.ancestor/colspec"/>
+  <xsl:param name="colspecs" select="$colspec.ancestor/d:colspec"/>
   <xsl:param name="count" select="1"/>
 
   <xsl:choose>
@@ -486,12 +487,12 @@ or 0 (the empty string)</para>
 <xsl:template name="tabstyle">
   <xsl:param name="node" select="."/>
 
-  <xsl:variable name="tgroup" select="$node/tgroup[1] | 
-                                      $node/ancestor-or-self::tgroup[1]"/>
+  <xsl:variable name="tgroup" select="$node/d:tgroup[1] |
+                                      $node/ancestor-or-self::d:tgroup[1]"/>
 
   <xsl:variable name="table" 
-                select="($node/ancestor-or-self::table | 
-                         $node/ancestor-or-self::informaltable)[last()]"/>
+                select="($node/ancestor-or-self::d:table |
+                         $node/ancestor-or-self::d:informaltable)[last()]"/>
 
   <xsl:variable name="tabstyle">
     <xsl:choose>
index f11690c6b39f9e7982328c540dd088e9bd4224ac..aa9430cffc977bdabc03c28d3e4ac89f128dfa44 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="doc exsl"
+                exclude-result-prefixes="doc exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -208,65 +209,65 @@ document output.
 </xsl:template>
 -->
 
-<xsl:template match="set" mode="olink.mode">
+<xsl:template match="d:set" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="book" mode="olink.mode">
+<xsl:template match="d:book" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="preface|chapter|appendix" mode="olink.mode">
+<xsl:template match="d:preface|d:chapter|d:appendix" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="part|reference" mode="olink.mode">
+<xsl:template match="d:part|d:reference" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="article" mode="olink.mode">
+<xsl:template match="d:article" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="topic" mode="olink.mode">
+<xsl:template match="d:topic" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="bibliography|bibliodiv" mode="olink.mode">
+<xsl:template match="d:bibliography|d:bibliodiv" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="olink.mode">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="olink.mode">
   <xsl:call-template name="obj"/>
 </xsl:template>
 
-<xsl:template match="refentry" mode="olink.mode">
+<xsl:template match="d:refentry" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5" mode="olink.mode">
+<xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="refsection|refsect1|refsect2|refsect3" mode="olink.mode">
+<xsl:template match="d:refsection|d:refsect1|d:refsect2|d:refsect3" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
-<xsl:template match="figure|example|table" mode="olink.mode">
+<xsl:template match="d:figure|d:example|d:table" mode="olink.mode">
   <xsl:call-template name="obj"/>
   <xsl:apply-templates mode="olink.mode"/>
 </xsl:template>
 
-<xsl:template match="equation[title or info/title]" mode="olink.mode">
+<xsl:template match="d:equation[d:title or d:info/d:title]" mode="olink.mode">
   <xsl:call-template name="obj"/>
 </xsl:template>
 
-<xsl:template match="qandaset|qandaentry" mode="olink.mode">
+<xsl:template match="d:qandaset|d:qandaentry" mode="olink.mode">
   <xsl:call-template name="div"/>
 </xsl:template>
 
 <!-- handle an glossary collection -->
-<xsl:template match="glossary[@role='auto']" mode="olink.mode" priority="2">
+<xsl:template match="d:glossary[@role='auto']" mode="olink.mode" priority="2">
   <xsl:variable name="collection" select="document($glossary.collection, .)"/>
   <xsl:if test="$glossary.collection = ''">
     <xsl:message>
@@ -296,7 +297,7 @@ document output.
 </xsl:template>
 
 <!-- construct a glossary in memory -->
-<xsl:template match="glossary" mode="assemble.auto.glossary">
+<xsl:template match="d:glossary" mode="assemble.auto.glossary">
   <xsl:copy>
     <xsl:copy-of select="@*[not(local-name() = 'role')]"/>
     <xsl:apply-templates select="node()" mode="assemble.auto.glossary"/>
@@ -306,17 +307,17 @@ document output.
 
 <xsl:template name="select.glossentries">
   <xsl:param name="collection" select="document($glossary.collection, .)"/>
-  <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+  <xsl:param name="terms" select="//d:glossterm[not(parent::d:glossdef)]|//d:firstterm"/>
 
-  <xsl:for-each select="$collection//glossentry">
-    <xsl:variable name="cterm" select="glossterm"/>
+  <xsl:for-each select="$collection//d:glossentry">
+    <xsl:variable name="cterm" select="d:glossterm"/>
     <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
       <xsl:copy-of select="."/>
     </xsl:if>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="glossentry" mode="assemble.auto.glossary">
+<xsl:template match="d:glossentry" mode="assemble.auto.glossary">
   <!-- skip the dummy entries -->
 </xsl:template>
 
index e2975745ddfb3e8ae7a52457473a1ed1ab055ab2..51b1fb0f7eefd50296ee9726381a5e04256fd06e 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="doc"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -33,8 +34,8 @@ title of the element. This does not include the label.
   <xsl:choose>
     <!-- * FIXME: this should handle other *info elements as well -->
     <!-- * but this is good enough for now. -->
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -76,7 +77,7 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="title" mode="title.markup">
+<xsl:template match="d:title" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
 
   <xsl:choose>
@@ -90,7 +91,7 @@ title of the element. This does not include the label.
 </xsl:template>
 
 <!-- only occurs in HTML Tables! -->
-<xsl:template match="caption" mode="title.markup">
+<xsl:template match="d:caption" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
 
   <xsl:choose>
@@ -103,31 +104,31 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="set" mode="title.markup">
+<xsl:template match="d:set" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(setinfo/title|info/title|title)[1]"
+  <xsl:apply-templates select="(d:setinfo/d:title|d:info/d:title|d:title)[1]"
                        mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="book" mode="title.markup">
+<xsl:template match="d:book" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(bookinfo/title|info/title|title)[1]"
+  <xsl:apply-templates select="(d:bookinfo/d:title|d:info/d:title|d:title)[1]"
                        mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="part" mode="title.markup">
+<xsl:template match="d:part" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(partinfo/title|info/title|docinfo/title|title)[1]"
+  <xsl:apply-templates select="(d:partinfo/d:title|d:info/d:title|d:docinfo/d:title|d:title)[1]"
                        mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="preface|chapter|appendix" mode="title.markup">
+<xsl:template match="d:preface|d:chapter|d:appendix" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
 
 <!--
@@ -138,22 +139,22 @@ title of the element. This does not include the label.
   </xsl:message>
 -->
 
-  <xsl:variable name="title" select="(docinfo/title
-                                      |info/title
-                                      |prefaceinfo/title
-                                      |chapterinfo/title
-                                      |appendixinfo/title
-                                      |title)[1]"/>
+  <xsl:variable name="title" select="(d:docinfo/d:title
+                                      |d:info/d:title
+                                      |d:prefaceinfo/d:title
+                                      |d:chapterinfo/d:title
+                                      |d:appendixinfo/d:title
+                                      |d:title)[1]"/>
   <xsl:apply-templates select="$title" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="dedication" mode="title.markup">
+<xsl:template match="d:dedication" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -165,11 +166,11 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="acknowledgements" mode="title.markup">
+<xsl:template match="d:acknowledgements" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -181,11 +182,11 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="colophon" mode="title.markup">
+<xsl:template match="d:colophon" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -197,33 +198,33 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="article" mode="title.markup">
+<xsl:template match="d:article" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(artheader/title
-                                      |articleinfo/title
-                                      |info/title
-                                      |title)[1]"/>
+  <xsl:variable name="title" select="(d:artheader/d:title
+                                      |d:articleinfo/d:title
+                                      |d:info/d:title
+                                      |d:title)[1]"/>
 
   <xsl:apply-templates select="$title" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="reference" mode="title.markup">
+<xsl:template match="d:reference" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(referenceinfo/title|docinfo/title|info/title|title)[1]"
+  <xsl:apply-templates select="(d:referenceinfo/d:title|d:docinfo/d:title|d:info/d:title|d:title)[1]"
                        mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="refentry" mode="title.markup">
+<xsl:template match="d:refentry" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="refmeta" select=".//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select=".//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
+  <xsl:variable name="refmeta" select=".//d:refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//d:refentrytitle"/>
+  <xsl:variable name="refnamediv" select=".//d:refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//d:refname"/>
+  <xsl:variable name="refdesc" select="$refnamediv//d:refdescriptor"/>
 
   <xsl:variable name="title">
     <xsl:choose>
@@ -243,7 +244,7 @@ title of the element. This does not include the label.
   <xsl:copy-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="refentrytitle|refname|refdescriptor" mode="title.markup">
+<xsl:template match="d:refentrytitle|d:refname|d:refdescriptor" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
     <xsl:when test="$allow-anchors != 0">
@@ -255,40 +256,40 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="section
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3|refsection
-                     |topic
-                     |simplesect"
+<xsl:template match="d:section
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
+                     |d:refsect1|d:refsect2|d:refsect3|d:refsection
+                     |d:topic
+                     |d:simplesect"
               mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(info/title
-                                      |sectioninfo/title
-                                      |sect1info/title
-                                      |sect2info/title
-                                      |sect3info/title
-                                      |sect4info/title
-                                      |sect5info/title
-                                      |refsect1info/title
-                                      |refsect2info/title
-                                      |refsect3info/title
-                                      |refsectioninfo/title
-                                      |title)[1]"/>
+  <xsl:variable name="title" select="(d:info/d:title
+                                      |d:sectioninfo/d:title
+                                      |d:sect1info/d:title
+                                      |d:sect2info/d:title
+                                      |d:sect3info/d:title
+                                      |d:sect4info/d:title
+                                      |d:sect5info/d:title
+                                      |d:refsect1info/d:title
+                                      |d:refsect2info/d:title
+                                      |d:refsect3info/d:title
+                                      |d:refsectioninfo/d:title
+                                      |d:title)[1]"/>
 
   <xsl:apply-templates select="$title" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="bridgehead" mode="title.markup">
+<xsl:template match="d:bridgehead" mode="title.markup">
   <xsl:apply-templates/> 
 </xsl:template>
 
-<xsl:template match="refsynopsisdiv" mode="title.markup">
+<xsl:template match="d:refsynopsisdiv" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -300,9 +301,9 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliography" mode="title.markup">
+<xsl:template match="d:bibliography" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(bibliographyinfo/title|info/title|title)[1]"/>
+  <xsl:variable name="title" select="(d:bibliographyinfo/d:title|d:info/d:title|d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -317,9 +318,9 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossary" mode="title.markup">
+<xsl:template match="d:glossary" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(glossaryinfo/title|info/title|title)[1]"/>
+  <xsl:variable name="title" select="(d:glossaryinfo/d:title|d:info/d:title|d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -334,9 +335,9 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossdiv" mode="title.markup">
+<xsl:template match="d:glossdiv" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(info/title|title)[1]"/>
+  <xsl:variable name="title" select="(d:info/d:title|d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -349,14 +350,14 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossentry" mode="title.markup">
+<xsl:template match="d:glossentry" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="glossterm" mode="title.markup">
+  <xsl:apply-templates select="d:glossterm" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="glossterm|firstterm" mode="title.markup">
+<xsl:template match="d:glossterm|d:firstterm" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
 
   <xsl:choose>
@@ -369,9 +370,9 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="index" mode="title.markup">
+<xsl:template match="d:index" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(indexinfo/title|info/title|title)[1]"/>
+  <xsl:variable name="title" select="(d:indexinfo/d:title|d:info/d:title|d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -386,9 +387,9 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="setindex" mode="title.markup">
+<xsl:template match="d:setindex" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(setindexinfo/title|info/title|title)[1]"/>
+  <xsl:variable name="title" select="(d:setindexinfo/d:title|d:info/d:title|d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -403,47 +404,47 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="figure|example|equation" mode="title.markup">
+<xsl:template match="d:figure|d:example|d:equation" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+  <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="table" mode="title.markup">
+<xsl:template match="d:table" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(title|info/title|caption)[1]" mode="title.markup">
+  <xsl:apply-templates select="(d:title|d:info/d:title|d:caption)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="procedure" mode="title.markup">
+<xsl:template match="d:procedure" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+  <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="task" mode="title.markup">
+<xsl:template match="d:task" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+  <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="sidebar" mode="title.markup">
+<xsl:template match="d:sidebar" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(info/title|sidebarinfo/title|title)[1]"
+  <xsl:apply-templates select="(d:info/d:title|d:sidebarinfo/d:title|d:title)[1]"
                        mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="abstract" mode="title.markup">
+<xsl:template match="d:abstract" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -455,9 +456,9 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="caution|tip|warning|important|note" mode="title.markup">
+<xsl:template match="d:caution|d:tip|d:warning|d:important|d:note" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(title|info/title)[1]"/>
+  <xsl:variable name="title" select="(d:title|d:info/d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -480,30 +481,30 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="question" mode="title.markup">
+<xsl:template match="d:question" mode="title.markup">
   <!-- questions don't have titles -->
   <xsl:call-template name="gentext">
     <xsl:with-param name="key">question</xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="answer" mode="title.markup">
+<xsl:template match="d:answer" mode="title.markup">
   <!-- answers don't have titles -->
   <xsl:call-template name="gentext">
     <xsl:with-param name="key">answer</xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="title.markup">
+<xsl:template match="d:qandaentry" mode="title.markup">
   <!-- qandaentrys are represented by the first question in them -->
-  <xsl:apply-templates select="question" mode="title.markup"/>
+  <xsl:apply-templates select="d:question" mode="title.markup"/>
 </xsl:template>
 
-<xsl:template match="qandaset" mode="title.markup">
+<xsl:template match="d:qandaset" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:variable name="title" select="(info/title|
-                                      blockinfo/title|
-                                      title)[1]"/>
+  <xsl:variable name="title" select="(d:info/d:title|
+                                      d:blockinfo/d:title|
+                                      d:title)[1]"/>
   <xsl:choose>
     <xsl:when test="$title">
       <xsl:apply-templates select="$title" mode="title.markup">
@@ -518,11 +519,11 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="title.markup">
+<xsl:template match="d:legalnotice" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -537,20 +538,20 @@ title of the element. This does not include the label.
 <!-- ============================================================ -->
 
 <!-- titleabbrev is always processed in a mode -->
-<xsl:template match="titleabbrev"/>
+<xsl:template match="d:titleabbrev"/>
 
 <xsl:template match="*" mode="titleabbrev.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:param name="verbose" select="1"/>
 
   <xsl:choose>
-    <xsl:when test="titleabbrev">
-      <xsl:apply-templates select="titleabbrev[1]" mode="title.markup">
+    <xsl:when test="d:titleabbrev">
+      <xsl:apply-templates select="d:titleabbrev[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="info/titleabbrev">
-      <xsl:apply-templates select="info/titleabbrev[1]" mode="title.markup">
+    <xsl:when test="d:info/d:titleabbrev">
+      <xsl:apply-templates select="d:info/d:titleabbrev[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -563,19 +564,19 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="book|part|set|preface|chapter|appendix" mode="titleabbrev.markup">
+<xsl:template match="d:book|d:part|d:set|d:preface|d:chapter|d:appendix" mode="titleabbrev.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:variable name="titleabbrev" select="(docinfo/titleabbrev
-                                           |bookinfo/titleabbrev
-                                           |info/titleabbrev
-                                           |prefaceinfo/titleabbrev
-                                           |setinfo/titleabbrev
-                                           |partinfo/titleabbrev
-                                           |chapterinfo/titleabbrev
-                                           |appendixinfo/titleabbrev
-                                           |titleabbrev)[1]"/>
+  <xsl:variable name="titleabbrev" select="(d:docinfo/d:titleabbrev
+                                           |d:bookinfo/d:titleabbrev
+                                           |d:info/d:titleabbrev
+                                           |d:prefaceinfo/d:titleabbrev
+                                           |d:setinfo/d:titleabbrev
+                                           |d:partinfo/d:titleabbrev
+                                           |d:chapterinfo/d:titleabbrev
+                                           |d:appendixinfo/d:titleabbrev
+                                           |d:titleabbrev)[1]"/>
 
   <xsl:choose>
     <xsl:when test="$titleabbrev">
@@ -592,14 +593,14 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="article" mode="titleabbrev.markup">
+<xsl:template match="d:article" mode="titleabbrev.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:variable name="titleabbrev" select="(artheader/titleabbrev
-                                           |articleinfo/titleabbrev
-                                           |info/titleabbrev
-                                           |titleabbrev)[1]"/>
+  <xsl:variable name="titleabbrev" select="(d:artheader/d:titleabbrev
+                                           |d:articleinfo/d:titleabbrev
+                                           |d:info/d:titleabbrev
+                                           |d:titleabbrev)[1]"/>
 
   <xsl:choose>
     <xsl:when test="$titleabbrev">
@@ -616,26 +617,26 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="section
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3
-                     |topic
-                     |simplesect"
+<xsl:template match="d:section
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
+                     |d:refsect1|d:refsect2|d:refsect3
+                     |d:topic
+                     |d:simplesect"
               mode="titleabbrev.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:variable name="titleabbrev" select="(info/titleabbrev
-                                            |sectioninfo/titleabbrev
-                                            |sect1info/titleabbrev
-                                            |sect2info/titleabbrev
-                                            |sect3info/titleabbrev
-                                            |sect4info/titleabbrev
-                                            |sect5info/titleabbrev
-                                            |refsect1info/titleabbrev
-                                            |refsect2info/titleabbrev
-                                            |refsect3info/titleabbrev
-                                            |titleabbrev)[1]"/>
+  <xsl:variable name="titleabbrev" select="(d:info/d:titleabbrev
+                                            |d:sectioninfo/d:titleabbrev
+                                            |d:sect1info/d:titleabbrev
+                                            |d:sect2info/d:titleabbrev
+                                            |d:sect3info/d:titleabbrev
+                                            |d:sect4info/d:titleabbrev
+                                            |d:sect5info/d:titleabbrev
+                                            |d:refsect1info/d:titleabbrev
+                                            |d:refsect2info/d:titleabbrev
+                                            |d:refsect3info/d:titleabbrev
+                                            |d:titleabbrev)[1]"/>
 
   <xsl:choose>
     <xsl:when test="$titleabbrev">
@@ -652,7 +653,7 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="title.markup">
+<xsl:template match="d:titleabbrev" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
 
   <xsl:choose>
@@ -670,14 +671,14 @@ title of the element. This does not include the label.
 <xsl:template match="*" mode="no.anchor.mode">
   <!-- Switch to normal mode if no links -->
   <xsl:choose>
-    <xsl:when test="descendant-or-self::footnote or
-                    descendant-or-self::anchor or
-                    descendant-or-self::ulink or
-                    descendant-or-self::link or
-                    descendant-or-self::olink or
-                    descendant-or-self::xref or
-                    descendant-or-self::indexterm or
-                   (ancestor::title and (@id or @xml:id))">
+    <xsl:when test="descendant-or-self::d:footnote or
+                    descendant-or-self::d:anchor or
+                    descendant-or-self::d:ulink or
+                    descendant-or-self::d:link or
+                    descendant-or-self::d:olink or
+                    descendant-or-self::d:xref or
+                    descendant-or-self::d:indexterm or
+                   (ancestor::d:title and (@id or @xml:id))">
 
       <xsl:apply-templates mode="no.anchor.mode"/>
     </xsl:when>
@@ -687,15 +688,15 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="footnote" mode="no.anchor.mode">
+<xsl:template match="d:footnote" mode="no.anchor.mode">
   <!-- nop, suppressed -->
 </xsl:template>
 
-<xsl:template match="anchor" mode="no.anchor.mode">
+<xsl:template match="d:anchor" mode="no.anchor.mode">
   <!-- nop, suppressed -->
 </xsl:template>
 
-<xsl:template match="ulink" mode="no.anchor.mode">
+<xsl:template match="d:ulink" mode="no.anchor.mode">
   <xsl:param name="url" select="@url"/>
   <xsl:choose>
     <xsl:when test="count(child::node())=0">
@@ -707,7 +708,7 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="link" mode="no.anchor.mode">
+<xsl:template match="d:link" mode="no.anchor.mode">
   <xsl:choose>
     <xsl:when test="count(child::node()) &gt; 0">
       <!-- If it has content, use it -->
@@ -737,15 +738,15 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="olink" mode="no.anchor.mode">
+<xsl:template match="d:olink" mode="no.anchor.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="no.anchor.mode">
+<xsl:template match="d:indexterm" mode="no.anchor.mode">
   <!-- nop, suppressed -->
 </xsl:template>
 
-<xsl:template match="xref" mode="no.anchor.mode">
+<xsl:template match="d:xref" mode="no.anchor.mode">
   <xsl:variable name="referrer" select="."/>
   <xsl:variable name="targets" select="key('id',@linkend)|key('id',substring-after(@xlink:href,'#'))"/>
   <xsl:variable name="target" select="$targets[1]"/>
@@ -830,12 +831,12 @@ title of the element. This does not include the label.
 
 <!-- ============================================================ -->
 
-<xsl:template mode="title.markup" match="toc">
+<xsl:template mode="title.markup" match="d:toc">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:choose>
-    <xsl:when test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
+    <xsl:when test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
index 87cfb7ee9904c48fa1a0f8d525d5b909990e1d13..83ee04193f86b69840ee757a256da90e9a27339e 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:dyn="http://exslt.org/dynamic"
                 xmlns:saxon="http://icl.com/saxon"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="doc dyn saxon"
+                exclude-result-prefixes="doc dyn saxon d"
                 version='1.0'>
 
 <!-- ********************************************************************
index 717c4c52346d6ed1beae8676a3305194348b0ef2..640cef441e1ea03d0bcca355864042a2ae919895 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:ng="http://docbook.org/docbook-ng"
   xmlns:db="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   version="1.0"
-  exclude-result-prefixes="exsl db ng">
+  exclude-result-prefixes="exsl db ng d">
   
 <xsl:import href="../html/chunk.xsl"/>
 
 
      ******************************************************************** -->
 
-<xsl:variable name="no.namespace">
+<xsl:variable name="with.namespace">
   <xsl:if test="$exsl.node.set.available != 0 and 
-                namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
-      <xsl:apply-templates select="/*" mode="stripNS"/>
+                namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
+      <xsl:apply-templates select="/*" mode="addNS"/>
   </xsl:if>
 </xsl:variable>
 
   <xsl:choose>
     <!-- fix namespace if necessary -->
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
       <!-- DEBUG: uncomment to save namespace-fixed document.
         <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
         <xsl:with-param name="method" select="'xml'"/>
         <xsl:with-param name="content">
-          <xsl:copy-of select="exsl:node-set($no.namespace)"/>
+          <xsl:copy-of select="exsl:node-set($with.namespace)"/>
         </xsl:with-param>
       </xsl:call-template>
       -->
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="book|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index" mode="etoc">
+<xsl:template match="d:book|d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:glossary|d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv|d:index" mode="etoc">
   <xsl:variable name="title">
     <xsl:if test="$eclipse.autolabel=1">
       <xsl:variable name="label.markup">
   </xsl:variable>
 
   <topic label="{normalize-space($title)}" href="{$href}">
-    <xsl:apply-templates select="part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index" mode="etoc"/>
+    <xsl:apply-templates select="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:glossary|d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv|d:index" mode="etoc"/>
   </topic>
 
 </xsl:template>
        <index>
          <xsl:choose>
                <xsl:when test="$rootid != ''">
-                 <xsl:apply-templates select="key('id',$rootid)//indexterm" mode="idx">
-                       <xsl:sort select="normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = '']))"/>
-                       <xsl:sort select="normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = '']))"/>
-                       <xsl:sort select="normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = '']))"/>
+                 <xsl:apply-templates select="key('id',$rootid)//d:indexterm" mode="idx">
+                       <xsl:sort select="normalize-space(concat(d:primary/@sortas, d:primary[not(@sortas) or @sortas = '']))"/>
+                       <xsl:sort select="normalize-space(concat(d:secondary/@sortas, d:secondary[not(@sortas) or @sortas = '']))"/>
+                       <xsl:sort select="normalize-space(concat(d:tertiary/@sortas, d:tertiary[not(@sortas) or @sortas = '']))"/>
                  </xsl:apply-templates>
                </xsl:when>
                <xsl:otherwise>
-                 <xsl:apply-templates select="//indexterm" mode="idx">
-                       <xsl:sort select="normalize-space(concat(primary/@sortas, primary[not(@sortas) or @sortas = '']))"/>
-                       <xsl:sort select="normalize-space(concat(secondary/@sortas, secondary[not(@sortas) or @sortas = '']))"/>
-                       <xsl:sort select="normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas) or @sortas = '']))"/>
+                 <xsl:apply-templates select="//d:indexterm" mode="idx">
+                       <xsl:sort select="normalize-space(concat(d:primary/@sortas, d:primary[not(@sortas) or @sortas = '']))"/>
+                       <xsl:sort select="normalize-space(concat(d:secondary/@sortas, d:secondary[not(@sortas) or @sortas = '']))"/>
+                       <xsl:sort select="normalize-space(concat(d:tertiary/@sortas, d:tertiary[not(@sortas) or @sortas = '']))"/>
                  </xsl:apply-templates>
                </xsl:otherwise>
          </xsl:choose>
        </index>
   </xsl:template>
   
-  <xsl:template match="indexterm[@class='endofrange']" mode="idx"/>
+  <xsl:template match="d:indexterm[@class='endofrange']" mode="idx"/>
   
-  <xsl:template match="indexterm|primary|secondary|tertiary" mode="idx">
+  <xsl:template match="d:indexterm|d:primary|d:secondary|d:tertiary" mode="idx">
 
        <xsl:variable name="href">
          <xsl:call-template name="href.target.with.base.dir">
 
        <xsl:variable name="text">
          <xsl:value-of select="normalize-space(.)"/>
-         <xsl:if test="following-sibling::*[1][self::see]">
+         <xsl:if test="following-sibling::*[1][self::d:see]">
                <xsl:text> (</xsl:text><xsl:call-template name="gentext">
                  <xsl:with-param name="key" select="'see'"/>
                </xsl:call-template><xsl:text> </xsl:text>
-               <xsl:value-of select="following-sibling::*[1][self::see]"/>)</xsl:if>
+               <xsl:value-of select="following-sibling::*[1][self::d:see]"/>)</xsl:if>
        </xsl:variable>
        
        <xsl:choose>
-         <xsl:when test="self::indexterm">
-               <xsl:apply-templates select="primary" mode="idx"/>
+         <xsl:when test="self::d:indexterm">
+               <xsl:apply-templates select="d:primary" mode="idx"/>
          </xsl:when>
-         <xsl:when test="self::primary">
+         <xsl:when test="self::d:primary">
                <entry keyword="{$text}">
                  <topic href="{$href}"/>
-                 <xsl:apply-templates select="following-sibling::secondary"  mode="idx"/>
+                 <xsl:apply-templates select="following-sibling::d:secondary"  mode="idx"/>
                </entry>
          </xsl:when>
          <xsl:otherwise>
                <entry keyword="{$text}">
                  <topic href="{$href}"/>
-                 <xsl:apply-templates select="following-sibling::tertiary"  mode="idx"/>
+                 <xsl:apply-templates select="following-sibling::d:tertiary"  mode="idx"/>
                </entry>
          </xsl:otherwise>
        </xsl:choose>
index 5c09e7d2af7c5293033378e802b7a189332431b6..9809733b3ef1dd8561e01ffcdd0922be66dfbb6f 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-               xmlns:ng="http://docbook.org/docbook-ng" 
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:ng="http://docbook.org/docbook-ng"
                xmlns:db="http://docbook.org/ns/docbook"
                xmlns:exsl="http://exslt.org/common" version="1.0"
-               exclude-result-prefixes="exsl db ng">
+               exclude-result-prefixes="exsl db ng d">
 
 <!-- 
 ********************************************************************************
index bd745162085799e938db3ba85f48372faaba1ab1..3d22c8d5d743dc5a270c36b0027a8767c1359e5d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
-<xsl:stylesheet
-version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet exclude-result-prefixes="d"
+               version="1.0"
+               xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:import href="../../../../epub/docbook.xsl" />
   <xsl:param name="xref.with.number.and.title" select="0"/>
   <xsl:param name="index.on.type" select="1"/>
index fb7ffac66b723f45d6e29ecdaaf071a34043dcbc..ef84d0fb6666478970506a1ae712a428b3b2dcea 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               version="2.0">
   <xsl:output method="xml" omit-xml-declaration="no" doctype-public="-//OASIS//DTD DocBook XML V4.4//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" indent="no"/>
 <!-- Use this tool to obfuscate the text of a docment that you want to use as a test cast -->
   <xsl:template match="@*|*|comment()|processing-instruction()">
index 4ea4cd5573ffc228303cb29cce2ddcc4780dead5..575bb74be673dc33a756e4303a44b19eb801e8fe 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               version="2.0">
   <xsl:output method="xml" omit-xml-declaration="no" doctype-public="-//OASIS//DTD DocBook XML V4.4//EN" doctype-system="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" indent="no"/>
   <xsl:template match="@*|*|comment()|processing-instruction()">
     <xsl:copy>
index 6e6ed0009b82027829d2fca6a387055acec1b263..29d7fc8e1b75c270294017252a58ed0a57e7e96d 100644 (file)
   xmlns:str="http://exslt.org/strings"
   xmlns:date="http://exslt.org/dates-and-times"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:xtext="xalan://com.nwalsh.xalan.Text"
 
   extension-element-prefixes="date stext xtext"
-  exclude-result-prefixes="exsl date db dc h ncx ng opf stext str xtext"
+  exclude-result-prefixes="exsl date db dc h ncx ng opf stext str xtext d"
 
   version="1.0">
 
   </xsl:variable>
   <xsl:variable name="root.is.a.chunk">
     <xsl:choose>
-      <xsl:when test="/*[not(self::book)][not(sect1) or not(section)]">
+      <xsl:when test="/*[not(self::d:book)][not(d:sect1) or not(d:section)]">
         <xsl:text>1</xsl:text>
       </xsl:when>
-      <xsl:when test="/book[*[last()][self::bookinfo]]|book[bookinfo]">
+      <xsl:when test="/d:book[*[last()][self::d:bookinfo]]|d:book[d:bookinfo]">
         <xsl:text>1</xsl:text>
       </xsl:when>
-      <xsl:when test="/book[*[last()][self::info]]|book[info]">
+      <xsl:when test="/d:book[*[last()][self::d:info]]|d:book[d:info]">
         <xsl:text>1</xsl:text>
       </xsl:when>
-      <xsl:when test="/bibliography">
+      <xsl:when test="/d:bibliography">
         <xsl:text>1</xsl:text>
       </xsl:when>
       <xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:key name="image-filerefs" match="graphic|inlinegraphic|imagedata" use="@fileref"/>
+  <xsl:key name="image-filerefs" match="d:graphic|d:inlinegraphic|d:imagedata" use="@fileref"/>
 
   <xsl:template match="/" priority="1">
     <!-- * Get a title for current doc so that we let the user -->
     <xsl:choose>
       <!-- fix namespace if necessary -->
       <xsl:when test="$exsl.node.set.available != 0 and 
-                    namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                    namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
         <xsl:call-template name="log.message">
           <xsl:with-param name="level">Note</xsl:with-param>
           <xsl:with-param name="source" select="$doc.title"/>
           <xsl:with-param name="context-desc">
-            <xsl:text>namesp. cut</xsl:text>
+            <xsl:text>namesp. add</xsl:text>
           </xsl:with-param>
           <xsl:with-param name="message">
-            <xsl:text>stripped namespace before processing</xsl:text>
+            <xsl:text>added namespace before processing</xsl:text>
           </xsl:with-param>
         </xsl:call-template>
         <!-- DEBUG: uncomment to save namespace-fixed document.
           <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
           <xsl:with-param name="method" select="'xml'"/>
           <xsl:with-param name="content">
-            <xsl:copy-of select="exsl:node-set($no.namespace)"/>
+            <xsl:copy-of select="exsl:node-set($with.namespace)"/>
           </xsl:with-param>
         </xsl:call-template>
         -->
-        <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+        <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
       </xsl:when>
       <!-- Can't process unless namespace fixed with exsl node-set()-->
-      <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+      <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
         <xsl:message terminate="yes">
-          <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+          <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
           <xsl:text> cannot proceed.</xsl:text>
         </xsl:message>
       </xsl:when>
     <xsl:variable name="info" select="*/*[contains(local-name(.), 'info')][1]"/>
 
     <xsl:choose>
-      <xsl:when test="$info/biblioid">
-        <xsl:if test="$info/biblioid[1][@class = 'doi' or 
+      <xsl:when test="$info/d:biblioid">
+        <xsl:if test="$info/d:biblioid[1][@class = 'doi' or
                                           @class = 'isbn' or
                                           @class = 'isrn' or
                                           @class = 'issn']">
           <xsl:text>urn:</xsl:text>
-          <xsl:value-of select="$info/biblioid[1]/@class"/>
+          <xsl:value-of select="$info/d:biblioid[1]/@class"/>
           <xsl:text>:</xsl:text>
         </xsl:if>
-        <xsl:value-of select="$info/biblioid[1]"/>
+        <xsl:value-of select="$info/d:biblioid[1]"/>
       </xsl:when>
-      <xsl:when test="$info/isbn">
+      <xsl:when test="$info/d:isbn">
         <xsl:text>urn:isbn:</xsl:text>
-        <xsl:value-of select="$info/isbn[1]"/>
+        <xsl:value-of select="$info/d:isbn[1]"/>
       </xsl:when>
-      <xsl:when test="$info/issn">
+      <xsl:when test="$info/d:issn">
         <xsl:text>urn:issn:</xsl:text>
-        <xsl:value-of select="$info/issn[1]"/>
+        <xsl:value-of select="$info/d:issn[1]"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
-          <xsl:when test="$info/invpartnumber"> 
-            <xsl:value-of select="$info/invpartnumber[1]"/>
+          <xsl:when test="$info/d:invpartnumber">
+            <xsl:value-of select="$info/d:invpartnumber[1]"/>
           </xsl:when>
-          <xsl:when test="$info/issuenum">      
-            <xsl:value-of select="$info[1]/issuenum[1]"/> 
+          <xsl:when test="$info/d:issuenum">
+            <xsl:value-of select="$info[1]/d:issuenum[1]"/>
           </xsl:when>
-          <xsl:when test="$info/productnumber"> 
-            <xsl:value-of select="$info[1]/productnumber[1]"/> 
+          <xsl:when test="$info/d:productnumber">
+            <xsl:value-of select="$info[1]/d:productnumber[1]"/>
           </xsl:when>
-          <xsl:when test="$info/seriesvolnums">
-            <xsl:value-of select="$info[1]/seriesvolnums[1]"/>
+          <xsl:when test="$info/d:seriesvolnums">
+            <xsl:value-of select="$info[1]/d:seriesvolnums[1]"/>
           </xsl:when>
-          <xsl:when test="$info/volumenum">
-            <xsl:value-of select="$info[1]/volumenum[1]"/> 
+          <xsl:when test="$info/d:volumenum">
+            <xsl:value-of select="$info[1]/d:volumenum[1]"/> 
           </xsl:when>
           <!-- Deprecated -->
-          <xsl:when test="$info/pubsnumber">
-            <xsl:value-of select="$info[1]/pubsnumber[1]"/>
+          <xsl:when test="$info/d:pubsnumber">
+            <xsl:value-of select="$info[1]/d:pubsnumber[1]"/>
           </xsl:when>
         </xsl:choose>  
         <xsl:text>_</xsl:text>
               </xsl:call-template>  
             </xsl:element>
 
-            <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> 
+            <xsl:if test="/*/*[d:cover or contains(name(.), 'info')]//d:mediaobject[@role='cover' or ancestor::d:cover]">
               <xsl:element namespace="http://www.idpf.org/2007/opf" name="meta">
                 <xsl:attribute name="name">cover</xsl:attribute>
                 <xsl:attribute name="content">
             type="cover" pointing to it AND there is a logical cover specified in a
             <meta name="cover"> tag, THEN, the HTML cover is discarded. -->
           <xsl:element name="head" namespace="http://www.daisy.org/z3986/2005/ncx/">
-            <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> 
+            <xsl:if test="/*/*[d:cover or contains(name(.), 'info')]//d:mediaobject[@role='cover' or ancestor::d:cover]">
               <xsl:element name="meta" namespace="http://www.daisy.org/z3986/2005/ncx/">
                 <xsl:attribute name="name">cover</xsl:attribute>
                 <xsl:attribute name="content">
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match="book|
-                       article|
-                       part|
-                       reference|
-                       preface|
-                       chapter|
-                       bibliography|
-                       appendix|
-                       glossary|
-                       section|
-                       sect1|
-                       sect2|
-                       sect3|
-                       sect4|
-                       sect5|
-                       refentry|
-                       colophon|
-                       bibliodiv[title]|
-                       setindex|
-                       index"
+  <xsl:template match="d:book|
+                       d:article|
+                       d:part|
+                       d:reference|
+                       d:preface|
+                       d:chapter|
+                       d:bibliography|
+                       d:appendix|
+                       d:glossary|
+                       d:section|
+                       d:sect1|
+                       d:sect2|
+                       d:sect3|
+                       d:sect4|
+                       d:sect5|
+                       d:refentry|
+                       d:colophon|
+                       d:bibliodiv[d:title]|
+                       d:setindex|
+                       d:index"
                 mode="ncx">
     <xsl:variable name="depth" select="count(ancestor::*)"/>
     <xsl:variable name="title">
     </xsl:variable>
     <xsl:variable name="order">
       <xsl:value-of select="$depth +
-                                  count(preceding::part|
-                                  preceding::reference|
-                                  preceding::book[parent::set]|
-                                  preceding::preface|
-                                  preceding::chapter|
-                                  preceding::bibliography|
-                                  preceding::appendix|
-                                  preceding::article|
-                                  preceding::glossary|
-                                  preceding::section[not(parent::partintro)]|
-                                  preceding::sect1[not(parent::partintro)]|
-                                  preceding::sect2[not(ancestor::partintro)]|
-                                  preceding::sect3[not(ancestor::partintro)]|
-                                  preceding::sect4[not(ancestor::partintro)]|
-                                  preceding::sect5[not(ancestor::partintro)]|
-                                  preceding::refentry|
-                                  preceding::colophon|
-                                  preceding::bibliodiv[title]|
-                                  preceding::index)"/>
+                                  count(preceding::d:part|
+                                  preceding::d:reference|
+                                  preceding::d:book[parent::d:set]|
+                                  preceding::d:preface|
+                                  preceding::d:chapter|
+                                  preceding::d:bibliography|
+                                  preceding::d:appendix|
+                                  preceding::d:article|
+                                  preceding::d:glossary|
+                                  preceding::d:section[not(parent::d:partintro)]|
+                                  preceding::d:sect1[not(parent::d:partintro)]|
+                                  preceding::d:sect2[not(ancestor::d:partintro)]|
+                                  preceding::d:sect3[not(ancestor::d:partintro)]|
+                                  preceding::d:sect4[not(ancestor::d:partintro)]|
+                                  preceding::d:sect5[not(ancestor::d:partintro)]|
+                                  preceding::d:refentry|
+                                  preceding::d:colophon|
+                                  preceding::d:bibliodiv[d:title]|
+                                  preceding::d:index)"/>
     </xsl:variable>
 
     <xsl:element name="navPoint" namespace="http://www.daisy.org/z3986/2005/ncx/">
 
       <xsl:attribute name="playOrder">
         <xsl:choose>
-          <xsl:when test="/*[self::set]">
+          <xsl:when test="/*[self::d:set]">
             <xsl:value-of select="$order"/>
           </xsl:when>
           <xsl:when test="$root.is.a.chunk != '0'">
           <xsl:value-of select="$href"/>
         </xsl:attribute>
       </xsl:element>
-      <xsl:apply-templates select="book[parent::set]|part|reference|preface|chapter|bibliography|appendix|article|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv[title]|setindex|index" mode="ncx"/>
+      <xsl:apply-templates select="d:book[parent::d:set]|d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:glossary|d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv[d:title]|d:setindex|d:index" mode="ncx"/>
     </xsl:element>
 
   </xsl:template>
     <!-- override if you care -->
   </xsl:template>
 
-  <xsl:template match="authorgroup" mode="opf.metadata">
-    <xsl:apply-templates select="author|corpauthor" mode="opf.metadata"/>
+  <xsl:template match="d:authorgroup" mode="opf.metadata">
+    <xsl:apply-templates select="d:author|d:corpauthor" mode="opf.metadata"/>
   </xsl:template>
 
-  <xsl:template match="author|corpauthor" mode="opf.metadata">
+  <xsl:template match="d:author|d:corpauthor" mode="opf.metadata">
     <xsl:variable name="n">
       <xsl:call-template name="person.name">
         <xsl:with-param name="node" select="."/>
     </xsl:element>
   </xsl:template>
 
-  <xsl:template match="date" mode="opf.metadata">
+  <xsl:template match="d:date" mode="opf.metadata">
     <xsl:element name="dc:date">
       <xsl:choose>
         <xsl:when test="processing-instruction('dbtimestamp')">
 
 
   <!-- Space separate the compontents of the abstract (dropping the inline markup, sadly) -->
-  <xsl:template match="abstract" mode="opf.metadata">
+  <xsl:template match="d:abstract" mode="opf.metadata">
     <xsl:element name="dc:description">
-      <xsl:for-each select="formalpara|para|simpara|title">
+      <xsl:for-each select="d:formalpara|d:para|d:simpara|d:title">
         <xsl:choose>
-          <xsl:when test="self::formalpara">
-            <xsl:value-of select="normalize-space(string(title))"/>
+          <xsl:when test="self::d:formalpara">
+            <xsl:value-of select="normalize-space(string(d:title))"/>
             <xsl:text>: </xsl:text>
-            <xsl:value-of select="normalize-space(string(para))"/>
+            <xsl:value-of select="normalize-space(string(d:para))"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:value-of select="normalize-space(string(.))"/>
           </xsl:otherwise>  
         </xsl:choose>
-        <xsl:if test="self::title">
+        <xsl:if test="self::d:title">
           <xsl:text>:</xsl:text>
         </xsl:if>
         <xsl:if test="not(position() = last())">
     </xsl:element>
   </xsl:template>
 
-  <xsl:template match="subjectset" mode="opf.metadata">
-    <xsl:apply-templates select="subject/subjectterm" mode="opf.metadata"/>
+  <xsl:template match="d:subjectset" mode="opf.metadata">
+    <xsl:apply-templates select="d:subject/d:subjectterm" mode="opf.metadata"/>
   </xsl:template>
   
-  <xsl:template match="subjectterm" mode="opf.metadata">
+  <xsl:template match="d:subjectterm" mode="opf.metadata">
     <xsl:element name="dc:subject">
       <xsl:value-of select="normalize-space(string(.))"/>
     </xsl:element>
   </xsl:template>
 
-  <xsl:template match="publisher" mode="opf.metadata">
-    <xsl:apply-templates select="publishername" mode="opf.metadata"/>
+  <xsl:template match="d:publisher" mode="opf.metadata">
+    <xsl:apply-templates select="d:publishername" mode="opf.metadata"/>
   </xsl:template>
   
-  <xsl:template match="publishername" mode="opf.metadata">
+  <xsl:template match="d:publishername" mode="opf.metadata">
     <xsl:element name="dc:publisher">
       <xsl:value-of select="normalize-space(string(.))"/>
     </xsl:element>
   </xsl:template>
 
-  <xsl:template match="copyright" mode="opf.metadata">
+  <xsl:template match="d:copyright" mode="opf.metadata">
     <xsl:variable name="copyright.date">
       <xsl:call-template name="copyright.years">
-        <xsl:with-param name="years" select="year"/>
+        <xsl:with-param name="years" select="d:year"/>
         <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
         <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
       </xsl:call-template>
     </xsl:variable>
-    <xsl:if test="not(../date)">
+    <xsl:if test="not(../d:date)">
       <xsl:element name="dc:date">
         <xsl:call-template name="copyright.years">
-          <xsl:with-param name="years" select="year[last()]"/>
+          <xsl:with-param name="years" select="d:year[last()]"/>
           <xsl:with-param name="print.ranges" select="0"/>
           <xsl:with-param name="single.year.ranges" select="0"/>
         </xsl:call-template>
       <xsl:call-template name="gentext.space"/>
       <xsl:value-of select="$copyright.date"/>
       <xsl:call-template name="gentext.space"/>
-      <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+      <xsl:apply-templates select="d:holder" mode="titlepage.mode"/>
     </xsl:element>
   </xsl:template>
 
     <xsl:variable name="info" select="*/*[contains(local-name(.), 'info')][1]"/>
     
     <xsl:if test="contains($toc.params, 'toc') or 
-                  $info/cover or 
-                  $info//mediaobject[@role='cover' or ancestor::cover]"> 
+                  $info/d:cover or
+                  $info//d:mediaobject[@role='cover' or ancestor::d:cover]">
       <xsl:element namespace="http://www.idpf.org/2007/opf" name="guide">
-        <xsl:if test="$info/cover or $info//mediaobject[@role='cover' or ancestor::cover]"> 
+        <xsl:if test="$info/d:cover or $info//d:mediaobject[@role='cover' or ancestor::d:cover]">
           <xsl:element namespace="http://www.idpf.org/2007/opf" name="reference">
             <xsl:attribute name="href">
               <xsl:value-of select="$epub.cover.html" />
   <xsl:template name="spine.cover">
     <xsl:variable name="info" select="*/*[contains(local-name(.), 'info')][1]"/>
     <xsl:variable name="cover.image" 
-                  select="$info//mediaobject[@role='cover' or ancestor::cover]"/>
+                  select="$info//d:mediaobject[@role='cover' or ancestor::d:cover]"/>
     
     <xsl:if test="$cover.image">
       <xsl:element namespace="http://www.idpf.org/2007/opf" name="itemref">
         </xsl:call-template>
       </xsl:if>
 
-      <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> 
+      <xsl:if test="/*/*[d:cover or contains(name(.), 'info')]//d:mediaobject[@role='cover' or ancestor::d:cover]">
         <xsl:element namespace="http://www.idpf.org/2007/opf" name="item">
           <xsl:attribute name="id"> <xsl:value-of select="$epub.cover.id"/> </xsl:attribute>
           <xsl:attribute name="href"> 
       </xsl:choose>
 
       <!-- TODO: be nice to have a id="titlepage" here -->
-      <xsl:apply-templates select="//part|
-                                   //book[*[last()][self::bookinfo]]|
-                                   //book[bookinfo]|
-                                   //book[*[last()][self::info]]|
-                                   //book[info]|
-                                   /set|
-                                   /set/book|
-                                   //reference|
-                                   //preface|
-                                   //chapter|
-                                   //bibliography|
-                                   //appendix|
-                                   //article|
-                                   //glossary|
-                                   //section|
-                                   //sect1|
-                                   //sect2|
-                                   //sect3|
-                                   //sect4|
-                                   //sect5|
-                                   //refentry|
-                                   //colophon|
-                                   //bibliodiv[title]|
-                                   //index|
-                                   //setindex|
-                                   //graphic|
-                                   //inlinegraphic|
-                                   //mediaobject|
-                                   //mediaobjectco|
-                                   //inlinemediaobject" 
+      <xsl:apply-templates select="//d:part|
+                                   //d:book[*[last()][self::d:bookinfo]]|
+                                   //d:book[d:bookinfo]|
+                                   //d:book[*[last()][self::d:info]]|
+                                   //d:book[d:info]|
+                                   /d:set|
+                                   /d:set/d:book|
+                                   //d:reference|
+                                   //d:preface|
+                                   //d:chapter|
+                                   //d:bibliography|
+                                   //d:appendix|
+                                   //d:article|
+                                   //d:glossary|
+                                   //d:section|
+                                   //d:sect1|
+                                   //d:sect2|
+                                   //d:sect3|
+                                   //d:sect4|
+                                   //d:sect5|
+                                   //d:refentry|
+                                   //d:colophon|
+                                   //d:bibliodiv[d:title]|
+                                   //d:index|
+                                   //d:setindex|
+                                   //d:graphic|
+                                   //d:inlinegraphic|
+                                   //d:mediaobject|
+                                   //d:mediaobjectco|
+                                   //d:inlinemediaobject"
                            mode="opf.manifest"/>
       <xsl:call-template name="opf.calloutlist"/>
     </xsl:element>
         <xsl:with-param name="ext" select="$callout.graphics.extension"/>
       </xsl:call-template>
     </xsl:variable>  
-    <xsl:if test="$callout.graphics != 0 and (//calloutlist|//co)">
+    <xsl:if test="$callout.graphics != 0 and (//d:calloutlist|//d:co)">
       <xsl:call-template name="opf.reference.callout">
         <xsl:with-param name="conum" select="1"/>
         <xsl:with-param name="format" select="$format"/>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="mediaobject|
-                       mediaobjectco|
-                       inlinemediaobject" 
+  <xsl:template match="d:mediaobject|
+                       d:mediaobjectco|
+                       d:inlinemediaobject" 
                 mode="opf.manifest">
 
-    <xsl:variable name="olist" select="imageobject|imageobjectco                      |videoobject|audioobject                      |textobject"/>
+    <xsl:variable name="olist" select="d:imageobject|d:imageobjectco                      |d:videoobject|d:audioobject                      |d:textobject"/>
 
     <xsl:variable name="object.index">
       <xsl:call-template name="select.mediaobject.index">
     <xsl:variable name="object" select="$olist[position() = $object.index]"/>
 
     <xsl:choose>
-      <xsl:when test="$object/descendant::imagedata[@format = 'GIF' or 
+      <xsl:when test="$object/descendant::d:imagedata[@format = 'GIF' or
                                                     @format = 'GIF87a' or 
                                                     @format = 'GIF89a' or 
                                                     @format = 'JPEG' or 
                                                     @format = 'JPG' or 
                                                     @format = 'PNG' or 
                                                     @format = 'SVG']">
-        <xsl:apply-templates select="$object[descendant::imagedata[@format = 'GIF' or 
+        <xsl:apply-templates select="$object[descendant::d:imagedata[@format = 'GIF' or
                                                                    @format = 'GIF87a' or 
                                                                    @format = 'GIF89a' or 
                                                                    @format = 'JPEG' or 
                                                                    @format = 'JPG' or 
                                                                    @format = 'PNG' or 
-                                                                   @format = 'SVG']][1]/imagedata"
+                                                                   @format = 'SVG']][1]/d:imagedata"
                              mode="opf.manifest"/>              
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="$object/imagedata[1]"
+        <xsl:apply-templates select="$object/d:imagedata[1]"
                              mode="opf.manifest"/>              
       </xsl:otherwise>
     </xsl:choose>  
   </xsl:template>
 
-  <xsl:template match="cover/mediaobject|
-                       mediaobject[@role='cover']"
+  <xsl:template match="d:cover/d:mediaobject|
+                       d:mediaobject[@role='cover']"
                 mode="opf.manifest">
     <xsl:choose>
-      <xsl:when test="imageobject[@role='front-large']">
-        <xsl:apply-templates select="imageobject[@role='front-large']/imagedata"
+      <xsl:when test="d:imageobject[@role='front-large']">
+        <xsl:apply-templates select="d:imageobject[@role='front-large']/d:imagedata"
                              mode="opf.manifest"/>              
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="imageobject/imagedata[1]"
+        <xsl:apply-templates select="d:imageobject/d:imagedata[1]"
                              mode="opf.manifest"/>              
       </xsl:otherwise>
     </xsl:choose>  
   </xsl:template>
 
-  <xsl:template match="mediaobjectco"
+  <xsl:template match="d:mediaobjectco"
                 mode="opf.manifest">
     <xsl:message>WARNING: mediaobjectco almost certainly will not render as expected in .epub!</xsl:message>
-    <xsl:apply-templates select="imageobjectco/imageobject/imagedata" 
+    <xsl:apply-templates select="d:imageobjectco/d:imageobject/d:imagedata"
                          mode="opf.manifest"/>              
   </xsl:template>
 
 
   <!-- wish I had XSLT2 ...-->
   <!-- TODO: priority a hack -->
-  <xsl:template match="graphic[not(@format)]|
-                       inlinegraphic[not(@format)]|
-                       imagedata[not(@format)]"
+  <xsl:template match="d:graphic[not(@format)]|
+                       d:inlinegraphic[not(@format)]|
+                       d:imagedata[not(@format)]"
                 mode="opf.manifest">        
     <xsl:variable name="filename">
       <xsl:choose>
         <xsl:element namespace="http://www.idpf.org/2007/opf" name="item">
           <xsl:attribute name="id"> 
             <xsl:choose>
-              <xsl:when test="ancestor::mediaobject[@role='cover'] and parent::*[@role='front-large']">
+              <xsl:when test="ancestor::d:mediaobject[@role='cover'] and parent::*[@role='front-large']">
                 <xsl:value-of select="$epub.cover.image.id"/>
               </xsl:when>
-              <xsl:when test="ancestor::mediaobject[@role='cover'] and (count(ancestor::mediaobject//imageobject) = 1)">
+              <xsl:when test="ancestor::d:mediaobject[@role='cover'] and (count(ancestor::d:mediaobject//d:imageobject) = 1)">
                 <xsl:value-of select="$epub.cover.image.id"/>
               </xsl:when>
-              <xsl:when test="ancestor::cover">
+              <xsl:when test="ancestor::d:cover">
                 <xsl:value-of select="$epub.cover.image.id"/>
               </xsl:when>
               <xsl:otherwise>
   </xsl:template>
 
   <!-- Note: Selection of the first interesting imagedata is done in the select -->
-  <xsl:template match="graphic[@format = 'GIF' or @format = 'GIF87a' or @format = 'GIF89a' or @format = 'JPEG' or @format = 'JPG' or @format = 'PNG' or @format = 'SVG']|
-                       inlinegraphic[@format = 'GIF' or @format = 'GIF87a' or @format = 'GIF89a' or @format = 'JPEG' or @format = 'JPG' or @format = 'PNG' or @format = 'SVG']|
-                       imagedata[@format]"
+  <xsl:template match="d:graphic[@format = 'GIF' or @format = 'GIF87a' or @format = 'GIF89a' or @format = 'JPEG' or @format = 'JPG' or @format = 'PNG' or @format = 'SVG']|
+                       d:inlinegraphic[@format = 'GIF' or @format = 'GIF87a' or @format = 'GIF89a' or @format = 'JPEG' or @format = 'JPG' or @format = 'PNG' or @format = 'SVG']|
+                       d:imagedata[@format]"
                 mode="opf.manifest">
     <xsl:variable name="filename">
       <xsl:choose>
       <xsl:element namespace="http://www.idpf.org/2007/opf" name="item">
         <xsl:attribute name="id"> 
           <xsl:choose>
-            <xsl:when test="ancestor::mediaobject[@role='cover'] and parent::*[@role='front-large']">
+            <xsl:when test="ancestor::d:mediaobject[@role='cover'] and parent::*[@role='front-large']">
               <xsl:value-of select="$epub.cover.image.id"/>
             </xsl:when>
-            <xsl:when test="ancestor::mediaobject[@role='cover'] and (count(ancestor::mediaobject//imageobject) = 1)">
+            <xsl:when test="ancestor::d:mediaobject[@role='cover'] and (count(ancestor::d:mediaobject//d:imageobject) = 1)">
               <xsl:value-of select="$epub.cover.image.id"/>
             </xsl:when>
-            <xsl:when test="ancestor::cover">
+            <xsl:when test="ancestor::d:cover">
               <xsl:value-of select="$epub.cover.image.id"/>
             </xsl:when>
             <xsl:otherwise>
        need further tweaking to ensure _never_ dropping generated content (XHTML)
        from the manifest (OPF file) -->
   <xsl:template
-      match="set|
-            book[parent::set]|
-            book[*[last()][self::bookinfo]]|
-            book[bookinfo]|
-            book[*[last()][self::info]]|
-            book[info]|
-            article|
-            part|
-            reference|
-            preface|
-            chapter|
-            bibliography|
-            appendix|
-            glossary|
-            section|
-            sect1|
-            sect2|
-            sect3|
-            sect4|
-            sect5|
-            refentry|
-            colophon|
-            bibliodiv[title]|
-            setindex|
-            index"
+      match="d:set|
+            d:book[parent::d:set]|
+            d:book[*[last()][self::d:bookinfo]]|
+            d:book[d:bookinfo]|
+            d:book[*[last()][self::d:info]]|
+            d:book[d:info]|
+            d:article|
+            d:part|
+            d:reference|
+            d:preface|
+            d:chapter|
+            d:bibliography|
+            d:appendix|
+            d:glossary|
+            d:section|
+            d:sect1|
+            d:sect2|
+            d:sect3|
+            d:sect4|
+            d:sect5|
+            d:refentry|
+            d:colophon|
+            d:bibliodiv[d:title]|
+            d:setindex|
+            d:index"
       mode="opf.manifest">
     <xsl:variable name="href">
       <xsl:call-template name="href.target.with.base.dir">
   <xsl:template match="text()" mode="ncx" />
 
   <xsl:template name="html.head">
-    <xsl:param name="prev" select="/foo"/>
-    <xsl:param name="next" select="/foo"/>
+    <xsl:param name="prev" select="/d:foo"/>
+    <xsl:param name="next" select="/d:foo"/>
     <xsl:variable name="this" select="."/>
     <xsl:variable name="home" select="/*[1]"/>
     <xsl:variable name="up" select="parent::*"/>
           <xsl:when test="$alt != ''">
             <xsl:value-of select="normalize-space($alt)"/>
           </xsl:when>
-          <xsl:when test="preceding::title[1]">
-            <xsl:value-of select="normalize-space(preceding::title[1])"/>
+          <xsl:when test="preceding::d:title[1]">
+            <xsl:value-of select="normalize-space(preceding::d:title[1])"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:text>(missing alt)</xsl:text>
       <xsl:text> cfs: </xsl:text>
       <xsl:value-of select="$chunk.first.sections"/>
       <xsl:text> ps: </xsl:text>
-      <xsl:value-of select="count($node/parent::section)"/>
+      <xsl:value-of select="count($node/parent::d:section)"/>
       <xsl:text> prs: </xsl:text>
-      <xsl:value-of select="count($node/preceding-sibling::section)"/>
+      <xsl:value-of select="count($node/preceding-sibling::d:section)"/>
     </xsl:message>
   -->
 
     <xsl:choose>
       <xsl:when test="not($node/parent::*)">1</xsl:when>
 
-      <xsl:when test="local-name($node) = 'sect1'                     and $chunk.section.depth &gt;= 1                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect1) &gt; 0)">
+      <xsl:when test="local-name($node) = 'sect1'                     and $chunk.section.depth &gt;= 1                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::d:sect1) &gt; 0)">
         <xsl:text>1</xsl:text>
       </xsl:when>
-      <xsl:when test="local-name($node) = 'sect2'                     and $chunk.section.depth &gt;= 2                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect2) &gt; 0)">
+      <xsl:when test="local-name($node) = 'sect2'                     and $chunk.section.depth &gt;= 2                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::d:sect2) &gt; 0)">
         <xsl:call-template name="chunk">
           <xsl:with-param name="node" select="$node/parent::*"/>
         </xsl:call-template>
       </xsl:when>
-      <xsl:when test="local-name($node) = 'sect3'                     and $chunk.section.depth &gt;= 3                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect3) &gt; 0)">
+      <xsl:when test="local-name($node) = 'sect3'                     and $chunk.section.depth &gt;= 3                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::d:sect3) &gt; 0)">
         <xsl:call-template name="chunk">
           <xsl:with-param name="node" select="$node/parent::*"/>
         </xsl:call-template>
       </xsl:when>
-      <xsl:when test="local-name($node) = 'sect4'                     and $chunk.section.depth &gt;= 4                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect4) &gt; 0)">
+      <xsl:when test="local-name($node) = 'sect4'                     and $chunk.section.depth &gt;= 4                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::d:sect4) &gt; 0)">
         <xsl:call-template name="chunk">
           <xsl:with-param name="node" select="$node/parent::*"/>
         </xsl:call-template>
       </xsl:when>
-      <xsl:when test="local-name($node) = 'sect5'                     and $chunk.section.depth &gt;= 5                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::sect5) &gt; 0)">
+      <xsl:when test="local-name($node) = 'sect5'                     and $chunk.section.depth &gt;= 5                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::d:sect5) &gt; 0)">
         <xsl:call-template name="chunk">
           <xsl:with-param name="node" select="$node/parent::*"/>
         </xsl:call-template>
       </xsl:when>
-      <xsl:when test="local-name($node) = 'section'                     and $chunk.section.depth &gt;= count($node/ancestor::section)+1                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::section) &gt; 0)">
+      <xsl:when test="local-name($node) = 'section'                     and $chunk.section.depth &gt;= count($node/ancestor::d:section)+1                     and ($chunk.first.sections != 0                          or count($node/preceding-sibling::d:section) &gt; 0)">
         <xsl:call-template name="chunk">
           <xsl:with-param name="node" select="$node/parent::*"/>
         </xsl:call-template>
   <!-- OVERRIDES xhtml-1_1/chunk-code.xsl   -->
   <!-- Add chunking for bibliography as root element -->
   <!-- AN OVERRIDE --> 
-  <xsl:template match="set|
-                       book|
-                       part|
-                       preface|
-                       chapter|
-                       appendix|
-                       article|
-                       reference|
-                       refentry|
-                       book/glossary|
-                       article/glossary|
-                       part/glossary|
-                       bibliography|
-                       colophon"
+  <xsl:template match="d:set|
+                       d:book|
+                       d:part|
+                       d:preface|
+                       d:chapter|
+                       d:appendix|
+                       d:article|
+                       d:reference|
+                       d:refentry|
+                       d:book/d:glossary|
+                       d:article/d:glossary|
+                       d:part/d:glossary|
+                       d:bibliography|
+                       d:colophon"
                 priority="1">       
   <!-- END OF OVERRIDE --> 
     <xsl:choose>
   <!-- OVERRIDES xhtml-1_1/graphics.xsl   -->
   <!-- Do _NOT_ output any xlink garbage, so if you don't have 
        processor with extensions, you're screwed and we're terminating -->
-  <xsl:template match="inlinegraphic">
+  <xsl:template match="d:inlinegraphic">
     <xsl:variable name="filename">
       <xsl:choose>
         <xsl:when test="@entityref">
   </xsl:template>  
 
   <xsl:template name="cover">
-    <xsl:apply-templates select="/*/*[contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"/>
+    <xsl:apply-templates select="/*/*[contains(name(.), 'info')]//d:mediaobject[@role='cover' or ancestor::d:cover]"/>
   </xsl:template>  
 
-  <xsl:template match="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]">
+  <xsl:template match="/*/*[d:cover or contains(name(.), 'info')]//d:mediaobject[@role='cover' or ancestor::d:cover]">
     <xsl:call-template name="write.chunk">
       <xsl:with-param name="filename">
         <xsl:value-of select="$epub.cover.filename" />
                 <xsl:value-of select="$epub.cover.image.id"/>
               </xsl:attribute>
               <xsl:choose>
-                <xsl:when test="imageobject[@role='front-large']">
-                  <xsl:apply-templates select="imageobject[@role='front-large']"/>
+                <xsl:when test="d:imageobject[@role='front-large']">
+                  <xsl:apply-templates select="d:imageobject[@role='front-large']"/>
                 </xsl:when>
                 <xsl:otherwise>
-                  <xsl:apply-templates select="imageobject[1]"/>
+                  <xsl:apply-templates select="d:imageobject[1]"/>
                 </xsl:otherwise>
               </xsl:choose>
             </xsl:element>
             <!-- If this is defined as an explicit cover page, then process
             any remaining text -->
-            <xsl:if test="ancestor::cover">
-              <xsl:apply-templates select="ancestor::cover/para"/>
+            <xsl:if test="ancestor::d:cover">
+              <xsl:apply-templates select="ancestor::d:cover/d:para"/>
             </xsl:if>
           </xsl:element>
         </xsl:element>
     <xsl:value-of select="$html.ext"/>
   </xsl:template>
 
-  <xsl:template match="bibliodiv[title]" mode="label.markup">
+  <xsl:template match="d:bibliodiv[d:title]" mode="label.markup">
   </xsl:template>
 
-  <xsl:template match="token" mode="opf.manifest.font">
+  <xsl:template match="d:token" mode="opf.manifest.font">
     <xsl:call-template name="embedded-font-item">
       <xsl:with-param name="font.file" select="."/>
     </xsl:call-template>
   <xsl:variable name="id">
     <xsl:choose>
       <!-- Make sure the subtitle doesn't get the same id as the title -->
-      <xsl:when test="self::subtitle">
+      <xsl:when test="self::d:subtitle">
         <xsl:call-template name="object.id">
           <xsl:with-param name="object" select="."/>
         </xsl:call-template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bridgehead">
-  <xsl:variable name="container" select="(ancestor::appendix                         |ancestor::article                         |ancestor::bibliography                         |ancestor::chapter                         |ancestor::glossary                         |ancestor::glossdiv                         |ancestor::index                         |ancestor::partintro                         |ancestor::preface                         |ancestor::refsect1                         |ancestor::refsect2                         |ancestor::refsect3                         |ancestor::sect1                         |ancestor::sect2                         |ancestor::sect3                         |ancestor::sect4                         |ancestor::sect5                         |ancestor::section                         |ancestor::setindex                         |ancestor::simplesect)[last()]"/>
+<xsl:template match="d:bridgehead">
+  <xsl:variable name="container" select="(ancestor::d:appendix                         |ancestor::d:article                         |ancestor::d:bibliography                         |ancestor::d:chapter                         |ancestor::d:glossary                         |ancestor::d:glossdiv                         |ancestor::d:index                         |ancestor::d:partintro                         |ancestor::d:preface                         |ancestor::d:refsect1                         |ancestor::d:refsect2                         |ancestor::d:refsect3                         |ancestor::d:sect1                         |ancestor::d:sect2                         |ancestor::d:sect3                         |ancestor::d:sect4                         |ancestor::d:sect5                         |ancestor::d:section                         |ancestor::d:setindex                         |ancestor::d:simplesect)[last()]"/>
 
   <xsl:variable name="clevel">
     <xsl:choose>
       <xsl:when test="local-name($container) = 'appendix'                       or local-name($container) = 'chapter'                       or local-name($container) = 'article'                       or local-name($container) = 'bibliography'                       or local-name($container) = 'glossary'                       or local-name($container) = 'index'                       or local-name($container) = 'partintro'                       or local-name($container) = 'preface'                       or local-name($container) = 'setindex'">1</xsl:when>
       <xsl:when test="local-name($container) = 'glossdiv'">
-        <xsl:value-of select="count(ancestor::glossdiv)+1"/>
+        <xsl:value-of select="count(ancestor::d:glossdiv)+1"/>
       </xsl:when>
       <xsl:when test="local-name($container) = 'sect1'                       or local-name($container) = 'sect2'                       or local-name($container) = 'sect3'                       or local-name($container) = 'sect4'                       or local-name($container) = 'sect5'                       or local-name($container) = 'refsect1'                       or local-name($container) = 'refsect2'                       or local-name($container) = 'refsect3'                       or local-name($container) = 'section'                       or local-name($container) = 'simplesect'">
         <xsl:variable name="slevel">
 
   <xsl:variable name="level">
     <xsl:choose>
-      <xsl:when test="ancestor::section">
-        <xsl:value-of select="count(ancestor::section)+1"/>
+      <xsl:when test="ancestor::d:section">
+        <xsl:value-of select="count(ancestor::d:section)+1"/>
       </xsl:when>
-      <xsl:when test="ancestor::sect5">6</xsl:when>
-      <xsl:when test="ancestor::sect4">5</xsl:when>
-      <xsl:when test="ancestor::sect3">4</xsl:when>
-      <xsl:when test="ancestor::sect2">3</xsl:when>
-      <xsl:when test="ancestor::sect1">2</xsl:when>
+      <xsl:when test="ancestor::d:sect5">6</xsl:when>
+      <xsl:when test="ancestor::d:sect4">5</xsl:when>
+      <xsl:when test="ancestor::d:sect3">4</xsl:when>
+      <xsl:when test="ancestor::d:sect2">3</xsl:when>
+      <xsl:when test="ancestor::d:sect1">2</xsl:when>
       <xsl:otherwise>1</xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
index c9588d3279f1354c7f1e7e7889a0c403439757e1..59e8462f456488d3b6e2bd96ddb49730a909a97d 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns:epub="http://www.idpf.org/2007/ops"
-  exclude-result-prefixes="exsl"
+  exclude-result-prefixes="exsl d"
   version="1.0">
 
 <!-- This is the main driver stylesheet file.  It imports or
index 33b98987bc1c1a867f458d72ea4b65afa0b14dc8..d0d30b29f25e70e0876df5abd0a5c0b5208dec03 100644 (file)
@@ -1,7 +1,13 @@
 <?xml version="1.0" encoding="ASCII"?>
 <!--This file was created automatically by html2xhtml-->
 <!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="cf exsl">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
+               xmlns="http://www.w3.org/1999/xhtml"
+               version="1.0"
+               exclude-result-prefixes="cf exsl d">
 
 <!-- ********************************************************************
 
index 434827bcf9ffe2c9d696f79bcd55fd2f7a4e29b9..a09887d30fdde0177de680dfee01d722395af73f 100644 (file)
@@ -6,8 +6,9 @@
 
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns="http://www.w3.org/1999/xhtml"
-  exclude-result-prefixes="#default"
+  exclude-result-prefixes="#default d"
   version="1.0">
 
 <xsl:import href="../xhtml5/docbook.xsl"/>
index 66d524626a19eabbf93468edfaba2707f19d75b1..8557d16d718c94833f1df24d431fcb59efef8474 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns:epub="http://www.idpf.org/2007/ops"
   xmlns:dc="http://purl.org/dc/elements/1.1/"  
@@ -11,7 +12,7 @@
   xmlns:str="http://exslt.org/strings"
   xmlns:xtext="xalan://com.nwalsh.xalan.Text"
   extension-element-prefixes="stext xtext"
-  exclude-result-prefixes="exsl dc ncx opf stext str xtext"
+  exclude-result-prefixes="exsl dc ncx opf stext str xtext d"
   version="1.0">
 
 <xsl:include href="../xhtml5/html5-chunk-mods.xsl"/>
index 533761af48dd06ac1e9cc2986985ca66e47aa049..44a329dc262f14ce915287970cad93ef562784c2 100644 (file)
@@ -6,6 +6,7 @@
 
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns:set="http://exslt.org/sets"
   xmlns="http://www.w3.org/1999/xhtml"
@@ -26,7 +27,7 @@
   xmlns:xtext="xalan://com.nwalsh.xalan.Text"
 
   extension-element-prefixes="stext xtext"
-  exclude-result-prefixes="#default cf date db dc dcterms epub exsl m ncx opf pls set ssml stext str svg xtext"
+  exclude-result-prefixes="#default cf date db dc dcterms epub exsl m ncx opf pls set ssml stext str svg xtext d"
   version="1.0">
 
 <xsl:import href="titlepage.templates.xsl"/>
@@ -190,16 +191,16 @@ article  toc,title,figure,table,example,equation
 <!-- This is used only by ncx piece -->
 <xsl:variable name="root.is.a.chunk">
   <xsl:choose>
-    <xsl:when test="/*[not(self::book)][not(sect1) or not(section)]">
+    <xsl:when test="/*[not(self::d:book)][not(d:sect1) or not(d:section)]">
       <xsl:text>1</xsl:text>
     </xsl:when>
-    <xsl:when test="/book[*[last()][self::bookinfo]]|book[bookinfo]">
+    <xsl:when test="/d:book[*[last()][self::d:bookinfo]]|d:book[d:bookinfo]">
       <xsl:text>1</xsl:text>
     </xsl:when>
-    <xsl:when test="/book[*[last()][self::info]]|book[info]">
+    <xsl:when test="/d:book[*[last()][self::d:info]]|d:book[d:info]">
       <xsl:text>1</xsl:text>
     </xsl:when>
-    <xsl:when test="/bibliography">
+    <xsl:when test="/d:bibliography">
       <xsl:text>1</xsl:text>
     </xsl:when>
     <xsl:otherwise>
@@ -465,7 +466,7 @@ article  toc,title,figure,table,example,equation
 <xsl:template name="metadata.cover">
   <xsl:variable name="info" select="./*[contains(local-name(.), 'info')][1]"/>
   <xsl:variable name="cover.image" 
-                select="$info//mediaobject[@role='cover' or ancestor::cover]"/>
+                select="$info//d:mediaobject[@role='cover' or ancestor::d:cover]"/>
 
   <xsl:if test="$cover.image">
     <xsl:element name="meta" namespace="{$opf.namespace}">
@@ -488,21 +489,21 @@ article  toc,title,figure,table,example,equation
   <!-- default is no output -->
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="opf.metadata">
+<xsl:template match="d:authorgroup" mode="opf.metadata">
   <xsl:apply-templates select="*" mode="opf.metadata"/>
 </xsl:template>
 
-<xsl:template match="author|corpauthor" mode="opf.metadata">
+<xsl:template match="d:author|d:corpauthor" mode="opf.metadata">
   <xsl:variable name="n">
     <xsl:choose>
-      <xsl:when test="self::corpauthor">
+      <xsl:when test="self::d:corpauthor">
         <xsl:apply-templates/>
       </xsl:when>
-      <xsl:when test="org/orgname">
-        <xsl:apply-templates select="org/orgname"/>
+      <xsl:when test="d:org/d:orgname">
+        <xsl:apply-templates select="d:org/d:orgname"/>
       </xsl:when>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name">
@@ -532,11 +533,11 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="editor" mode="opf.metadata">
+<xsl:template match="d:editor" mode="opf.metadata">
   <xsl:variable name="n">
     <xsl:choose>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name">
@@ -587,7 +588,7 @@ article  toc,title,figure,table,example,equation
 
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="opf.metadata">
+<xsl:template match="d:corpcredit" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:contributor</xsl:attribute>
     <xsl:value-of select="normalize-space(.)"/>
@@ -600,19 +601,19 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="collab|othercredit" mode="opf.metadata">
+<xsl:template match="d:collab|d:othercredit" mode="opf.metadata">
   <xsl:variable name="content">
     <xsl:choose>
-      <xsl:when test="collabname">
-        <xsl:apply-templates select="collabname"/>
+      <xsl:when test="d:collabname">
+        <xsl:apply-templates select="d:collabname"/>
       </xsl:when>
-      <xsl:when test="org/orgname">
-        <xsl:apply-templates select="org/orgname"/>
+      <xsl:when test="d:org/d:orgname">
+        <xsl:apply-templates select="d:org/d:orgname"/>
       </xsl:when>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname"/>
       </xsl:when>
-      <xsl:when test="personname|firstname|surname|othername">
+      <xsl:when test="d:personname|d:firstname|d:surname|d:othername">
         <xsl:call-template name="person.name"/>
       </xsl:when>
       <xsl:otherwise>
@@ -634,7 +635,7 @@ article  toc,title,figure,table,example,equation
 
 </xsl:template>
 
-<xsl:template match="date|pubdate" mode="opf.metadata">
+<xsl:template match="d:date|d:pubdate" mode="opf.metadata">
   <xsl:variable name="date">
     <xsl:call-template name="format.meta.date">
       <xsl:with-param name="string" select="normalize-space(.)"/>
@@ -643,7 +644,7 @@ article  toc,title,figure,table,example,equation
 
   <xsl:if test="string-length($date) != 0">
     <!-- Can only output one date for epub, pubdate has priority -->
-    <xsl:if test="self::pubdate or (self::date and not(../pubdate) )">
+    <xsl:if test="self::d:pubdate or (self::d:date and not(../d:pubdate) )">
       <xsl:element name="meta" namespace="{$opf.namespace}">
         <xsl:attribute name="property">dcterms:date</xsl:attribute>
         <xsl:value-of select="$date"/>
@@ -704,20 +705,20 @@ article  toc,title,figure,table,example,equation
 
 
 <!-- Space separate the compontents of the abstract (dropping the inline markup, sadly) -->
-<xsl:template match="abstract" mode="opf.metadata">
+<xsl:template match="d:abstract" mode="opf.metadata">
   <xsl:variable name="content">
-    <xsl:for-each select="formalpara|para|simpara|title">
+    <xsl:for-each select="d:formalpara|d:para|d:simpara|d:title">
       <xsl:choose>
-        <xsl:when test="self::formalpara">
-          <xsl:value-of select="normalize-space(string(title))"/>
+        <xsl:when test="self::d:formalpara">
+          <xsl:value-of select="normalize-space(string(d:title))"/>
           <xsl:text>: </xsl:text>
-          <xsl:value-of select="normalize-space(string(para))"/>
+          <xsl:value-of select="normalize-space(string(d:para))"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="normalize-space(string(.))"/>
         </xsl:otherwise>  
       </xsl:choose>
-      <xsl:if test="self::title">
+      <xsl:if test="self::d:title">
         <xsl:text>:</xsl:text>
       </xsl:if>
       <xsl:if test="not(position() = last())">
@@ -738,11 +739,11 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="subjectset" mode="opf.metadata">
-  <xsl:apply-templates select="subject/subjectterm" mode="opf.metadata"/>
+<xsl:template match="d:subjectset" mode="opf.metadata">
+  <xsl:apply-templates select="d:subject/d:subjectterm" mode="opf.metadata"/>
 </xsl:template>
 
-<xsl:template match="subjectterm" mode="opf.metadata">
+<xsl:template match="d:subjectterm" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:subject</xsl:attribute>
     <xsl:value-of select="normalize-space(string(.))"/>
@@ -755,11 +756,11 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="keywordset" mode="opf.metadata">
-  <xsl:apply-templates select="keyword" mode="opf.metadata"/>
+<xsl:template match="d:keywordset" mode="opf.metadata">
+  <xsl:apply-templates select="d:keyword" mode="opf.metadata"/>
 </xsl:template>
 
-<xsl:template match="keyword" mode="opf.metadata">
+<xsl:template match="d:keyword" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:subject</xsl:attribute>
     <xsl:value-of select="normalize-space(string(.))"/>
@@ -772,11 +773,11 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="publisher" mode="opf.metadata">
-  <xsl:apply-templates select="publishername" mode="opf.metadata"/>
+<xsl:template match="d:publisher" mode="opf.metadata">
+  <xsl:apply-templates select="d:publishername" mode="opf.metadata"/>
 </xsl:template>
 
-<xsl:template match="publishername" mode="opf.metadata">
+<xsl:template match="d:publishername" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:publisher</xsl:attribute>
     <xsl:value-of select="normalize-space(string(.))"/>
@@ -789,7 +790,7 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="bibliocoverage" mode="opf.metadata">
+<xsl:template match="d:bibliocoverage" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:coverage</xsl:attribute>
     <xsl:value-of select="normalize-space(string(.))"/>
@@ -802,7 +803,7 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="bibliorelation" mode="opf.metadata">
+<xsl:template match="d:bibliorelation" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:relation</xsl:attribute>
     <xsl:value-of select="normalize-space(string(.))"/>
@@ -815,7 +816,7 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="bibliosource" mode="opf.metadata">
+<xsl:template match="d:bibliosource" mode="opf.metadata">
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:source</xsl:attribute>
     <xsl:value-of select="normalize-space(string(.))"/>
@@ -828,22 +829,22 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="copyright" mode="opf.metadata">
+<xsl:template match="d:copyright" mode="opf.metadata">
   <xsl:variable name="copyright.date">
     <xsl:call-template name="copyright.years">
-      <xsl:with-param name="years" select="year"/>
+      <xsl:with-param name="years" select="d:year"/>
       <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
       <xsl:with-param name="single.year.ranges" select="$make.single.year.ranges"/>
     </xsl:call-template>
   </xsl:variable>
 
   <!-- if no docbook date element, use copyright year for single date metadata -->
-  <xsl:if test="not(../date) and not(../pubdate)">
+  <xsl:if test="not(../d:date) and not(../d:pubdate)">
     <xsl:variable name="date.content">
       <xsl:call-template name="format.meta.date">
         <xsl:with-param name="string">
           <xsl:call-template name="copyright.years">
-            <xsl:with-param name="years" select="year[last()]"/>
+            <xsl:with-param name="years" select="d:year[last()]"/>
             <xsl:with-param name="print.ranges" select="0"/>
             <xsl:with-param name="single.year.ranges" select="0"/>
           </xsl:call-template>
@@ -870,7 +871,7 @@ article  toc,title,figure,table,example,equation
     <xsl:call-template name="gentext.space"/>
     <xsl:value-of select="$copyright.date"/>
     <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+    <xsl:apply-templates select="d:holder" mode="titlepage.mode"/>
   </xsl:variable>
 
   <xsl:element name="meta" namespace="{$opf.namespace}">
@@ -885,7 +886,7 @@ article  toc,title,figure,table,example,equation
 
   <xsl:element name="meta" namespace="{$opf.namespace}">
     <xsl:attribute name="property">dcterms:rightsHolder</xsl:attribute>
-    <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+    <xsl:apply-templates select="d:holder" mode="titlepage.mode"/>
   </xsl:element>
 </xsl:template>
 
@@ -901,11 +902,11 @@ article  toc,title,figure,table,example,equation
   </xsl:variable>
 
   <xsl:if test="contains($toc.params, 'toc') or 
-                $info/cover or 
-                $info//mediaobject[@role='cover' or ancestor::cover]"> 
+                $info/d:cover or
+                $info//d:mediaobject[@role='cover' or ancestor::d:cover]">
     <xsl:element namespace="{$opf.namespace}" name="guide">
-      <xsl:if test="$info/cover or 
-                    $info//mediaobject[@role='cover' or ancestor::cover]"> 
+      <xsl:if test="$info/d:cover or
+                    $info//d:mediaobject[@role='cover' or ancestor::d:cover]">
         <xsl:element namespace="{$opf.namespace}" name="reference">
           <xsl:attribute name="href">
             <xsl:value-of select="$epub.cover.filename" />
@@ -936,46 +937,46 @@ article  toc,title,figure,table,example,equation
   <xsl:variable name="info" select="./*[contains(local-name(.), 'info')][1]"/>
 
   <xsl:choose>
-    <xsl:when test="$info/biblioid">
-      <xsl:if test="$info/biblioid[1][@class = 'doi' or 
-                                      @class = 'isbn' or
-                                      @class = 'isrn' or
-                                      @class = 'istc' or
-                                      @class = 'issn']">
+    <xsl:when test="$info/d:biblioid">
+      <xsl:if test="$info/d:biblioid[1][@class = 'doi' or
+                                        @class = 'isbn' or
+                                        @class = 'isrn' or
+                                        @class = 'istc' or
+                                        @class = 'issn']">
         <xsl:text>urn:</xsl:text>
-        <xsl:value-of select="$info/biblioid[1]/@class"/>
+        <xsl:value-of select="$info/d:biblioid[1]/@class"/>
         <xsl:text>:</xsl:text>
       </xsl:if>
-      <xsl:value-of select="normalize-space($info/biblioid[1])"/>
+      <xsl:value-of select="normalize-space($info/d:biblioid[1])"/>
     </xsl:when>
-    <xsl:when test="$info/isbn">
+    <xsl:when test="$info/d:isbn">
       <xsl:text>urn:isbn:</xsl:text>
-      <xsl:value-of select="$info/isbn[1]"/>
+      <xsl:value-of select="$info/d:isbn[1]"/>
     </xsl:when>
-    <xsl:when test="$info/issn">
+    <xsl:when test="$info/d:issn">
       <xsl:text>urn:issn:</xsl:text>
-      <xsl:value-of select="$info/issn[1]"/>
+      <xsl:value-of select="$info/d:issn[1]"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:choose>
-        <xsl:when test="$info/invpartnumber">
-          <xsl:value-of select="$info/invpartnumber[1]"/>
+        <xsl:when test="$info/d:invpartnumber">
+          <xsl:value-of select="$info/d:invpartnumber[1]"/>
         </xsl:when>
-        <xsl:when test="$info/issuenum">
-          <xsl:value-of select="$info/issuenum[1]"/>
+        <xsl:when test="$info/d:issuenum">
+          <xsl:value-of select="$info/d:issuenum[1]"/>
         </xsl:when>
-        <xsl:when test="$info/productnumber">
-          <xsl:value-of select="$info/productnumber[1]"/>
+        <xsl:when test="$info/d:productnumber">
+          <xsl:value-of select="$info/d:productnumber[1]"/>
         </xsl:when>
-        <xsl:when test="$info/seriesvolnums">
-          <xsl:value-of select="$info/seriesvolnums[1]"/>
+        <xsl:when test="$info/d:seriesvolnums">
+          <xsl:value-of select="$info/d:seriesvolnums[1]"/>
         </xsl:when>
-        <xsl:when test="$info/volumenum">
-          <xsl:value-of select="$info/volumenum[1]"/>
+        <xsl:when test="$info/d:volumenum">
+          <xsl:value-of select="$info/d:volumenum[1]"/>
         </xsl:when>
         <!-- Deprecated -->
-        <xsl:when test="$info/pubsnumber">
-          <xsl:value-of select="$info/pubsnumber[1]"/>
+        <xsl:when test="$info/d:pubsnumber">
+          <xsl:value-of select="$info/d:pubsnumber[1]"/>
         </xsl:when>
       </xsl:choose>  
       <xsl:text>_</xsl:text>
@@ -1012,23 +1013,23 @@ article  toc,title,figure,table,example,equation
 
 <xsl:template match="*" mode="epub.type" priority="-1"/>
 
-<xsl:template match="chapter
-                    |appendix
-                    |epigraph
-                    |warning
-                    |preface
-                    |index
-                    |colophon
-                    |glossary
-                    |biblioentry
-                    |bibliography
-                    |dedication
-                    |sidebar
-                    |footnote
-                    |glossterm
-                    |glossdef
-                    |bridgehead
-                    |part" mode="epub.type">
+<xsl:template match="d:chapter
+                    |d:appendix
+                    |d:epigraph
+                    |d:warning
+                    |d:preface
+                    |d:index
+                    |d:colophon
+                    |d:glossary
+                    |d:biblioentry
+                    |d:bibliography
+                    |d:dedication
+                    |d:sidebar
+                    |d:footnote
+                    |d:glossterm
+                    |d:glossdef
+                    |d:bridgehead
+                    |d:part" mode="epub.type">
   <xsl:variable name="type" select="local-name()"/>
 
   <xsl:if test="$epub.output.epub.types != 0">
@@ -1038,36 +1039,36 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="section[parent::chapter] | sect1" mode="epub.type">
+<xsl:template match="d:section[parent::d:chapter] | d:sect1" mode="epub.type">
   <xsl:if test="$epub.output.epub.types != 0">
     <xsl:attribute name="epub:type">subchapter</xsl:attribute>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="section[not(parent::chapter)] |
-                     sect2 |
-                     sect3 |
-                     sect4 |
-                     sect5 |
-                     sect6" mode="epub.type">
+<xsl:template match="d:section[not(parent::d:chapter)] |
+                     d:sect2 |
+                     d:sect3 |
+                     d:sect4 |
+                     d:sect5 |
+                     d:sect6" mode="epub.type">
   <xsl:if test="$epub.output.epub.types != 0">
     <xsl:attribute name="epub:type">division</xsl:attribute>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="note|tip|caution|important" mode="epub.type">
+<xsl:template match="d:note|d:tip|d:caution|d:important" mode="epub.type">
   <xsl:if test="$epub.output.epub.types != 0">
     <xsl:attribute name="epub:type">notice</xsl:attribute>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="orderedlist|itemizedlist|variablelist|simplelist" mode="epub.type">
+<xsl:template match="d:orderedlist|d:itemizedlist|d:variablelist|d:simplelist" mode="epub.type">
   <xsl:if test="$epub.output.epub.types != 0">
     <xsl:attribute name="epub:type">list</xsl:attribute>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="listitem" mode="epub.type">
+<xsl:template match="d:listitem" mode="epub.type">
   <xsl:if test="$epub.output.epub.types != 0">
     <xsl:attribute name="epub:type">list-item</xsl:attribute>
   </xsl:if>
@@ -1304,14 +1305,14 @@ article  toc,title,figure,table,example,equation
 <xsl:template name="manifest.cover">
   <xsl:variable name="info" select="./*[contains(local-name(.), 'info')][1]"/>
   <xsl:variable name="cover.image" 
-                select="$info//mediaobject[@role='cover' or ancestor::cover]"/>
+                select="$info//d:mediaobject[@role='cover' or ancestor::d:cover]"/>
 
   <xsl:if test="$cover.image">
 
     <!-- generate the manifest link to that page -->
-    <xsl:variable name="olist" select="$cover.image/imageobject|$cover.image/imageobjectco
-                       |$cover.image/videoobject|$cover.image/audioobject
-                       |$cover.image/textobject"/>
+    <xsl:variable name="olist" select="$cover.image/d:imageobject|$cover.image/d:imageobjectco
+                       |$cover.image/d:videoobject|$cover.image/d:audioobject
+                       |$cover.image/d:textobject"/>
   
     <xsl:variable name="object.index">
       <xsl:call-template name="select.mediaobject.index">
@@ -1432,7 +1433,7 @@ article  toc,title,figure,table,example,equation
 
 <xsl:template match="text()" mode="package.manifest"/>
 
-<xsl:template match="mediaobject|mediaobjectco|inlinemediaobject" priority="1"
+<xsl:template match="d:mediaobject|d:mediaobjectco|d:inlinemediaobject" priority="1"
               mode="package.manifest">
   <!-- These are handled out of line so a unique list is created
        to remove duplicate references -->
@@ -1502,24 +1503,24 @@ article  toc,title,figure,table,example,equation
   <xsl:choose>
     <xsl:when test="$next.chunk">
       <xsl:variable name="this.imagedata"
-                    select="$this.chunk//mediaobject"/>
+                    select="$this.chunk//d:mediaobject"/>
       <xsl:variable name="before.next"
-                    select="$next.chunk/preceding::mediaobject"/>
+                    select="$next.chunk/preceding::d:mediaobject"/>
       
       <!-- select for an SVG imagedata in the intersection of them -->
       <xsl:variable name="mediaobject.set"
           select="$this.imagedata[count(.|$before.next) = count($before.next)]"/>
       <xsl:variable name="svg.imagedata">
         <xsl:for-each select="$mediaobject.set">
-          <xsl:variable name="olist" select="imageobject[not(@role = 'poster')] |
-                                             imageobjectco"/>
+          <xsl:variable name="olist" select="d:imageobject[not(@role = 'poster')] |
+                                             d:imageobjectco"/>
           <xsl:variable name="mediaobject.index">
             <xsl:call-template name="select.mediaobject.index">
               <xsl:with-param name="olist" select="$olist"/>
             </xsl:call-template>
           </xsl:variable>
           <xsl:variable name="object" select="$olist[position() = $mediaobject.index]"/>
-          <xsl:if test="$object/imagedata[contains(
+          <xsl:if test="$object/d:imagedata[contains(
                       substring(@fileref, string-length(@fileref)-3,4), '.svg')]">
             <xsl:text>svg</xsl:text>
           </xsl:if>
@@ -1532,18 +1533,18 @@ article  toc,title,figure,table,example,equation
     </xsl:when>
     <xsl:otherwise>
       <xsl:variable name="mediaobject.set"
-                    select="$this.chunk//mediaobject"/>
+                    select="$this.chunk//d:mediaobject"/>
       <xsl:variable name="svg.imagedata">
         <xsl:for-each select="$mediaobject.set">
-          <xsl:variable name="olist" select="imageobject[not(@role = 'poster')] |
-                                             imageobjectco"/>
+          <xsl:variable name="olist" select="d:imageobject[not(@role = 'poster')] |
+                                             d:imageobjectco"/>
           <xsl:variable name="mediaobject.index">
             <xsl:call-template name="select.mediaobject.index">
               <xsl:with-param name="olist" select="$olist"/>
             </xsl:call-template>
           </xsl:variable>
           <xsl:variable name="object" select="$olist[position() = $mediaobject.index]"/>
-          <xsl:if test="$object/imagedata[contains(
+          <xsl:if test="$object/d:imagedata[contains(
                       substring(@fileref, string-length(@fileref)-3,4), '.svg')]">
             <xsl:text>svg</xsl:text>
           </xsl:if>
@@ -1658,22 +1659,22 @@ article  toc,title,figure,table,example,equation
 
 <xsl:template match="text()" mode="enumerate-images"/>
 
-<xsl:template match="graphic|inlinegraphic[@format!='linespecific']" 
+<xsl:template match="d:graphic|d:inlinegraphic[@format!='linespecific']"
               mode="enumerate-images">
 </xsl:template>
 
 <!-- cover image handled separates to give it an extra property attribute -->
-<xsl:template match="mediaobject[@role='cover' or ancestor::cover]"
+<xsl:template match="d:mediaobject[@role='cover' or ancestor::d:cover]"
               mode="enumerate-images"/>
 
-<xsl:template match="mediaobject|inlinemediaobject" mode="enumerate-images">
+<xsl:template match="d:mediaobject|d:inlinemediaobject" mode="enumerate-images">
 
   <xsl:variable name="olist" 
-                select="imageobject[not(@role = 'poster')] 
-                       |imageobjectco
-                       |videoobject
-                       |audioobject
-                       |textobject"/>
+                select="d:imageobject[not(@role = 'poster')]
+                       |d:imageobjectco
+                       |d:videoobject
+                       |d:audioobject
+                       |d:textobject"/>
  
   <xsl:variable name="object.index">
     <xsl:call-template name="select.mediaobject.index">
@@ -1687,15 +1688,15 @@ article  toc,title,figure,table,example,equation
   <xsl:apply-templates select="$object" mode="enumerate-images"/>
 
   <!-- also include a poster image if present -->
-  <xsl:apply-templates select="imageobject[@role = 'poster']" mode="enumerate-images"/>
+  <xsl:apply-templates select="d:imageobject[@role = 'poster']" mode="enumerate-images"/>
 
 </xsl:template>
 
-<xsl:template match="imageobject|videoobject|audioobject" mode="enumerate-images">
+<xsl:template match="d:imageobject|d:videoobject|d:audioobject" mode="enumerate-images">
   <xsl:param name="object" select="."/>
 
   <xsl:if test="$object">
-    <xsl:for-each select="$object/imagedata|$object/videodata|$object/audiodata">
+    <xsl:for-each select="$object/d:imagedata|$object/d:videodata|$object/d:audiodata">
       <xsl:variable name="output_filename">
         <xsl:call-template name="mediaobject.filename">
           <xsl:with-param name="object" select="."/>
@@ -1738,7 +1739,7 @@ article  toc,title,figure,table,example,equation
 </xsl:template>
  
 <!-- Add in the generated images -->
-<xsl:template match="note|caution|warning|important|tip" mode="enumerate-images">
+<xsl:template match="d:note|d:caution|d:warning|d:important|d:tip" mode="enumerate-images">
   <xsl:if test="$admon.graphics != 0">
     <xsl:variable name="image.filename">
       <xsl:call-template name="admon.graphic"/>
@@ -1764,7 +1765,7 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="callout" mode="enumerate-images">
+<xsl:template match="d:callout" mode="enumerate-images">
   <!-- process arearefs to get name of callout bug image files -->
   <xsl:if test="$callout.graphics != 0">
     <xsl:variable name="arearefs">
@@ -1799,7 +1800,7 @@ article  toc,title,figure,table,example,equation
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="co" mode="enumerate-images">
+<xsl:template match="d:co" mode="enumerate-images">
   <!-- process co to get name of callout bug image file -->
   <xsl:if test="$callout.graphics != 0">
     <xsl:variable name="result">
@@ -1863,7 +1864,7 @@ article  toc,title,figure,table,example,equation
           type="cover" pointing to it AND there is a logical cover specified in a
           <meta name="cover"> tag, THEN, the HTML cover is discarded. -->
         <xsl:element name="head" namespace="{$ncx.namespace}">
-          <xsl:if test="/*/*[cover or contains(name(.), 'info')]//mediaobject[@role='cover' or ancestor::cover]"> 
+          <xsl:if test="/*/*[d:cover or contains(name(.), 'info')]//d:mediaobject[@role='cover' or ancestor::d:cover]">
             <xsl:element name="meta" namespace="{$ncx.namespace}">
               <xsl:attribute name="name">cover</xsl:attribute>
               <xsl:attribute name="content">
@@ -1943,27 +1944,27 @@ article  toc,title,figure,table,example,equation
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="book|
-                     article|
-                     topic|
-                     part|
-                     reference|
-                     preface|
-                     chapter|
-                     bibliography|
-                     appendix|
-                     glossary|
-                     section|
-                     sect1|
-                     sect2|
-                     sect3|
-                     sect4|
-                     sect5|
-                     refentry|
-                     colophon|
-                     bibliodiv[title]|
-                     setindex|
-                     index"
+<xsl:template match="d:book|
+                     d:article|
+                     d:topic|
+                     d:part|
+                     d:reference|
+                     d:preface|
+                     d:chapter|
+                     d:bibliography|
+                     d:appendix|
+                     d:glossary|
+                     d:section|
+                     d:sect1|
+                     d:sect2|
+                     d:sect3|
+                     d:sect4|
+                     d:sect5|
+                     d:refentry|
+                     d:colophon|
+                     d:bibliodiv[d:title]|
+                     d:setindex|
+                     d:index"
               mode="ncx">
   <xsl:variable name="depth" select="count(ancestor::*)"/>
   <xsl:variable name="title">
@@ -1991,26 +1992,26 @@ article  toc,title,figure,table,example,equation
   </xsl:variable>
   <xsl:variable name="order">
     <xsl:value-of select="$depth +
-                                count(preceding::part|
-                                preceding::reference|
-                                preceding::book[parent::set]|
-                                preceding::preface|
-                                preceding::chapter|
-                                preceding::bibliography|
-                                preceding::appendix|
-                                preceding::article|
-                                preceding::topic|
-                                preceding::glossary|
-                                preceding::section[not(parent::partintro)]|
-                                preceding::sect1[not(parent::partintro)]|
-                                preceding::sect2[not(ancestor::partintro)]|
-                                preceding::sect3[not(ancestor::partintro)]|
-                                preceding::sect4[not(ancestor::partintro)]|
-                                preceding::sect5[not(ancestor::partintro)]|
-                                preceding::refentry|
-                                preceding::colophon|
-                                preceding::bibliodiv[title]|
-                                preceding::index)"/>
+                                count(preceding::d:part|
+                                preceding::d:reference|
+                                preceding::d:book[parent::d:set]|
+                                preceding::d:preface|
+                                preceding::d:chapter|
+                                preceding::d:bibliography|
+                                preceding::d:appendix|
+                                preceding::d:article|
+                                preceding::d:topic|
+                                preceding::d:glossary|
+                                preceding::d:section[not(parent::d:partintro)]|
+                                preceding::d:sect1[not(parent::d:partintro)]|
+                                preceding::d:sect2[not(ancestor::d:partintro)]|
+                                preceding::d:sect3[not(ancestor::d:partintro)]|
+                                preceding::d:sect4[not(ancestor::d:partintro)]|
+                                preceding::d:sect5[not(ancestor::d:partintro)]|
+                                preceding::d:refentry|
+                                preceding::d:colophon|
+                                preceding::d:bibliodiv[d:title]|
+                                preceding::d:index)"/>
   </xsl:variable>
 
   <xsl:element name="navPoint" namespace="{$ncx.namespace}">
@@ -2020,7 +2021,7 @@ article  toc,title,figure,table,example,equation
 
     <xsl:attribute name="playOrder">
       <xsl:choose>
-        <xsl:when test="/*[self::set]">
+        <xsl:when test="/*[self::d:set]">
           <xsl:value-of select="$order"/>
         </xsl:when>
         <xsl:when test="$root.is.a.chunk != '0'">
@@ -2042,7 +2043,7 @@ article  toc,title,figure,table,example,equation
     <xsl:if test="$depth != 0">
       <!-- Don't recurse on root element, but treat it as a single point so
       the progress bar shows all top level children -->
-      <xsl:apply-templates select="book[parent::set]|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv[title]|setindex|index" mode="ncx"/>
+      <xsl:apply-templates select="d:book[parent::d:set]|d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv[d:title]|d:setindex|d:index" mode="ncx"/>
     </xsl:if>
   </xsl:element>
 
@@ -2092,7 +2093,7 @@ article  toc,title,figure,table,example,equation
 <xsl:template name="spine.cover">
   <xsl:variable name="info" select="./*[contains(local-name(.), 'info')][1]"/>
   <xsl:variable name="cover.image" 
-                select="$info//mediaobject[@role='cover' or ancestor::cover]"/>
+                select="$info//d:mediaobject[@role='cover' or ancestor::d:cover]"/>
 
   <xsl:if test="$cover.image">
     <!-- generate the spine reference to that cover html file -->
@@ -2125,7 +2126,7 @@ article  toc,title,figure,table,example,equation
         <xsl:value-of select="concat($epub.package.id.prefix, generate-id(.))"/>
       </xsl:attribute>
     </xsl:element>
-    <xsl:apply-templates select="*|.//refentry" mode="package.spine"/>
+    <xsl:apply-templates select="*|.//d:refentry" mode="package.spine"/>
   </xsl:if>
 </xsl:template>
 
@@ -2177,7 +2178,7 @@ article  toc,title,figure,table,example,equation
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="mediaobject[@role='cover' or ancestor::cover]">
+<xsl:template match="d:mediaobject[@role='cover' or ancestor::d:cover]">
   <xsl:call-template name="write.chunk">
     <xsl:with-param name="filename">
       <xsl:value-of select="$epub.cover.pathname" />
@@ -2202,18 +2203,18 @@ article  toc,title,figure,table,example,equation
               <xsl:value-of select="$epub.cover.image.id"/>
             </xsl:attribute>
             <xsl:choose>
-              <xsl:when test="imageobject[@role='front-large']">
-                <xsl:apply-templates select="imageobject[@role='front-large']"/>
+              <xsl:when test="d:imageobject[@role='front-large']">
+                <xsl:apply-templates select="d:imageobject[@role='front-large']"/>
               </xsl:when>
               <xsl:otherwise>
-                <xsl:apply-templates select="imageobject[1]"/>
+                <xsl:apply-templates select="d:imageobject[1]"/>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:element>
           <!-- If this is defined as an explicit cover page, then process
           any remaining text -->
-          <xsl:if test="ancestor::cover">
-            <xsl:apply-templates select="ancestor::cover/para"/>
+          <xsl:if test="ancestor::d:cover">
+            <xsl:apply-templates select="ancestor::d:cover/d:para"/>
           </xsl:if>
         </xsl:element>
       </xsl:element>
@@ -2227,7 +2228,7 @@ article  toc,title,figure,table,example,equation
   <xsl:param name="toc.title.p" select="true()"/>
   <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
 
-  <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
+  <xsl:variable name="nodes.plus" select="$nodes | d:qandaset"/>
 
   <xsl:variable name="toc.title">
     <xsl:if test="$toc.title.p">
@@ -2258,7 +2259,7 @@ article  toc,title,figure,table,example,equation
         <xsl:call-template name="object.id"/>
       </xsl:variable>
       <xsl:variable name="toc" select="document($manual.toc, .)"/>
-      <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/>
+      <xsl:variable name="tocentry" select="$toc//d:tocentry[@linkend=$id]"/>
       <xsl:if test="$tocentry and $tocentry/*">
         <div class="toc">
           <xsl:copy-of select="$toc.title"/>
@@ -2311,7 +2312,7 @@ article  toc,title,figure,table,example,equation
 <xsl:template name="list.of.titles">
   <xsl:param name="toc-context" select="."/>
   <xsl:param name="titles" select="'table'"/>
-  <xsl:param name="nodes" select=".//table"/>
+  <xsl:param name="nodes" select=".//d:table"/>
 
   <xsl:variable name="epub.type">
     <xsl:choose>
@@ -2357,12 +2358,12 @@ article  toc,title,figure,table,example,equation
   <xsl:param name="toc-context" select="."/>
   <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
 
-  <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
+  <xsl:variable name="nodes.plus" select="$nodes | d:qandaset"/>
 
   <xsl:variable name="depth">
     <xsl:choose>
       <xsl:when test="local-name(.) = 'section'">
-        <xsl:value-of select="count(ancestor::section) + 1"/>
+        <xsl:value-of select="count(ancestor::d:section) + 1"/>
       </xsl:when>
       <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
       <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
@@ -2376,7 +2377,7 @@ article  toc,title,figure,table,example,equation
         <!-- sigh... -->
         <xsl:choose>
           <xsl:when test="local-name(..) = 'section'">
-            <xsl:value-of select="count(ancestor::section)"/>
+            <xsl:value-of select="count(ancestor::d:section)"/>
           </xsl:when>
           <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
           <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
@@ -2497,7 +2498,7 @@ article  toc,title,figure,table,example,equation
 </xsl:template>
 
 <!-- Make sure all text is inside the <a> element for epub3 -->
-<xsl:template match="figure|table|example|equation|procedure" mode="toc">
+<xsl:template match="d:figure|d:table|d:example|d:equation|d:procedure" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:element name="{$toc.listitem.type}">
@@ -2520,14 +2521,14 @@ article  toc,title,figure,table,example,equation
 </xsl:template>
 
 <!-- Remove spans from refentry TOC lines for epub3check -->
-<xsl:template match="refentry" mode="toc">
+<xsl:template match="d:refentry" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
-  <xsl:variable name="refmeta" select=".//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select=".//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
+  <xsl:variable name="refmeta" select=".//d:refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//d:refentrytitle"/>
+  <xsl:variable name="refnamediv" select=".//d:refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//d:refname"/>
+  <xsl:variable name="refdesc" select="$refnamediv//d:refdescriptor"/>
   <xsl:variable name="title">
     <xsl:choose>
       <xsl:when test="$refentrytitle">
@@ -2556,7 +2557,7 @@ article  toc,title,figure,table,example,equation
         <!-- * apply-templates on refpurpose here, instead of value-of  -->
         <!-- Set allow-anchors=0 to avoid indexterms and other links -->
         <xsl:text> - </xsl:text>
-        <xsl:apply-templates select="refnamediv/refpurpose" mode="no.anchor.mode"/>
+        <xsl:apply-templates select="d:refnamediv/d:refpurpose" mode="no.anchor.mode"/>
       </xsl:if>
     </a>
   </xsl:element>
index 38ff4803dfaec9e3ec4f72a95c12e18eb87919d7..4e6cc75c320fff4f6fd271ea23acf0d6c0bbb1f6 100644 (file)
@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="ASCII"?>
 <!--This file was created automatically by html2xhtml-->
 <!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns="http://www.w3.org/1999/xhtml"
+               version="1.0"
+               exclude-result-prefixes="exsl d">
 
 <!-- ********************************************************************
 
index 8311969b2d3fcd0f830b3eeaa96d939e38e9fc63..772c8b0a7af1bd5de0bc91281eed60650fa93de9 100644 (file)
@@ -3,7 +3,19 @@
 <!--from the HTML stylesheets.-->
 <!--This file was created automatically by xsl2profile-->
 <!--from the DocBook XSL stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="db ng exsl exslt exslt" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:ng="http://docbook.org/docbook-ng"
+               xmlns:db="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns:exslt="http://exslt.org/common"
+               xmlns="http://www.w3.org/1999/xhtml"
+               exslt:dummy="dummy"
+               ng:dummy="dummy"
+               db:dummy="dummy"
+               extension-element-prefixes="exslt"
+               exclude-result-prefixes="db ng exsl exslt exslt d"
+               version="1.0">
 
 <xsl:output method="xml" encoding="UTF-8" indent="no"/>
 
@@ -67,7 +79,7 @@
 <xsl:include href="../xhtml/chunker.xsl"/>
 <xsl:include href="../xhtml/html-rtf.xsl"/>
 <xsl:include href="../xhtml/annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
+<xsl:include href="../common/addns.xsl"/>
 
 <xsl:param name="stylesheet.result.type" select="'xhtml'"/>
 <xsl:param name="htmlhelp.output" select="0"/>
   <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
 
   <xsl:if test="$generate.meta.abstract != 0">
-    <xsl:variable name="info" select="(articleinfo                                       |bookinfo                                       |prefaceinfo                                       |chapterinfo                                       |appendixinfo                                       |sectioninfo                                       |sect1info                                       |sect2info                                       |sect3info                                       |sect4info                                       |sect5info                                       |referenceinfo                                       |refentryinfo                                       |partinfo                                       |info                                       |docinfo)[1]"/>
-    <xsl:if test="$info and $info/abstract">
+    <xsl:variable name="info" select="(d:articleinfo                                       |d:bookinfo                                       |d:prefaceinfo                                       |d:chapterinfo                                       |d:appendixinfo                                       |d:sectioninfo                                       |d:sect1info                                       |d:sect2info                                       |d:sect3info                                       |d:sect4info                                       |d:sect5info                                       |d:referenceinfo                                       |d:refentryinfo                                       |d:partinfo                                       |d:info                                       |d:docinfo)[1]"/>
+    <xsl:if test="$info and $info/d:abstract">
       <meta name="description">
         <xsl:attribute name="content">
-          <xsl:for-each select="$info/abstract[1]/*">
+          <xsl:for-each select="$info/d:abstract[1]/*">
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:if test="position() &lt; last()">
               <xsl:text> </xsl:text>
@@ -199,30 +211,30 @@ body { background-image: url('</xsl:text>
 <!-- ============================================================ -->
 
 <xsl:template match="*" mode="head.keywords.content">
-  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:chapterinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:appendixinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:prefaceinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:bookinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:setinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:articleinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:artheader/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect1info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect2info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect3info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect4info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect5info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sectioninfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect1info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect2info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect3info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:bibliographyinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:glossaryinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:indexinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refentryinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:partinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:referenceinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:docinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:info/d:keywordset" mode="html.header"/>
 
   <xsl:if test="$inherit.keywords != 0                 and parent::*">
     <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
@@ -238,12 +250,12 @@ body { background-image: url('</xsl:text>
               in this chunk should be referenced. I don't think it
               does any harm to reference them all, but it adds
               unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
+  <xsl:if test="$annotation.support != 0 and //d:annotation">
     <xsl:call-template name="add.annotation.links"/>
     <script type="text/javascript">
       <xsl:text>
 // Create PopupWindow objects</xsl:text>
-      <xsl:for-each select="//annotation">
+      <xsl:for-each select="//d:annotation">
         <xsl:text>
 var popup_</xsl:text>
         <xsl:value-of select="generate-id(.)"/>
@@ -300,7 +312,7 @@ var popup_</xsl:text>
   <xsl:param name="node" select="."/>
 </xsl:template>
 
-<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. add : added namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="addNS"/></xslo:variable><xslo:message>Note: namesp. add : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
   <!-- * Get a title for current doc so that we let the user -->
   <!-- * know what document we are processing at this point. -->
   <xsl:variable name="doc.title">
index cccc517e822e1032f207adc88b7cce610fd57f83..f443a9af2297b43e9405cfbdb025e846b4ee4dbc 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -11,7 +13,7 @@
 
      ******************************************************************** -->
 
-<xsl:template match="note|important|warning|caution|tip">
+<xsl:template match="d:note|d:important|d:warning|d:caution|d:tip">
   <xsl:choose>
     <xsl:when test="$admon.graphics != 0">
       <xsl:call-template name="graphical.admonition"/>
@@ -80,7 +82,7 @@
             </fo:block>
           </fo:list-item-label>
           <fo:list-item-body start-indent="body-start()">
-            <xsl:if test="$admon.textlabel != 0 or title or info/title">
+            <xsl:if test="$admon.textlabel != 0 or d:title or d:info/d:title">
               <fo:block xsl:use-attribute-sets="admonition.title.properties">
                 <xsl:apply-templates select="." mode="object.title.markup">
                  <xsl:with-param name="allow-anchors" select="1"/>
 
   <fo:block id="{$id}"
             xsl:use-attribute-sets="nongraphical.admonition.properties">
-    <xsl:if test="$admon.textlabel != 0 or title or info/title">
+    <xsl:if test="$admon.textlabel != 0 or d:title or d:info/d:title">
       <fo:block keep-with-next.within-column='always'
                 xsl:use-attribute-sets="admonition.title.properties">
          <xsl:apply-templates select="." mode="object.title.markup">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="note/title"></xsl:template>
-<xsl:template match="important/title"></xsl:template>
-<xsl:template match="warning/title"></xsl:template>
-<xsl:template match="caution/title"></xsl:template>
-<xsl:template match="tip/title"></xsl:template>
+<xsl:template match="d:note/d:title"></xsl:template>
+<xsl:template match="d:important/d:title"></xsl:template>
+<xsl:template match="d:warning/d:title"></xsl:template>
+<xsl:template match="d:caution/d:title"></xsl:template>
+<xsl:template match="d:tip/d:title"></xsl:template>
 
 </xsl:stylesheet>
index 1843a1f56117f18248b34cbfd711b484c64b0785..818af31c2898090528e14c492e0d3ad3cade329f 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -11,6 +13,6 @@
 
      ******************************************************************** -->
 
-<xsl:template match="annotation"/>
+<xsl:template match="d:annotation"/>
 
 </xsl:stylesheet>
index f54441033d95c404703b962e7392ea21245261c1..728bbcff23184ccb3533164455904ed77cf50161 100644 (file)
@@ -9,9 +9,10 @@
 
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:k="java:com.isogen.saxoni18n.Saxoni18nService"
-                exclude-result-prefixes="k"
+                exclude-result-prefixes="k d"
                 version="1.0">
 
 <!-- ********************************************************************
@@ -80,7 +81,7 @@
   </xsl:variable>
 
   <xsl:variable name="terms"
-                select="//indexterm[count(.|key('k-group',
+                select="//d:indexterm[count(.|key('k-group',
                    k:getIndexGroupKey(&lang;, &primary;))
                    [&scope;][1]) = 1
                    and not(@class = 'endofrange')]"/>
 
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-kimber">
+<xsl:template match="d:indexterm" mode="index-div-kimber">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
index b85d9e24c9898eca062e21fbb9040db4cc285da4..e87f2291e81ca555d87c7d332ae0aac1e782fa3f 100644 (file)
@@ -4,7 +4,8 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:rx="http://www.renderx.com/XSL/Extensions"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 xmlns:i="urn:cz-kosek:functions:index"
@@ -12,7 +13,7 @@
                 xmlns:func="http://exslt.org/functions"
                 xmlns:exslt="http://exslt.org/common"
                 extension-element-prefixes="func exslt"
-                exclude-result-prefixes="func exslt i l"
+                exclude-result-prefixes="func exslt i l d"
                 version="1.0">
 
 <!-- ********************************************************************
@@ -76,7 +77,7 @@
   </xsl:variable>
 
   <xsl:variable name="terms"
-                select="//indexterm[count(.|key('group-code',
+                select="//d:indexterm[count(.|key('group-code',
                                           i:group-index(&primary;))
                                           [&scope;][1]) = 1
                                 and not(@class = 'endofrange')]"/>
@@ -90,7 +91,7 @@
   </fo:block>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-kosek">
+<xsl:template match="d:indexterm" mode="index-div-kosek">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
index bdcfc9278126d9cb6b4d6aa24ad0dbfa6a2ebaf4..d7c8dff3eb6d75d22a10d30fa842936c0bf0600a 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <!-- ********************************************************************
 
index 9cb027e3d4ef78e480120e26babe44dd46221fa9..909e112f1a19f969970bf29ec22c1a2deaa9c4c4 100644 (file)
@@ -4,13 +4,14 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:rx="http://www.renderx.com/XSL/Extensions"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 xmlns:exslt="http://exslt.org/common"
                 extension-element-prefixes="exslt"
-                exclude-result-prefixes="exslt"
+                exclude-result-prefixes="exslt d"
                 version="1.0">
 
 <!-- ********************************************************************
 
 <!-- These keys used primary in all methods -->
 <xsl:key name="letter"
-         match="indexterm"
+         match="d:indexterm"
          use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
 
 <xsl:key name="primary"
-         match="indexterm"
+         match="d:indexterm"
          use="&primary;"/>
 
 <xsl:key name="primaryonly"
-         match="indexterm"
-         use="normalize-space(primary)"/>
+         match="d:indexterm"
+         use="normalize-space(d:primary)"/>
 
 <xsl:key name="secondary"
-         match="indexterm"
+         match="d:indexterm"
          use="concat(&primary;, &sep;, &secondary;)"/>
 
 <xsl:key name="tertiary"
-         match="indexterm"
+         match="d:indexterm"
          use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
 
 <xsl:key name="endofrange"
-         match="indexterm[@class='endofrange']"
+         match="d:indexterm[@class='endofrange']"
          use="@startref"/>
 
 <xsl:key name="see-also"
-         match="indexterm[seealso]"
+         match="d:indexterm[d:seealso]"
          use="concat(&primary;, &sep;, 
                      &secondary;, &sep;, 
-                     &tertiary;, &sep;, seealso)"/>
+                     &tertiary;, &sep;, d:seealso)"/>
 
 <xsl:key name="see"
-         match="indexterm[see]"
+         match="d:indexterm[d:see]"
          use="concat(&primary;, &sep;, 
                      &secondary;, &sep;, 
-                     &tertiary;, &sep;, see)"/>
+                     &tertiary;, &sep;, d:see)"/>
 
 
 <xsl:template name="generate-index">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+  <xsl:param name="scope" select="(ancestor::d:book|/)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="$index.method = 'kosek'">
   </xsl:variable>
 
   <xsl:variable name="terms"
-                select="//indexterm
+                select="//d:indexterm
                         [count(.|key('letter',
                           translate(substring(&primary;, 1, 1),
                              &lowercase;,
 
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-basic">
+<xsl:template match="d:indexterm" mode="index-div-basic">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-symbol-div">
+<xsl:template match="d:indexterm" mode="index-symbol-div">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-primary">
+<xsl:template match="d:indexterm" mode="index-primary">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
       <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
     </xsl:if>
 
-    <xsl:for-each select="$refs/primary">
+    <xsl:for-each select="$refs/d:primary">
       <xsl:if test="@id or @xml:id">
         <fo:inline id="{(@id|@xml:id)[1]}"/>
       </xsl:if>
     </xsl:for-each>
 
-    <xsl:value-of select="primary"/>
+    <xsl:value-of select="d:primary"/>
 
     <xsl:choose>
       <xsl:when test="$xep.extensions != 0">
-        <xsl:if test="$refs[not(see) and not(secondary)]">
+        <xsl:if test="$refs[not(d:see) and not(d:secondary)]">
           <xsl:copy-of select="$term.separator"/>
           <xsl:variable name="primary" select="&primary;"/>
           <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/>
           <rx:page-index list-separator="{$number.separator}"
                          range-separator="{$range.separator}">
-            <xsl:if test="$refs[@significance='preferred'][not(see) and not(secondary)]">
+            <xsl:if test="$refs[@significance='preferred'][not(d:see) and not(d:secondary)]">
               <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties"
                 ref-key="{$primary.significant}"/>
             </xsl:if>
-            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(secondary)]">
+            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(d:see) and not(d:secondary)]">
               <rx:index-item xsl:use-attribute-sets="xep.index.item.properties"
                 ref-key="{$primary}"/>
             </xsl:if>
       </xsl:when>
       <xsl:otherwise>
         <xsl:variable name="page-number-citations">
-          <xsl:for-each select="$refs[not(see) 
-                                and not(secondary)]">
+          <xsl:for-each select="$refs[not(d:see)
+                                and not(d:secondary)]">
             <xsl:apply-templates select="." mode="reference">
               <xsl:with-param name="scope" select="$scope"/>
               <xsl:with-param name="role" select="$role"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="$refs[not(secondary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+    <xsl:if test="$refs[not(d:secondary)]/*[self::d:see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, d:see))[&scope;][1])]"
                            mode="index-see">
          <xsl:with-param name="scope" select="$scope"/>
          <xsl:with-param name="role" select="$role"/>
          <xsl:with-param name="type" select="$type"/>
-         <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+         <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </xsl:if>
 
   </fo:block>
 
-  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
+  <xsl:if test="$refs/d:secondary or $refs[not(d:secondary)]/*[self::d:seealso]">
     <fo:block start-indent="1pc">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, d:seealso))[&scope;][1])]"
                            mode="index-seealso">
          <xsl:with-param name="scope" select="$scope"/>
          <xsl:with-param name="role" select="$role"/>
          <xsl:with-param name="type" select="$type"/>
-         <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+         <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
-      <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
+      <xsl:apply-templates select="$refs[d:secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
                            mode="index-secondary">
        <xsl:with-param name="scope" select="$scope"/>
        <xsl:with-param name="role" select="$role"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-secondary">
+<xsl:template match="d:indexterm" mode="index-secondary">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
       <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
     </xsl:if>
 
-    <xsl:for-each select="$refs/secondary">
+    <xsl:for-each select="$refs/d:secondary">
       <xsl:if test="@id or @xml:id">
         <fo:inline id="{(@id|@xml:id)[1]}"/>
       </xsl:if>
     </xsl:for-each>
 
-    <xsl:value-of select="secondary"/>
+    <xsl:value-of select="d:secondary"/>
 
     <xsl:choose>
       <xsl:when test="$xep.extensions != 0">
-        <xsl:if test="$refs[not(see) and not(tertiary)]">
+        <xsl:if test="$refs[not(d:see) and not(d:tertiary)]">
           <xsl:copy-of select="$term.separator"/>
           <xsl:variable name="primary" select="&primary;"/>
           <xsl:variable name="secondary" select="&secondary;"/>
           <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/>
           <rx:page-index list-separator="{$number.separator}"
                          range-separator="{$range.separator}">
-            <xsl:if test="$refs[@significance='preferred'][not(see) and not(tertiary)]">
+            <xsl:if test="$refs[@significance='preferred'][not(d:see) and not(d:tertiary)]">
               <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties">
                 <xsl:attribute name="ref-key">
                   <xsl:value-of select="$primary.significant"/>
                 </xsl:attribute>
               </rx:index-item>
             </xsl:if>
-            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see) and not(tertiary)]">
+            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(d:see) and not(d:tertiary)]">
               <rx:index-item xsl:use-attribute-sets="xep.index.item.properties">
                 <xsl:attribute name="ref-key">
                   <xsl:value-of select="$primary"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:variable name="page-number-citations">
-          <xsl:for-each select="$refs[not(see) 
-                                and not(tertiary)]">
+          <xsl:for-each select="$refs[not(d:see)
+                                and not(d:tertiary)]">
             <xsl:apply-templates select="." mode="reference">
               <xsl:with-param name="scope" select="$scope"/>
               <xsl:with-param name="role" select="$role"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="$refs[not(tertiary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+    <xsl:if test="$refs[not(d:tertiary)]/*[self::d:see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, d:see))[&scope;][1])]"
                            mode="index-see">
         <xsl:with-param name="scope" select="$scope"/>
         <xsl:with-param name="role" select="$role"/>
         <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+        <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </xsl:if>
 
   </fo:block>
 
-  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
+  <xsl:if test="$refs/d:tertiary or $refs[not(d:tertiary)]/*[self::d:seealso]">
     <fo:block start-indent="2pc">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, d:seealso))[&scope;][1])]"
                            mode="index-seealso">
           <xsl:with-param name="scope" select="$scope"/>
           <xsl:with-param name="role" select="$role"/>
           <xsl:with-param name="type" select="$type"/>
-          <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+          <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
-      <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
+      <xsl:apply-templates select="$refs[d:tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]"
                            mode="index-tertiary">
           <xsl:with-param name="scope" select="$scope"/>
           <xsl:with-param name="role" select="$role"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-tertiary">
+<xsl:template match="d:indexterm" mode="index-tertiary">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
       <xsl:attribute name="axf:suppress-duplicate-page-number">true</xsl:attribute>
     </xsl:if>
 
-    <xsl:for-each select="$refs/tertiary">
+    <xsl:for-each select="$refs/d:tertiary">
       <xsl:if test="@id or @xml:id">
         <fo:inline id="{(@id|@xml:id)[1]}"/>
       </xsl:if>
     </xsl:for-each>
 
-    <xsl:value-of select="tertiary"/>
+    <xsl:value-of select="d:tertiary"/>
 
     <xsl:choose>
       <xsl:when test="$xep.extensions != 0">
-        <xsl:if test="$refs[not(see)]">
+        <xsl:if test="$refs[not(d:see)]">
           <xsl:copy-of select="$term.separator"/>
           <xsl:variable name="primary" select="&primary;"/>
           <xsl:variable name="secondary" select="&secondary;"/>
           <xsl:variable name="primary.significant" select="concat(&primary;, $significant.flag)"/>
           <rx:page-index list-separator="{$number.separator}"
                          range-separator="{$range.separator}">
-            <xsl:if test="$refs[@significance='preferred'][not(see)]">
+            <xsl:if test="$refs[@significance='preferred'][not(d:see)]">
               <rx:index-item xsl:use-attribute-sets="index.preferred.page.properties xep.index.item.properties">
                 <xsl:attribute name="ref-key">
                   <xsl:value-of select="$primary.significant"/>
                 </xsl:attribute>
               </rx:index-item>
             </xsl:if>
-            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(see)]">
+            <xsl:if test="$refs[not(@significance) or @significance!='preferred'][not(d:see)]">
               <rx:index-item xsl:use-attribute-sets="xep.index.item.properties">
                 <xsl:attribute name="ref-key">
                   <xsl:value-of select="$primary"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:variable name="page-number-citations">
-          <xsl:for-each select="$refs[not(see)]">
+          <xsl:for-each select="$refs[not(d:see)]">
             <xsl:apply-templates select="." mode="reference">
               <xsl:with-param name="scope" select="$scope"/>
               <xsl:with-param name="role" select="$role"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="$refs/see">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+    <xsl:if test="$refs/d:see">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:see))[&scope;][1])]"
                            mode="index-see">
         <xsl:with-param name="scope" select="$scope"/>
         <xsl:with-param name="role" select="$role"/>
         <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+        <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </xsl:if>
 
   </fo:block>
 
-  <xsl:if test="$refs/seealso">
+  <xsl:if test="$refs/d:seealso">
     <fo:block>
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:seealso))[&scope;][1])]"
                            mode="index-seealso">
         <xsl:with-param name="scope" select="$scope"/>
         <xsl:with-param name="role" select="$role"/>
         <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+        <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </fo:block>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="reference">
+<xsl:template match="d:indexterm" mode="reference">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
 
-  <xsl:variable name="target" select="(ancestor::appendix|ancestor::article|ancestor::bibliography|ancestor::book|
-                                       ancestor::chapter|ancestor::glossary|ancestor::part|ancestor::preface|
-                                       ancestor::refentry|ancestor::reference|ancestor::refsect1|ancestor::refsect2|
-                                       ancestor::refsect3|ancestor::refsection|ancestor::refsynopsisdiv|
-                                       ancestor::sect1|ancestor::sect2|ancestor::sect3|ancestor::sect4|ancestor::sect5|
-                                       ancestor::section|ancestor::setindex|ancestor::set|ancestor::sidebar|ancestor::mediaobject)[&scope;]"/>
+  <xsl:variable name="target" select="(ancestor::d:appendix|ancestor::d:article|ancestor::d:bibliography|ancestor::d:book|
+                                       ancestor::d:chapter|ancestor::d:glossary|ancestor::d:part|ancestor::d:preface|
+                                       ancestor::d:refentry|ancestor::d:reference|ancestor::d:refsect1|ancestor::d:refsect2|
+                                       ancestor::d:refsect3|ancestor::d:refsection|ancestor::d:refsynopsisdiv|
+                                       ancestor::d:sect1|ancestor::d:sect2|ancestor::d:sect3|ancestor::d:sect4|ancestor::d:sect5|
+                                       ancestor::d:section|ancestor::d:setindex|ancestor::d:set|ancestor::d:sidebar|ancestor::d:mediaobject)[&scope;]"/>
   
   <xsl:variable name="id">
     <xsl:call-template name="object.id">
   </fo:basic-link>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-see">
+<xsl:template match="d:indexterm" mode="index-see">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
 
-  <xsl:variable name="see" select="normalize-space(see)"/>
+  <xsl:variable name="see" select="normalize-space(d:see)"/>
 
   <!-- can only link to primary, which should appear before comma
   in see "primary, secondary" entry -->
     <xsl:text> </xsl:text>
     <xsl:choose>
       <!-- manual links have precedence -->
-      <xsl:when test="see/@linkend or see/@xlink:href">
+      <xsl:when test="d:see/@linkend or d:see/@xlink:href">
         <xsl:call-template name="simple.xlink">
-          <xsl:with-param name="node" select="see"/>
+          <xsl:with-param name="node" select="d:see"/>
           <xsl:with-param name="content" select="$see"/>
         </xsl:call-template>
       </xsl:when>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-seealso">
+<xsl:template match="d:indexterm" mode="index-seealso">
    <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
 
-  <xsl:for-each select="seealso">
+  <xsl:for-each select="d:seealso">
     <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
 
     <xsl:variable name="seealso" select="normalize-space(.)"/>
 <!-- ====================================================================== -->
 
 <xsl:template name="generate-index-markup">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+  <xsl:param name="scope" select="(ancestor::d:book|/)[last()]"/>
   <xsl:param name="role" select="@role"/>
   <xsl:param name="type" select="@type"/>
 
-  <xsl:variable name="terms" select="$scope//indexterm[count(.|key('letter',
+  <xsl:variable name="terms" select="$scope//d:indexterm[count(.|key('letter',
                                      translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;))[&scope;][1]) = 1]"/>
   <xsl:variable name="alphabetical"
                 select="$terms[contains(concat(&lowercase;, &uppercase;),
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-markup">
+<xsl:template match="d:indexterm" mode="index-div-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:text>&lt;/indexdiv&gt;&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-symbol-div-markup">
+<xsl:template match="d:indexterm" mode="index-symbol-div-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-primary-markup">
+<xsl:template match="d:indexterm" mode="index-primary-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:variable name="key" select="&primary;"/>
   <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
-  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
+  <xsl:variable name="pages" select="$refs[not(d:see) and not(d:seealso)]"/>
 
   <xsl:text>&#10;&lt;indexentry&gt;&#10;</xsl:text>
   <xsl:text>&lt;primaryie&gt;</xsl:text>
   <xsl:text>&lt;phrase&gt;</xsl:text>
   <xsl:call-template name="escape-text">
-    <xsl:with-param name="text" select="string(primary)"/>
+    <xsl:with-param name="text" select="string(d:primary)"/>
   </xsl:call-template>
   <xsl:text>&lt;/phrase&gt;</xsl:text>
   <xsl:if test="$pages">,</xsl:if>
 
   <xsl:text>&lt;/primaryie&gt;&#10;</xsl:text>
 
-  <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::see or self::seealso]">
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+  <xsl:if test="$refs/d:secondary or $refs[not(d:secondary)]/*[self::d:see or self::d:seealso]">
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, d:see))[&scope;][1])]"
                          mode="index-see-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
       <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
     </xsl:apply-templates>
 
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, d:seealso))[&scope;][1])]"
                          mode="index-seealso-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
       <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+      <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
     </xsl:apply-templates>
 
-    <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" 
+    <xsl:apply-templates select="$refs[d:secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
                          mode="index-secondary-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
   <xsl:text>&lt;/indexentry&gt;&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-secondary-markup">
+<xsl:template match="d:indexterm" mode="index-secondary-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
   <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
-  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
+  <xsl:variable name="pages" select="$refs[not(d:see) and not(d:seealso)]"/>
 
   <xsl:text>&lt;secondaryie&gt;</xsl:text>
   <xsl:text>&lt;phrase&gt;</xsl:text>
   <xsl:call-template name="escape-text">
-    <xsl:with-param name="text" select="string(secondary)"/>
+    <xsl:with-param name="text" select="string(d:secondary)"/>
   </xsl:call-template>
   <xsl:text>&lt;/phrase&gt;</xsl:text>
   <xsl:if test="$pages">,</xsl:if>
 
   <xsl:text>&lt;/secondaryie&gt;&#10;</xsl:text>
 
-  <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::see or self::seealso]">
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+  <xsl:if test="$refs/d:tertiary or $refs[not(d:tertiary)]/*[self::d:see or self::d:seealso]">
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, d:see))[&scope;][1])]"
                          mode="index-see-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
       <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
     </xsl:apply-templates>
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, d:seealso))[&scope;][1])]"
                          mode="index-seealso-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
       <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+      <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
     </xsl:apply-templates>
-    <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
+    <xsl:apply-templates select="$refs[d:tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]"
                          mode="index-tertiary-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-tertiary-markup">
+<xsl:template match="d:indexterm" mode="index-tertiary-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
   <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
-  <xsl:variable name="pages" select="$refs[not(see) and not(seealso)]"/>
+  <xsl:variable name="pages" select="$refs[not(d:see) and not(d:seealso)]"/>
 
   <xsl:text>&lt;tertiaryie&gt;</xsl:text>
   <xsl:text>&lt;phrase&gt;</xsl:text>
   <xsl:call-template name="escape-text">
-    <xsl:with-param name="text" select="string(tertiary)"/>
+    <xsl:with-param name="text" select="string(d:tertiary)"/>
   </xsl:call-template>
   <xsl:text>&lt;/phrase&gt;</xsl:text>
   <xsl:if test="$pages">,</xsl:if>
 
   <xsl:text>&lt;/tertiaryie&gt;&#10;</xsl:text>
 
-  <xsl:variable name="see" select="$refs/see | $refs/seealso"/>
+  <xsl:variable name="see" select="$refs/d:see | $refs/d:seealso"/>
   <xsl:if test="$see">
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:see))[&scope;][1])]"
                          mode="index-see-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
       <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+      <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
     </xsl:apply-templates>
-    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+    <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:seealso))[&scope;][1])]"
                          mode="index-seealso-markup">
       <xsl:with-param name="scope" select="$scope"/>
       <xsl:with-param name="role" select="$role"/>
       <xsl:with-param name="type" select="$type"/>
-      <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+      <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
     </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="reference-markup">
+<xsl:template match="d:indexterm" mode="reference-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
       </xsl:variable>
 
       <xsl:text>&lt;phrase role="pageno"&gt;</xsl:text>
-      <xsl:if test="$target[1]/@id or target[1]/@xml:id">
+      <xsl:if test="$target[1]/@id or d:target[1]/@xml:id">
         <xsl:text>&lt;link linkend="</xsl:text>
         <xsl:value-of select="$id"/>
         <xsl:text>"&gt;</xsl:text>
                      xsl:use-attribute-sets="index.page.number.properties">
         <fo:page-number-citation ref-id="{$id}"/>
       </fo:basic-link>
-      <xsl:if test="$target[1]/@id or target[1]/@xml:id">
+      <xsl:if test="$target[1]/@id or d:target[1]/@xml:id">
         <xsl:text>&lt;/link&gt;</xsl:text>
       </xsl:if>
       <xsl:text>&lt;/phrase&gt;&#10;</xsl:text>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-see-markup">
+<xsl:template match="d:indexterm" mode="index-see-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
     <xsl:text>&lt;seeie&gt;</xsl:text>
     <xsl:text>&lt;phrase&gt;</xsl:text>
     <xsl:call-template name="escape-text">
-      <xsl:with-param name="text" select="string(see)"/>
+      <xsl:with-param name="text" select="string(d:see)"/>
     </xsl:call-template>
     <xsl:text>&lt;/phrase&gt;</xsl:text>
     <xsl:text>&lt;/seeie&gt;&#10;</xsl:text>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-seealso-markup">
+<xsl:template match="d:indexterm" mode="index-seealso-markup">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
     <xsl:text>&lt;seealsoie&gt;</xsl:text>
     <xsl:text>&lt;phrase&gt;</xsl:text>
     <xsl:call-template name="escape-text">
-      <xsl:with-param name="text" select="string(seealso)"/>
+      <xsl:with-param name="text" select="string(d:seealso)"/>
     </xsl:call-template>
     <xsl:text>&lt;/phrase&gt;</xsl:text>
     <xsl:text>&lt;/seealsoie&gt;&#10;</xsl:text>
index 2f1ab405ab47aebba133ab0977db039cfe034da5..0766a749402a719981aafdc31c59d3df63a8d3ac 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
@@ -28,7 +30,7 @@
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="nodes" select="book|set|setindex|article"/>
+  <xsl:variable name="nodes" select="d:book|d:set|d:setindex|d:article"/>
 
   <xsl:if test="$nodes">
     <fo:block id="toc...{$id}"
   </xsl:variable>
 
   <xsl:variable name="nodes"
-                select="$toc-context/part
-                        |$toc-context/reference
-                        |$toc-context/preface
-                        |$toc-context/chapter
-                        |$toc-context/appendix
-                        |$toc-context/article
-                        |$toc-context/topic
-                        |$toc-context/bibliography
-                        |$toc-context/glossary
-                        |$toc-context/index"/>
+                select="$toc-context/d:part
+                        |$toc-context/d:reference
+                        |$toc-context/d:preface
+                        |$toc-context/d:chapter
+                        |$toc-context/d:appendix
+                        |$toc-context/d:article
+                        |$toc-context/d:topic
+                        |$toc-context/d:bibliography
+                        |$toc-context/d:glossary
+                        |$toc-context/d:index"/>
 
   <xsl:if test="$nodes">
     <fo:block id="toc...{$cid}"
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="nodes" select="section|sect1|refentry
-                                     |article|topic|bibliography|glossary
-                                     |qandaset[$qanda.in.toc != 0]
-                                     |appendix|index"/>
+  <xsl:variable name="nodes" select="d:section|d:sect1|d:refentry
+                                     |d:article|d:topic|d:bibliography|d:glossary
+                                     |d:qandaset[$qanda.in.toc != 0]
+                                     |d:appendix|d:index"/>
   <xsl:if test="$nodes">
     <fo:block id="toc...{$id}"
               xsl:use-attribute-sets="toc.margin.properties">
   </xsl:variable>
 
   <xsl:variable name="nodes"
-                select="section|sect1|sect2|sect3|sect4|sect5|refentry
-                        |qandaset[$qanda.in.toc != 0]
-                        |bridgehead[$bridgehead.in.toc != 0]"/>
+                select="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry
+                        |d:qandaset[$qanda.in.toc != 0]
+                        |d:bridgehead[$bridgehead.in.toc != 0]"/>
 
   <xsl:variable name="level">
     <xsl:call-template name="section.level"/>
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="nodes" select="qandadiv|qandaentry"/>
+  <xsl:variable name="nodes" select="d:qandadiv|d:qandaentry"/>
 
   <xsl:if test="$nodes">
     <fo:block id="toc...{$id}"
        qandaset.toc and first output -->
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="toc">
+<xsl:template match="d:qandadiv" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
     <xsl:with-param name="toc-context" select="$toc-context"/>
   </xsl:call-template>
 
-  <xsl:variable name="nodes" select="qandadiv|qandaentry"/>
+  <xsl:variable name="nodes" select="d:qandadiv|d:qandaentry"/>
 
   <xsl:if test="$nodes">
     <fo:block id="toc.{$cid}.{$id}">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="toc">
-  <xsl:apply-templates select="question" mode="toc"/>
+<xsl:template match="d:qandaentry" mode="toc">
+  <xsl:apply-templates select="d:question" mode="toc"/>
 </xsl:template>
 
-<xsl:template match="question" mode="toc">
+<xsl:template match="d:question" mode="toc">
   <xsl:variable name="firstchunk">
     <!-- Use a titleabbrev or title if available -->
     <xsl:choose>
-      <xsl:when test="../blockinfo/titleabbrev">
-        <xsl:apply-templates select="../blockinfo/titleabbrev[1]/node()"/>
+      <xsl:when test="../d:blockinfo/d:titleabbrev">
+        <xsl:apply-templates select="../d:blockinfo/d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../blockinfo/title">
-        <xsl:apply-templates select="../blockinfo/title[1]/node()"/>
+      <xsl:when test="../d:blockinfo/d:title">
+        <xsl:apply-templates select="../d:blockinfo/d:title[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../info/titleabbrev">
-        <xsl:apply-templates select="../info/titleabbrev[1]/node()"/>
+      <xsl:when test="../d:info/d:titleabbrev">
+        <xsl:apply-templates select="../d:info/d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../titleabbrev">
-        <xsl:apply-templates select="../titleabbrev[1]/node()"/>
+      <xsl:when test="../d:titleabbrev">
+        <xsl:apply-templates select="../d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../info/title">
-        <xsl:apply-templates select="../info/title[1]/node()"/>
+      <xsl:when test="../d:info/d:title">
+        <xsl:apply-templates select="../d:info/d:title[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../title">
-        <xsl:apply-templates select="../title[1]/node()"/>
+      <xsl:when test="../d:title">
+        <xsl:apply-templates select="../d:title[1]/node()"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates select="(*[local-name(.)!='label'])[1]/node()"/>
       <fo:basic-link internal-destination="{$id}">
         <xsl:if test="$label != ''">
           <xsl:copy-of select="$label"/>
-          <xsl:if test="$deflabel = 'number' and not(label)">
+          <xsl:if test="$deflabel = 'number' and not(d:label)">
             <xsl:value-of select="$autotoc.label.separator"/>
           </xsl:if>
          <xsl:text> </xsl:text>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="book|setindex" mode="toc">
+<xsl:template match="d:book|d:setindex" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
     <xsl:with-param name="toc-context" select="$toc-context"/>
   </xsl:call-template>
 
-  <xsl:variable name="nodes" select="glossary|bibliography|preface|chapter
-                                     |reference|part|article|topic|appendix|index"/>
+  <xsl:variable name="nodes" select="d:glossary|d:bibliography|d:preface|d:chapter
+                                     |d:reference|d:part|d:article|d:topic|d:appendix|d:index"/>
 
   <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
 
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="set" mode="toc">
+<xsl:template match="d:set" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
     <xsl:with-param name="toc-context" select="$toc-context"/>
   </xsl:call-template>
 
-  <xsl:variable name="nodes" select="set|book|setindex|article"/>
+  <xsl:variable name="nodes" select="d:set|d:book|d:setindex|d:article"/>
 
   <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
 
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="part" mode="toc">
+<xsl:template match="d:part" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
     <xsl:with-param name="toc-context" select="$toc-context"/>
   </xsl:call-template>
 
-  <xsl:variable name="nodes" select="chapter|appendix|preface|reference|
-                                     refentry|article|topic|index|glossary|
-                                     bibliography"/>
+  <xsl:variable name="nodes" select="d:chapter|d:appendix|d:preface|d:reference|
+                                     d:refentry|d:article|d:topic|d:index|d:glossary|
+                                     d:bibliography"/>
 
   <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
 
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="reference" mode="toc">
+<xsl:template match="d:reference" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
 
   <xsl:if test="$toc.section.depth > 0
                 and $toc.max.depth > $depth.from.context
-                and refentry">
+                and d:refentry">
     <fo:block id="toc.{$cid}.{$id}">
       <xsl:attribute name="margin-{$direction.align.start}">
         <xsl:call-template name="set.toc.indent"/>
       </xsl:attribute>
               
-      <xsl:apply-templates select="refentry" mode="toc">
+      <xsl:apply-templates select="d:refentry" mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
       </xsl:apply-templates>
     </fo:block>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refentry" mode="toc">
+<xsl:template match="d:refentry" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="toc.line">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="preface|chapter|appendix|article"
+<xsl:template match="d:preface|d:chapter|d:appendix|d:article"
               mode="toc">
   <xsl:param name="toc-context" select="."/>
 
     <xsl:with-param name="toc-context" select="$toc-context"/>
   </xsl:call-template>
 
-  <xsl:variable name="nodes" select="section|sect1
-                                     |qandaset[$qanda.in.toc != 0]
-                                     |simplesect[$simplesect.in.toc != 0]
-                                     |topic
-                                     |refentry|appendix"/>
+  <xsl:variable name="nodes" select="d:section|d:sect1
+                                     |d:qandaset[$qanda.in.toc != 0]
+                                     |d:simplesect[$simplesect.in.toc != 0]
+                                     |d:topic
+                                     |d:refentry|d:appendix"/>
 
   <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
 
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect1" mode="toc">
+<xsl:template match="d:sect1" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
 
   <xsl:if test="$toc.section.depth > 1 
                 and $toc.max.depth > $depth.from.context
-                and sect2">
+                and d:sect2">
     <fo:block id="toc.{$cid}.{$id}">
       <xsl:attribute name="margin-{$direction.align.start}">
         <xsl:call-template name="set.toc.indent"/>
       </xsl:attribute>
               
-      <xsl:apply-templates select="sect2|qandaset[$qanda.in.toc != 0]" 
+      <xsl:apply-templates select="d:sect2|d:qandaset[$qanda.in.toc != 0]"
                            mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
       </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect2" mode="toc">
+<xsl:template match="d:sect2" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
 
   <xsl:if test="$toc.section.depth > 2 
                 and $toc.max.depth > $depth.from.context
-                and sect3">
+                and d:sect3">
     <fo:block id="toc.{$cid}.{$id}">
       <xsl:attribute name="margin-{$direction.align.start}">
         <xsl:call-template name="set.toc.indent">
         </xsl:call-template>
       </xsl:attribute>
               
-      <xsl:apply-templates select="sect3|qandaset[$qanda.in.toc != 0]" 
+      <xsl:apply-templates select="d:sect3|d:qandaset[$qanda.in.toc != 0]"
                            mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
       </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect3" mode="toc">
+<xsl:template match="d:sect3" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
 
   <xsl:if test="$toc.section.depth > 3 
                 and $toc.max.depth > $depth.from.context
-                and sect4">
+                and d:sect4">
     <fo:block id="toc.{$cid}.{$id}">
       <xsl:attribute name="margin-{$direction.align.start}">
         <xsl:call-template name="set.toc.indent">
         </xsl:call-template>
       </xsl:attribute>
               
-      <xsl:apply-templates select="sect4|qandaset[$qanda.in.toc != 0]" 
+      <xsl:apply-templates select="d:sect4|d:qandaset[$qanda.in.toc != 0]"
                            mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
       </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect4" mode="toc">
+<xsl:template match="d:sect4" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
 
   <xsl:if test="$toc.section.depth > 4 
                 and $toc.max.depth > $depth.from.context
-                and sect5">
+                and d:sect5">
     <fo:block id="toc.{$cid}.{$id}">
       <xsl:attribute name="margin-{$direction.align.start}">
         <xsl:call-template name="set.toc.indent">
         </xsl:call-template>
       </xsl:attribute>
               
-      <xsl:apply-templates select="sect5|qandaset[$qanda.in.toc != 0]" 
+      <xsl:apply-templates select="d:sect5|d:qandaset[$qanda.in.toc != 0]"
                            mode="toc">
         <xsl:with-param name="toc-context" select="$toc-context"/>
       </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect5|simplesect" mode="toc">
+<xsl:template match="d:sect5|d:simplesect" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="toc.line">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="topic" mode="toc">
+<xsl:template match="d:topic" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="toc.line">
 </xsl:template>
 
 
-<xsl:template match="section" mode="toc">
+<xsl:template match="d:section" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="depth" select="count(ancestor::section) + 1"/>
+  <xsl:variable name="depth" select="count(ancestor::d:section) + 1"/>
   <xsl:variable name="reldepth"
                 select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
 
 
     <xsl:if test="$toc.section.depth > $depth 
                   and $toc.max.depth > $depth.from.context
-                  and section">
+                  and d:section">
       <fo:block id="toc.{$cid}.{$id}">
         <xsl:attribute name="margin-{$direction.align.start}">
           <xsl:call-template name="set.toc.indent">
           </xsl:call-template>
         </xsl:attribute>
                 
-        <xsl:apply-templates select="section|qandaset[$qanda.in.toc != 0]" 
+        <xsl:apply-templates select="d:section|d:qandaset[$qanda.in.toc != 0]"
                            mode="toc">
           <xsl:with-param name="toc-context" select="$toc-context"/>
         </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="bibliography|glossary"
+<xsl:template match="d:bibliography|d:glossary"
               mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="index" mode="toc">
+<xsl:template match="d:index" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:if test="* or $generate.index != 0">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="title" mode="toc">
+<xsl:template match="d:title" mode="toc">
   <xsl:apply-templates/>
 </xsl:template>
 
 
 <xsl:template name="list.of.titles">
   <xsl:param name="titles" select="'table'"/>
-  <xsl:param name="nodes" select=".//table"/>
+  <xsl:param name="nodes" select=".//d:table"/>
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
 
 <xsl:template name="component.list.of.titles">
   <xsl:param name="titles" select="'table'"/>
-  <xsl:param name="nodes" select=".//table"/>
+  <xsl:param name="nodes" select=".//d:table"/>
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="figure|table|example|equation|procedure" mode="toc">
+<xsl:template match="d:figure|d:table|d:example|d:equation|d:procedure" mode="toc">
   <xsl:param name="toc-context" select="."/>
   <xsl:call-template name="toc.line">
     <xsl:with-param name="toc-context" select="$toc-context"/>
 <!-- ==================================================================== -->
 
 <!-- qandaset handled like a section when qanda.in.toc is set -->
-<xsl:template match="qandaset" mode="toc">
+<xsl:template match="d:qandaset" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:variable name="id">
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="depth" select="count(ancestor::section) + 1"/>
+  <xsl:variable name="depth" select="count(ancestor::d:section) + 1"/>
   <xsl:variable name="reldepth"
                 select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
 
 
     <xsl:if test="$toc.section.depth > $depth 
                   and $toc.max.depth > $depth.from.context
-                  and (child::qandadiv or child::qandaentry)">
+                  and (child::d:qandadiv or child::d:qandaentry)">
       <fo:block id="toc.{$cid}.{$id}">
         <xsl:attribute name="margin-{$direction.align.start}">
           <xsl:call-template name="set.toc.indent">
           </xsl:call-template>
         </xsl:attribute>
                 
-        <xsl:apply-templates select="qandadiv|qandaentry" mode="toc">
+        <xsl:apply-templates select="d:qandadiv|d:qandaentry" mode="toc">
           <xsl:with-param name="toc-context" select="$toc-context"/>
         </xsl:apply-templates>
       </fo:block>
index 781a3be07dd9e7d0af4d97bdcc665c4ebaf824f5..3273ec8e82d9f90e022ecf9960448a9779972fd7 100644 (file)
@@ -1,28 +1,30 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 <xsl:template name="axf-document-information">
 
-    <xsl:variable name="authors" select="(//author|//editor|
-                                          //corpauthor|//authorgroup)[1]"/>
+    <xsl:variable name="authors" select="(//d:author|//d:editor|
+                                          //d:corpauthor|//d:authorgroup)[1]"/>
     <xsl:if test="$authors">
       <xsl:variable name="author">
         <xsl:choose>
-          <xsl:when test="$authors[self::authorgroup]">
+          <xsl:when test="$authors[self::d:authorgroup]">
             <xsl:call-template name="person.name.list">
               <xsl:with-param name="person.list" 
-                 select="$authors/*[self::author|self::corpauthor|
-                               self::othercredit|self::editor]"/>
+                 select="$authors/*[self::d:author|self::d:corpauthor|
+                               self::d:othercredit|self::d:editor]"/>
             </xsl:call-template>
           </xsl:when>
-          <xsl:when test="$authors[self::corpauthor]">
+          <xsl:when test="$authors[self::d:corpauthor]">
             <xsl:value-of select="$authors"/>
           </xsl:when>
-           <xsl:when test="$authors[orgname]">
-            <xsl:value-of select="$authors/orgname"/>
+           <xsl:when test="$authors[d:orgname]">
+            <xsl:value-of select="$authors/d:orgname"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:call-template name="person.name">
       </xsl:attribute>
     </axf:document-info>
 
-    <xsl:if test="//keyword">
+    <xsl:if test="//d:keyword">
       <xsl:element name="axf:document-info">
         <xsl:attribute name="name">keywords</xsl:attribute>
         <xsl:attribute name="value">
-          <xsl:for-each select="//keyword">
+          <xsl:for-each select="//d:keyword">
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:if test="position() != last()">
               <xsl:text>, </xsl:text>
       </xsl:element>
     </xsl:if>
 
-    <xsl:if test="//subjectterm">
+    <xsl:if test="//d:subjectterm">
       <xsl:element name="axf:document-info">
         <xsl:attribute name="name">subject</xsl:attribute>
         <xsl:attribute name="value">
-          <xsl:for-each select="//subjectterm">
+          <xsl:for-each select="//d:subjectterm">
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:if test="position() != last()">
               <xsl:text>, </xsl:text>
index 112c4145509dfb0c5d988db8dd82037931e986b8..b7aa8940baa4a9eb13bb0dffe0da0568a091f364 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
     </xsl:when>
 
     <!-- SERIALS -->
-    <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn">
+    <xsl:when test="./@role='serial' or ./d:biblioid/@class='issn' or ./d:issn">
       <xsl:call-template name="iso690.serial"/>
     </xsl:when>
 
     <!-- PARTS OF MONOGRAPHS -->
-    <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])">
+    <xsl:when test="./@role='part' or (./d:bibliomisc[@role='secnum']|./d:bibliomisc[@role='sectitle'])">
       <xsl:call-template name="iso690.monogr.part"/>
     </xsl:when>
 
     <!-- CONTRIBUTIONS TO MONOGRAPHS -->
-    <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')">
+    <xsl:when test="./@role='contribution' or (./d:biblioset/@relation='part' and ./d:biblioset/@relation='book')">
       <xsl:call-template name="iso690.paper.mon"/>
     </xsl:when>
 
     <!-- ARTICLES, ETC., IN SERIALS -->
-    <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')">
+    <xsl:when test="./@role='article' or (./d:biblioset/@relation='journal' and ./d:biblioset/@relation='article')">
       <xsl:call-template name="iso690.article"/>
     </xsl:when>
 
     <!-- PATENT DOCUMENTS -->
-    <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])">
+    <xsl:when test="./@role='patent' or (./d:bibliomisc[@role='patenttype'] and ./d:bibliomisc[@role='patentnum'])">
       <xsl:call-template name="iso690.patent"/>
     </xsl:when>
 
   <!-- Title and Type of medium -->
   <xsl:call-template name="iso690.title"/>
   <!-- Responsibility [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
+  <xsl:if test="not(./d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
   <!-- Edition -->
   <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/>
+    <xsl:with-param name="after" select="./d:bibliomisc[@role='issuing']"/>
   </xsl:call-template>
   <!-- Issue designation (date and/or n°) [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
+  <xsl:if test="not(./d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.issuing"/>
   </xsl:if>
   <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
   <!-- Title and Type of medium of host document -->
   <xsl:call-template name="iso690.title"/>
   <!-- Subordinate responsibility of host document [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
   <!-- Edition -->
   <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./volumenum"/>
+    <xsl:with-param name="after" select="./d:volumenum"/>
   </xsl:call-template>
   <!-- Numeration of the part [nonEL]-->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
+  <xsl:if test="not(./d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.partnr"/>
   <!-- Subordinate responsibility [nonEL] -->
     <xsl:call-template name="iso690.secondary"/>
   <xsl:call-template name="iso690.pub"/>
   <!-- Location within host -->
   <xsl:call-template name="iso690.part.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
   <!-- Numeration within host document [EL] -->
   <!-- Notes [EL] -->
     <xsl:call-template name="iso690.notice"/>
 <!-- CONTRIBUTIONS TO MONOGRAPHS -->
 <xsl:template name="iso690.paper.mon">
 <!-- Contribution -->
-  <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/>
+  <xsl:apply-templates mode="iso690.paper.part" select="./d:biblioset[@relation='part']"/>
 <!-- In -->
   <xsl:text>In </xsl:text>
 <!-- Host -->
-  <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/>
+  <xsl:apply-templates mode="iso690.paper.book" select="./d:biblioset[@relation='book']"/>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.paper.part">
+<xsl:template match="d:biblioset" mode="iso690.paper.part">
 <!-- Contribution -->
   <!-- Primary responsibility -->
   <xsl:call-template name="iso690.primary"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.paper.book">
+<xsl:template match="d:biblioset" mode="iso690.paper.book">
 <!-- Host -->
   <!-- Primary responsibility -->
   <xsl:call-template name="iso690.primary"/>
   <!-- Title and Type of medium -->
   <xsl:call-template name="iso690.title"/>
   <!-- Subordinate responsibility [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
   <!-- Edition -->
   <!-- Numeration within host document [EL] -->
   <!-- Location within host -->
   <xsl:call-template name="iso690.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
   <!-- Notes [EL] -->
     <xsl:call-template name="iso690.notice"/>
   <!-- Avaibility and access [EL] -->
 <!-- ARTICLES, ETC., IN SERIALS -->
 <xsl:template name="iso690.article">
 <!-- Article -->
-  <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/>
+  <xsl:apply-templates mode="iso690.article.art" select="./d:biblioset[@relation='article']"/>
 <!-- Serial -->
-  <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/>
+  <xsl:apply-templates mode="iso690.article.jour" select="./d:biblioset[@relation='journal']"/>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.article.art">
+<xsl:template match="d:biblioset" mode="iso690.article.art">
 <!-- Article -->
   <!-- Primary responsibility -->
   <xsl:call-template name="iso690.primary"/>
     <xsl:with-param name="italic" select="0"/>
   </xsl:call-template>
   <!-- Subordinate responsibility [nonEL] -->
-  <xsl:if test="not(../*/bibliomisc[@role='medium'])">
+  <xsl:if test="not(../*/d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.article.jour">
+<xsl:template match="d:biblioset" mode="iso690.article.jour">
 <!-- Serial -->
   <!-- Title and Type of medium -->
   <xsl:call-template name="iso690.title"/>
   <!-- Edition -->
   <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/>
+    <xsl:with-param name="after" select="./d:pubdate[not(@role='issuing')]|./d:volumenum|./d:issuenum|./d:pagenums"/>
   </xsl:call-template>
   <!-- Number designation [EL] -->
   <!-- Location within host -->
   <xsl:call-template name="iso690.article.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
   <!-- Notes [EL] -->
     <xsl:call-template name="iso690.notice"/>
   <!-- Avaibility and access [EL] -->
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./authorgroup/author|./author">
+    <xsl:when test="./d:authorgroup/d:author|./d:author">
       <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/>
+        <xsl:with-param name="person.list" select=".//d:authorgroup/d:author|.//d:author"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="./authorgroup/editor|./editor">
+    <xsl:when test="./d:authorgroup/d:editor|./d:editor">
       <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/>
+        <xsl:with-param name="person.list" select=".//d:authorgroup/d:editor|.//d:editor"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="./authorgroup/corpauthor|./corpauthor">
+    <xsl:when test="./d:authorgroup/d:corpauthor|./d:corpauthor">
       <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/>
+        <xsl:with-param name="person.list" select=".//d:authorgroup/d:corpauthor|.//d:corpauthor"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:if test="(./firstname)and(./surname)">
+      <xsl:if test="(./d:firstname)and(./d:surname)">
         <xsl:call-template name="iso690.author"/>
         <xsl:call-template name="iso690.endsep">
-          <xsl:with-param name="text" select="string(./firstname[1])"/>
+          <xsl:with-param name="text" select="string(./d:firstname[1])"/>
           <xsl:with-param name="sep" select="$primary.sep"/>
         </xsl:call-template>
       </xsl:if>
 
 <xsl:template name="iso690.author.list">
   <xsl:param name="person.list"
-             select="author|corpauthor|editor"/>
+             select="d:author|d:corpauthor|d:editor"/>
   <xsl:param name="person.count" select="count($person.list)"/>
   <xsl:param name="count" select="1"/>
-  <xsl:param name="group" select="./authorgroup[@role='many']"/>
+  <xsl:param name="group" select="./d:authorgroup[@role='many']"/>
   <xsl:param name="many" select="0"/>
 
   <xsl:param name="primary.many">
                 </xsl:when>
                 <xsl:otherwise>
                   <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/>
+                    <xsl:with-param name="text" select="string($person.list[position()=$count]//d:firstname[1])"/>
                     <xsl:with-param name="sep" select="$primary.sep"/>
                   </xsl:call-template>
                 </xsl:otherwise>
   <xsl:choose>
     <xsl:when test="name($node)!='corpauthor'">
       <fo:inline text-transform="uppercase">
-        <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/>
+        <xsl:apply-templates mode="iso690.mode" select="$node//d:surname[1]"/>
       </fo:inline>
-      <xsl:if test="$node//surname and $node//firstname">
+      <xsl:if test="$node//d:surname and $node//d:firstname">
         <xsl:value-of select="$lastfirst.sep"/>
       </xsl:if>
-      <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/>
+      <xsl:apply-templates mode="iso690.mode" select="$node//d:firstname[1]"/>
     </xsl:when>
     <xsl:otherwise>
       <fo:inline text-transform="uppercase">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="corpauthor|firstname|surname" mode="iso690.mode">
+<xsl:template match="d:corpauthor|d:firstname|d:surname" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
 <!-- Title and Type of medium -->
 <xsl:template name="iso690.title">
-  <xsl:param name="medium" select="./bibliomisc[@role='medium']"/>
+  <xsl:param name="medium" select="./d:bibliomisc[@role='medium']"/>
   <xsl:param name="italic" select="1"/>
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
   </xsl:param>
 
-  <xsl:apply-templates mode="iso690.mode" select="./title">
+  <xsl:apply-templates mode="iso690.mode" select="./d:title">
     <xsl:with-param name="medium" select="$medium"/>
     <xsl:with-param name="italic" select="$italic"/>
     <xsl:with-param name="sep" select="$sep"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="title" mode="iso690.mode">
+<xsl:template match="d:title" mode="iso690.mode">
   <xsl:param name="medium"/>
   <xsl:param name="italic" select="1"/>
   <xsl:param name="sep">
     <xsl:value-of select="$medium2"/>
   </xsl:if>
   <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/>
+    <xsl:with-param name="text" select="concat(string(.),string(../d:subtitle))"/>
     <xsl:with-param name="sep" select="$sep"/>
   </xsl:call-template>
 </xsl:template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:if test="../subtitle">
+  <xsl:if test="../d:subtitle">
     <xsl:value-of select="$submaintitle.sep"/>
-    <xsl:apply-templates mode="iso690.mode" select="../subtitle"/>
+    <xsl:apply-templates mode="iso690.mode" select="../d:subtitle"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="iso690.mode">
+<xsl:template match="d:subtitle" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
-<xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='medium']" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
   <xsl:param name="secondary.person.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:for-each select="./bibliomisc[@role='secondary']">
+  <xsl:for-each select="./d:bibliomisc[@role='secondary']">
     <xsl:apply-templates mode="iso690.mode" select="."/>
     <xsl:choose>
-      <xsl:when test="position()=count(../bibliomisc[@role='secondary'])">
+      <xsl:when test="position()=count(../d:bibliomisc[@role='secondary'])">
         <xsl:call-template name="iso690.endsep">
           <xsl:with-param name="text" select="string(.)"/>
           <xsl:with-param name="sep" select="$secondary.sep"/>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='secondary']" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
   </xsl:param>
   <xsl:choose>
     <xsl:when test="string($after)!=''">
-      <xsl:apply-templates mode="iso690.mode" select="./edition">
+      <xsl:apply-templates mode="iso690.mode" select="./d:edition">
         <xsl:with-param name="sep" select="$edition.serial.sep"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./edition"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:edition"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="edition" mode="iso690.mode">
+<xsl:template match="d:edition" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template>
   </xsl:param>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]">
+    <xsl:when test="./d:pubdate[@role='issuing'] and ./d:volumenum[2] and ./d:issuenum[2]">
       <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[1]">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum[1]">
         <xsl:with-param name="sep" select="$issuing.range"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[2]">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum[2]">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]">
+    <xsl:when test="./d:pubdate[@role='issuing'] and ./d:volumenum[2]">
       <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[1]">
         <xsl:with-param name="sep" select="$issuing.range"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[2]">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
+    <xsl:when test="./d:pubdate[@role='issuing'] and ./d:volumenum and ./d:issuenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing']">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing']">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
+    <xsl:when test="./d:pubdate[@role='issuing']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing']">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./volumenum">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+    <xsl:when test="./d:volumenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+    <xsl:when test="./d:issuenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'][2]">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]">
+    <xsl:when test="./d:pubdate[@role='issuing'][2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing'][1]">
         <xsl:with-param name="sep" select="$issuing.range"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing'][2]">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing']">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="pubdate[@role='issuing']" mode="iso690.mode">
+<xsl:template match="d:pubdate[@role='issuing']" mode="iso690.mode">
   <xsl:param name="sep"/>
   <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
   <xsl:apply-templates mode="iso690.mode"/>
   <xsl:param name="partnr.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+  <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
     <xsl:with-param name="sep" select="$partnr.sep"/>
   </xsl:apply-templates>
 </xsl:template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
+    <xsl:when test="(./d:publisher/d:publishername|./d:publishername|./d:publisher/d:address/d:city)and($onlydate=0)and(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year|./d:date[@role='upd']|./d:date[@role='upd'])">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:address/d:city">
         <xsl:with-param name="sep" select="$placesep"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:publishername|./d:publishername">
         <xsl:with-param name="sep" select="$pubsep"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]|./d:copyright/d:year">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:apply-templates>
-      <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
+      <xsl:if test="not(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year)">
         <xsl:call-template name="iso690.data">
           <xsl:with-param name="sep" select="$endsep"/>
         </xsl:call-template>
       </xsl:if>
     </xsl:when>
-    <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
+    <xsl:when test="(./d:publisher/d:publishername|./d:publishername)and(./d:publisher/d:address/d:city)and($onlydate=0)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:address/d:city">
         <xsl:with-param name="sep" select="$placesep"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:publishername|./d:publishername">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
+    <xsl:when test="($onlydate=1)or(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]|./d:copyright/d:year">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:apply-templates>
       <xsl:if test="$onlydate=1">
         </xsl:call-template>
       </xsl:if>
     </xsl:when>
-    <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
+    <xsl:when test="not(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year)">
       <xsl:call-template name="iso690.data">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:call-template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./volumnum|./issuenum|./pagenums">
+    <xsl:when test="./d:volumnum|./d:issuenum|./d:pagenums">
       <xsl:call-template name="iso690.pub">
         <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/>
       </xsl:call-template>
   <xsl:param name="datecit2">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']">
+  <xsl:apply-templates mode="iso690.mode" select="./d:date[@role='upd']">
     <xsl:with-param name="sep"/>
   </xsl:apply-templates>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/>
+  <xsl:apply-templates mode="iso690.mode" select="./d:date[@role='cit']"/>
   <xsl:choose>
-    <xsl:when test="./date[@role='cit']">
+    <xsl:when test="./d:date[@role='cit']">
       <xsl:call-template name="iso690.endsep">
         <xsl:with-param name="text" select="$datecit2"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="./date[@role='upd']">
+    <xsl:when test="./d:date[@role='upd']">
       <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(./date[@role='upd'])"/>
+        <xsl:with-param name="text" select="string(./d:date[@role='upd'])"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="publisher/address/city|publishername" mode="iso690.mode">
+<xsl:template match="d:publisher/d:address/d:city|d:publishername" mode="iso690.mode">
   <xsl:param name="sep"/>
   <xsl:param name="upd" select="0"/>
   <xsl:apply-templates mode="iso690.mode"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="pubdate|copyright/year" mode="iso690.mode">
+<xsl:template match="d:pubdate|d:copyright/d:year" mode="iso690.mode">
   <xsl:param name="sep"/>
   <xsl:param name="upd" select="1"/>
   <xsl:param name="datecit2">
   <xsl:if test="$upd!=0">
     <xsl:choose>
       <xsl:when test="name(.)='pubdate'">
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../d:date[@role='upd']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../d:date[@role='cit']"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../../d:date[@role='upd']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../../d:date[@role='cit']"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:if>
   <xsl:choose>
-    <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0">
+    <xsl:when test="../d:date[@role='cit']|../../d:date[@role='cit'] and $upd!=0">
       <xsl:call-template name="iso690.endsep">
         <xsl:with-param name="text" select="$datecit2"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0">
+    <xsl:when test="../d:date[@role='upd']|../../d:date[@role='upd'] and $upd!=0">
       <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(../date[@role='upd'])"/>
+        <xsl:with-param name="text" select="string(../d:date[@role='upd'])"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
 </xsl:template>
 
 <!-- Date of update/revision -->
-<xsl:template match="date[@role='upd']" mode="iso690.mode">
+<xsl:template match="d:date[@role='upd']" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template>
   </xsl:param>
 </xsl:template>
 
 <!-- Date of citation -->
-<xsl:template match="date[@role='cit']" mode="iso690.mode">
+<xsl:template match="d:date[@role='cit']" mode="iso690.mode">
   <xsl:param name="datecit1">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template>
   </xsl:param>
   <xsl:param name="extent.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./pagenums">
+  <xsl:apply-templates mode="iso690.mode" select="./d:pagenums">
     <xsl:with-param name="sep" select="$extent.sep"/>
   </xsl:apply-templates>
 </xsl:template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
+    <xsl:when test="./d:pagenums">
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='secnum']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='sectitle']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:pagenums"/>
     </xsl:when>
-    <xsl:when test="./bibliomisc[@role='sectitle']">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']">
+    <xsl:when test="./d:bibliomisc[@role='sectitle']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='secnum']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='sectitle']">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='secnum']">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:otherwise>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])">
+    <xsl:when test="not(./d:date[@role='upd']|./d:date[@role='cit'])">
       <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+        <xsl:when test="./d:volumenum|./d:issuenum|./d:pagenums">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="upd" select="0"/>
             <xsl:with-param name="sep" select="$locs.sep"/>
           </xsl:apply-templates>
           <xsl:call-template name="iso690.location"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="sep" select="$location.sep"/>
           </xsl:apply-templates>
         </xsl:otherwise>
     </xsl:when>
     <xsl:otherwise>
       <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+        <xsl:when test="./d:volumenum|./d:issuenum|./d:pagenums">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="upd" select="0"/>
             <xsl:with-param name="sep" select="$locs.sep"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="upd" select="0"/>
             <xsl:with-param name="sep" select="$location.sep"/>
           </xsl:apply-templates>
         </xsl:otherwise>
       </xsl:choose>
       <xsl:choose>
-        <xsl:when test="./issuenum">
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-          <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+        <xsl:when test="./d:issuenum">
+          <xsl:apply-templates mode="iso690.mode" select="./d:volumenum"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
             <xsl:with-param name="sep"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+          <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
             <xsl:with-param name="sep"/>
           </xsl:apply-templates>
         </xsl:otherwise>
       </xsl:choose>
       <xsl:choose>
-        <xsl:when test="./pagenums">
+        <xsl:when test="./d:pagenums">
           <xsl:call-template name="iso690.data">
             <xsl:with-param name="sep" select="$locs.sep"/>
           </xsl:call-template>
-          <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:pagenums"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:call-template name="iso690.data">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+    <xsl:when test="./d:volumenum and not(./d:issuenum) and not(./d:pagenums)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./issuenum and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+    <xsl:when test="./d:issuenum and not(./d:pagenums)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
+    <xsl:when test="./d:pagenums">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:pagenums"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='secnum']|d:bibliomisc[@role='sectitle']" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
   </xsl:param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="volumenum|issuenum" mode="iso690.mode">
+<xsl:template match="d:volumenum|d:issuenum" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
   </xsl:param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="iso690.mode">
+<xsl:template match="d:pagenums" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
   </xsl:param>
 
 <!-- Series -->
 <xsl:template name="iso690.serie">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/>
+  <xsl:apply-templates mode="iso690.mode" select=".//d:bibliomisc[@role='serie']"/>
 </xsl:template>
 
 <!-- Notes -->
 <xsl:template name="iso690.notice">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/>
+  <xsl:apply-templates mode="iso690.mode" select=".//d:bibliomisc[not(@role)]"/>
 </xsl:template>
 
-<xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[not(@role)]|d:bibliomisc[@role='serie']" mode="iso690.mode">
   <xsl:param name="notice.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template>
   </xsl:param>
 
 <!-- Avaibility and access -->
 <xsl:template name="iso690.access">
-  <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']">
+  <xsl:for-each select="./d:biblioid[@class='uri']|./d:bibliomisc[@role='access']">
     <xsl:choose>
       <xsl:when test="position()=1">
         <xsl:apply-templates mode="iso690.mode" select="."/>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode">
+<xsl:template match="d:biblioid[@class='uri']/d:ulink|d:bibliomisc[@role='access']/d:ulink" mode="iso690.mode">
   <xsl:param name="link1">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template>
   </xsl:param>
   <xsl:value-of select="$link2"/>
 </xsl:template>
 
-<xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode">
+<xsl:template match="d:biblioid[@class='uri']|d:bibliomisc[@role='access']" mode="iso690.mode">
   <xsl:param name="firstacc" select="1"/>
   <xsl:param name="access">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
-    <xsl:when test="(./ulink)and(string(./ulink)=string(.))">
+    <xsl:when test="(./d:ulink)and(string(./d:ulink)=string(.))">
       <xsl:choose>
-        <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))">
+        <xsl:when test="(starts-with(./d:ulink/@url,'http://')or(starts-with(./d:ulink/@url,'https://')))">
           <xsl:value-of select="$onwww"/>
           <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:ulink"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="$oninet"/>
           <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:ulink"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
-    <xsl:when test="(./ulink)and(string(./ulink)!=string(.))">
+    <xsl:when test="(./d:ulink)and(string(./d:ulink)!=string(.))">
       <xsl:value-of select="text()[1]"/>
       <xsl:call-template name="iso690.endsep">
         <xsl:with-param name="text" select="text()[1]"/>
         <xsl:with-param name="sep" select="$access.end"/>
       </xsl:call-template>
-      <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:ulink"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates mode="iso690.mode"/>
 <!-- Standard number - ISBN -->
 <xsl:template name="iso690.isbn">
   <xsl:choose>
-    <xsl:when test="./biblioid/@class='isbn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/>
+    <xsl:when test="./d:biblioid/@class='isbn'">
+      <xsl:apply-templates mode="iso690.mode" select="./d:biblioid[@class='isbn']"/>
     </xsl:when>
-    <xsl:when test="./isbn">
-      <xsl:apply-templates mode="iso690.mode" select="./isbn"/>
+    <xsl:when test="./d:isbn">
+      <xsl:apply-templates mode="iso690.mode" select="./d:isbn"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode">
+<xsl:template match="d:isbn|d:biblioid[@class='isbn']" mode="iso690.mode">
   <xsl:param name="isbn">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template>
   </xsl:param>
 <!-- Standard number - ISSN -->
 <xsl:template name="iso690.issn">
   <xsl:choose>
-    <xsl:when test="./biblioid/@class='issn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/>
+    <xsl:when test="./d:biblioid/@class='issn'">
+      <xsl:apply-templates mode="iso690.mode" select="./d:biblioid[@class='issn']"/>
     </xsl:when>
-    <xsl:when test="./issn">
-      <xsl:apply-templates mode="iso690.mode" select="./issn"/>
+    <xsl:when test="./d:issn">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issn"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode">
+<xsl:template match="d:issn|d:biblioid[@class='issn']" mode="iso690.mode">
   <xsl:param name="issn">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template>
   </xsl:param>
   <xsl:param name="patdate.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./address/country"/>
-  <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/>
+  <xsl:apply-templates mode="iso690.mode" select="./d:address/d:country"/>
+  <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='patenttype']"/>
   <xsl:choose>
-    <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/>
+    <xsl:when test="./d:biblioid[@class='other' and @otherclass='patentnum']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:biblioid[@class='other' and @otherclass='patentnum']"/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='patentnum']"/>
     </xsl:otherwise>
   </xsl:choose>
-  <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+  <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
     <xsl:with-param name="sep" select="$patdate.sep"/>
   </xsl:apply-templates>
 </xsl:template>
 
 <!-- Country or issuing office -->
-<xsl:template match="address/country" mode="iso690.mode">
+<xsl:template match="d:address/d:country" mode="iso690.mode">
   <xsl:param name="patcountry.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template>
   </xsl:param>
 </xsl:template>
 
 <!-- Kind of patent document -->
-<xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='patenttype']" mode="iso690.mode">
   <xsl:param name="pattype.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template>
   </xsl:param>
 </xsl:template>
 
 <!-- Number -->
-<xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode">
+<xsl:template match="d:biblioid[@class='other' and @otherclass='patentnum']|d:bibliomisc[@role='patentnum']" mode="iso690.mode">
   <xsl:param name="patnum.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template>
   </xsl:param>
index 87b4103175b0e3f3a961b419f8f64b681716a616..37a8b0b68b63331d62d60a414dee6be773d707e9 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bibliography">
+<xsl:template match="d:bibliography">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <xsl:choose>
-    <xsl:when test="not(parent::*) or parent::part or parent::book">
+    <xsl:when test="not(parent::*) or parent::d:part or parent::d:book">
       <xsl:variable name="master-reference">
         <xsl:call-template name="select.pagemaster"/>
       </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliography/bibliographyinfo"></xsl:template>
-<xsl:template match="bibliography/info"></xsl:template>
-<xsl:template match="bibliography/title"></xsl:template>
-<xsl:template match="bibliography/subtitle"></xsl:template>
-<xsl:template match="bibliography/titleabbrev"></xsl:template>
+<xsl:template match="d:bibliography/d:bibliographyinfo"></xsl:template>
+<xsl:template match="d:bibliography/d:info"></xsl:template>
+<xsl:template match="d:bibliography/d:title"></xsl:template>
+<xsl:template match="d:bibliography/d:subtitle"></xsl:template>
+<xsl:template match="d:bibliography/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bibliodiv">
+<xsl:template match="d:bibliodiv">
   <fo:block>
     <xsl:attribute name="id">
       <xsl:call-template name="object.id"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="bibliodiv/title"/>
-<xsl:template match="bibliodiv/subtitle"/>
-<xsl:template match="bibliodiv/titleabbrev"/>
+<xsl:template match="d:bibliodiv/d:title"/>
+<xsl:template match="d:bibliodiv/d:subtitle"/>
+<xsl:template match="d:bibliodiv/d:titleabbrev"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bibliolist">
+<xsl:template match="d:bibliolist">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
             space-before.optimum="1.5em"
             space-before.maximum="2em">
 
-    <xsl:if test="blockinfo/title|info/title|title">
+    <xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
-    <xsl:apply-templates select="*[not(self::blockinfo)
-                                   and not(self::info)
-                                   and not(self::title)
-                                   and not(self::titleabbrev)]"/>
+    <xsl:apply-templates select="*[not(self::d:blockinfo)
+                                   and not(self::d:info)
+                                   and not(self::d:title)
+                                   and not(self::d:titleabbrev)]"/>
   </fo:block>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="biblioentry">
+<xsl:template match="d:biblioentry">
   <xsl:param name="label">
     <xsl:call-template name="biblioentry.label"/>
   </xsl:param>
   <xsl:choose>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography//
+      <xsl:variable name="entry" select="$bib/d:bibliography//
                                          *[@id=$id or @xml:id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliomixed">
+<xsl:template match="d:bibliomixed">
   <xsl:param name="label">
     <xsl:call-template name="biblioentry.label"/>
   </xsl:param>
   <xsl:choose>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography//
+      <xsl:variable name="entry" select="$bib/d:bibliography//
                                          *[@id=$id or @xml:id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
   <xsl:choose>
     <xsl:when test="$bibliography.numbered != 0">
       <xsl:text>[</xsl:text>
-      <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+      <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
                   level="any" format="1"/>
       <xsl:text>] </xsl:text>
     </xsl:when>
     <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
       <xsl:text>[</xsl:text>
-      <xsl:apply-templates select="$node/abbrev[1]"/>
+      <xsl:apply-templates select="$node/d:abbrev[1]"/>
       <xsl:text>] </xsl:text>
     </xsl:when>
     <xsl:when test="$node/@xreflabel">
   <xsl:apply-templates select="."/><!-- try the default mode -->
 </xsl:template>
 
-<xsl:template match="abbrev" mode="bibliography.mode">
+<xsl:template match="d:abbrev" mode="bibliography.mode">
   <xsl:if test="preceding-sibling::*">
     <fo:inline>
       <xsl:apply-templates mode="bibliography.mode"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="abstract" mode="bibliography.mode">
+<xsl:template match="d:abstract" mode="bibliography.mode">
   <!-- suppressed -->
 </xsl:template>
 
-<xsl:template match="address" mode="bibliography.mode">
+<xsl:template match="d:address" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="affiliation" mode="bibliography.mode">
+<xsl:template match="d:affiliation" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="shortaffil" mode="bibliography.mode">
+<xsl:template match="d:shortaffil" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="jobtitle" mode="bibliography.mode">
+<xsl:template match="d:jobtitle" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="artheader|articleinfo|article/info" 
+<xsl:template match="d:artheader|d:articleinfo|d:article/d:info"
               mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="artpagenums" mode="bibliography.mode">
+<xsl:template match="d:artpagenums" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="author" mode="bibliography.mode">
+<xsl:template match="d:author" mode="bibliography.mode">
   <fo:inline>
     <xsl:choose>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname" mode="bibliography.mode"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname" mode="bibliography.mode"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
+<xsl:template match="d:authorblurb|d:personblurb" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="bibliography.mode">
+<xsl:template match="d:authorgroup" mode="bibliography.mode">
   <fo:inline>
     <xsl:call-template name="person.name.list"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="authorinitials" mode="bibliography.mode">
+<xsl:template match="d:authorinitials" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="bibliomisc" mode="bibliography.mode">
+<xsl:template match="d:bibliomisc" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="bibliomset" mode="bibliography.mode">
+<xsl:template match="d:bibliomset" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
 
 <!-- ================================================== -->
 
-<xsl:template match="biblioset" mode="bibliography.mode">
+<xsl:template match="d:biblioset" mode="bibliography.mode">
   <fo:inline>
     <xsl:if test="@id">
       <xsl:attribute name="id">
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="biblioset/title|biblioset/citetitle" 
+<xsl:template match="d:biblioset/d:title|d:biblioset/d:citetitle"
               mode="bibliography.mode">
   <xsl:variable name="relation" select="../@relation"/>
   <xsl:choose>
 
 <!-- ================================================== -->
 
-<xsl:template match="citetitle" mode="bibliography.mode">
+<xsl:template match="d:citetitle" mode="bibliography.mode">
   <fo:inline>
     <xsl:choose>
       <xsl:when test="@pubwork = 'article'">
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="collab" mode="bibliography.mode">
+<xsl:template match="d:collab" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="confgroup" mode="bibliography.mode">
+<xsl:template match="d:confgroup" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="contractnum" mode="bibliography.mode">
+<xsl:template match="d:contractnum" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="contractsponsor" mode="bibliography.mode">
+<xsl:template match="d:contractsponsor" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="contrib" mode="bibliography.mode">
+<xsl:template match="d:contrib" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
 
 <!-- ================================================== -->
 
-<xsl:template match="copyright" mode="bibliography.mode">
+<xsl:template match="d:copyright" mode="bibliography.mode">
   <fo:inline>
     <xsl:call-template name="gentext">
       <xsl:with-param name="key" select="'Copyright'"/>
       <xsl:with-param name="dingbat">copyright</xsl:with-param>
     </xsl:call-template>
     <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="year" mode="bibliography.mode"/>
-    <xsl:if test="holder">
+    <xsl:apply-templates select="d:year" mode="bibliography.mode"/>
+    <xsl:if test="d:holder">
       <xsl:call-template name="gentext.space"/>
-      <xsl:apply-templates select="holder" mode="bibliography.mode"/>
+      <xsl:apply-templates select="d:holder" mode="bibliography.mode"/>
     </xsl:if>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="year" mode="bibliography.mode">
+<xsl:template match="d:year" mode="bibliography.mode">
   <xsl:apply-templates/><xsl:text>, </xsl:text>
 </xsl:template>
 
-<xsl:template match="year[position()=last()]" mode="bibliography.mode">
+<xsl:template match="d:year[position()=last()]" mode="bibliography.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="holder" mode="bibliography.mode">
+<xsl:template match="d:holder" mode="bibliography.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ================================================== -->
 
-<xsl:template match="corpauthor" mode="bibliography.mode">
+<xsl:template match="d:corpauthor" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="bibliography.mode">
+<xsl:template match="d:corpcredit" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="corpname" mode="bibliography.mode">
+<xsl:template match="d:corpname" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="date" mode="bibliography.mode">
+<xsl:template match="d:date" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="edition" mode="bibliography.mode">
+<xsl:template match="d:edition" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="editor" mode="bibliography.mode">
+<xsl:template match="d:editor" mode="bibliography.mode">
   <fo:inline>
     <xsl:call-template name="person.name"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="firstname" mode="bibliography.mode">
+<xsl:template match="d:firstname" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="honorific" mode="bibliography.mode">
+<xsl:template match="d:honorific" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="bibliography.mode">
+<xsl:template match="d:indexterm" mode="bibliography.mode">
   <xsl:apply-templates select="."/> 
 </xsl:template>
 
-<xsl:template match="invpartnumber" mode="bibliography.mode">
+<xsl:template match="d:invpartnumber" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="isbn" mode="bibliography.mode">
+<xsl:template match="d:isbn" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="issn" mode="bibliography.mode">
+<xsl:template match="d:issn" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="issuenum" mode="bibliography.mode">
+<xsl:template match="d:issuenum" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="lineage" mode="bibliography.mode">
+<xsl:template match="d:lineage" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="orgname" mode="bibliography.mode">
+<xsl:template match="d:orgname" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="bibliography.mode">
+<xsl:template match="d:othercredit" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="othername" mode="bibliography.mode">
+<xsl:template match="d:othername" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="bibliography.mode">
+<xsl:template match="d:pagenums" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="printhistory" mode="bibliography.mode">
+<xsl:template match="d:printhistory" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="productname" mode="bibliography.mode">
+<xsl:template match="d:productname" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="productnumber" mode="bibliography.mode">
+<xsl:template match="d:productnumber" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="bibliography.mode">
+<xsl:template match="d:pubdate" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="publisher" mode="bibliography.mode">
+<xsl:template match="d:publisher" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="publishername" mode="bibliography.mode">
+<xsl:template match="d:publishername" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="pubsnumber" mode="bibliography.mode">
+<xsl:template match="d:pubsnumber" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="bibliography.mode">
+<xsl:template match="d:releaseinfo" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="bibliography.mode">
+<xsl:template match="d:revhistory" mode="bibliography.mode">
   <fo:block>
     <xsl:apply-templates select="."/> <!-- use normal mode -->
   </fo:block>
 </xsl:template>
 
-<xsl:template match="seriesinfo" mode="bibliography.mode">
+<xsl:template match="d:seriesinfo" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="seriesvolnums" mode="bibliography.mode">
+<xsl:template match="d:seriesvolnums" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="bibliography.mode">
+<xsl:template match="d:subtitle" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="surname" mode="bibliography.mode">
+<xsl:template match="d:surname" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="title" mode="bibliography.mode">
+<xsl:template match="d:title" mode="bibliography.mode">
   <fo:inline>
     <fo:inline font-style="italic">
       <xsl:apply-templates mode="bibliography.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="bibliography.mode">
+<xsl:template match="d:titleabbrev" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="volumenum" mode="bibliography.mode">
+<xsl:template match="d:volumenum" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="orgdiv" mode="bibliography.mode">
+<xsl:template match="d:orgdiv" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="collabname" mode="bibliography.mode">
+<xsl:template match="d:collabname" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="confdates" mode="bibliography.mode">
+<xsl:template match="d:confdates" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="conftitle" mode="bibliography.mode">
+<xsl:template match="d:conftitle" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="confnum" mode="bibliography.mode">
+<xsl:template match="d:confnum" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="confsponsor" mode="bibliography.mode">
+<xsl:template match="d:confsponsor" mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+<xsl:template match="d:bibliocoverage|d:biblioid|d:bibliorelation|d:bibliosource"
               mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
   <xsl:apply-templates select="."/><!-- try the default mode -->
 </xsl:template>
 
-<xsl:template match="abbrev" mode="bibliomixed.mode">
+<xsl:template match="d:abbrev" mode="bibliomixed.mode">
   <xsl:if test="preceding-sibling::*">
     <fo:inline>
       <xsl:apply-templates mode="bibliomixed.mode"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="abstract" mode="bibliomixed.mode">
+<xsl:template match="d:abstract" mode="bibliomixed.mode">
   <fo:block start-indent="1in">
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="para" mode="bibliomixed.mode">
+<xsl:template match="d:para" mode="bibliomixed.mode">
   <fo:block>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="address" mode="bibliomixed.mode">
+<xsl:template match="d:address" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="affiliation" mode="bibliomixed.mode">
+<xsl:template match="d:affiliation" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="shortaffil" mode="bibliomixed.mode">
+<xsl:template match="d:shortaffil" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="jobtitle" mode="bibliomixed.mode">
+<xsl:template match="d:jobtitle" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="artpagenums" mode="bibliomixed.mode">
+<xsl:template match="d:artpagenums" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="author" mode="bibliomixed.mode">
+<xsl:template match="d:author" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:choose>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname" mode="bibliomixed.mode"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname" mode="bibliomixed.mode"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
+<xsl:template match="d:authorblurb|d:personblurb" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="bibliomixed.mode">
+<xsl:template match="d:authorgroup" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="authorinitials" mode="bibliomixed.mode">
+<xsl:template match="d:authorinitials" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="bibliomisc" mode="bibliomixed.mode">
+<xsl:template match="d:bibliomisc" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 
 <!-- ================================================== -->
 
-<xsl:template match="bibliomset" mode="bibliomixed.mode">
+<xsl:template match="d:bibliomset" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="bibliomset/title|bibliomset/citetitle" 
+<xsl:template match="d:bibliomset/d:title|d:bibliomset/d:citetitle" 
               mode="bibliomixed.mode">
   <xsl:variable name="relation" select="../@relation"/>
   <xsl:choose>
 
 <!-- ================================================== -->
 
-<xsl:template match="biblioset" mode="bibliomixed.mode">
+<xsl:template match="d:biblioset" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="citetitle" mode="bibliomixed.mode">
+<xsl:template match="d:citetitle" mode="bibliomixed.mode">
   <xsl:choose>
     <xsl:when test="@pubwork = 'article'">
       <xsl:call-template name="gentext.startquote"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="collab" mode="bibliomixed.mode">
+<xsl:template match="d:collab" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="confgroup" mode="bibliomixed.mode">
+<xsl:template match="d:confgroup" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="contractnum" mode="bibliomixed.mode">
+<xsl:template match="d:contractnum" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="contractsponsor" mode="bibliomixed.mode">
+<xsl:template match="d:contractsponsor" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="contrib" mode="bibliomixed.mode">
+<xsl:template match="d:contrib" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="copyright" mode="bibliomixed.mode">
+<xsl:template match="d:copyright" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="bibliomixed.mode">
+<xsl:template match="d:corpauthor" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="bibliomixed.mode">
+<xsl:template match="d:corpcredit" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="corpname" mode="bibliomixed.mode">
+<xsl:template match="d:corpname" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="date" mode="bibliomixed.mode">
+<xsl:template match="d:date" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="edition" mode="bibliomixed.mode">
+<xsl:template match="d:edition" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="editor" mode="bibliomixed.mode">
+<xsl:template match="d:editor" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="firstname" mode="bibliomixed.mode">
+<xsl:template match="d:firstname" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="honorific" mode="bibliomixed.mode">
+<xsl:template match="d:honorific" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="bibliomixed.mode">
+<xsl:template match="d:indexterm" mode="bibliomixed.mode">
   <xsl:apply-templates select="."/> 
 </xsl:template>
 
-<xsl:template match="invpartnumber" mode="bibliomixed.mode">
+<xsl:template match="d:invpartnumber" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="isbn" mode="bibliomixed.mode">
+<xsl:template match="d:isbn" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="issn" mode="bibliomixed.mode">
+<xsl:template match="d:issn" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="issuenum" mode="bibliomixed.mode">
+<xsl:template match="d:issuenum" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="lineage" mode="bibliomixed.mode">
+<xsl:template match="d:lineage" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="orgname" mode="bibliomixed.mode">
+<xsl:template match="d:orgname" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="bibliomixed.mode">
+<xsl:template match="d:othercredit" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="othername" mode="bibliomixed.mode">
+<xsl:template match="d:othername" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="bibliomixed.mode">
+<xsl:template match="d:pagenums" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="printhistory" mode="bibliomixed.mode">
+<xsl:template match="d:printhistory" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="productname" mode="bibliomixed.mode">
+<xsl:template match="d:productname" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="productnumber" mode="bibliomixed.mode">
+<xsl:template match="d:productnumber" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="bibliomixed.mode">
+<xsl:template match="d:pubdate" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="publisher" mode="bibliomixed.mode">
+<xsl:template match="d:publisher" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="publishername" mode="bibliomixed.mode">
+<xsl:template match="d:publishername" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="pubsnumber" mode="bibliomixed.mode">
+<xsl:template match="d:pubsnumber" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="bibliomixed.mode">
+<xsl:template match="d:releaseinfo" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="bibliomixed.mode">
+<xsl:template match="d:revhistory" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
+<xsl:template match="d:seriesvolnums" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="bibliomixed.mode">
+<xsl:template match="d:subtitle" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="surname" mode="bibliomixed.mode">
+<xsl:template match="d:surname" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="title" mode="bibliomixed.mode">
+<xsl:template match="d:title" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="bibliomixed.mode">
+<xsl:template match="d:titleabbrev" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="volumenum" mode="bibliomixed.mode">
+<xsl:template match="d:volumenum" mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+<xsl:template match="d:bibliocoverage|d:biblioid|d:bibliorelation|d:bibliosource"
               mode="bibliomixed.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliomixed.mode"/>
index 237dc54124a7a736a590f3303000f471847305cb..1c8401c1a48a25adbab378ef7f0da528d682fdc8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -13,7 +15,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="blockinfo|info">
+<xsl:template match="d:blockinfo|d:info">
   <!-- suppress -->
 </xsl:template>
 
@@ -35,7 +37,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="para">
+<xsl:template match="d:para">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
@@ -49,7 +51,7 @@
   </fo:block>
 </xsl:template>
 
-<xsl:template match="simpara">
+<xsl:template match="d:simpara">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
@@ -63,7 +65,7 @@
   </fo:block>
 </xsl:template>
 
-<xsl:template match="formalpara">
+<xsl:template match="d:formalpara">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 </xsl:template>
 
 <!-- Only use title from info -->
-<xsl:template match="formalpara/info">
-  <xsl:apply-templates select="title"/>
+<xsl:template match="d:formalpara/d:info">
+  <xsl:apply-templates select="d:title"/>
 </xsl:template>
 
-<xsl:template match="formalpara/title|formalpara/info/title">
+<xsl:template match="d:formalpara/d:title|d:formalpara/d:info/d:title">
   <xsl:variable name="titleStr">
       <xsl:apply-templates/>
   </xsl:variable>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="formalpara/para">
+<xsl:template match="d:formalpara/d:para">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="blockquote">
+<xsl:template match="d:blockquote">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
     </xsl:if>
     <xsl:call-template name="anchor"/>
     <fo:block>
-      <xsl:if test="title|info/title">
+      <xsl:if test="d:title|d:info/d:title">
         <fo:block xsl:use-attribute-sets="formal.title.properties">
           <xsl:apply-templates select="." mode="object.title.markup"/>
         </fo:block>
       <xsl:apply-templates select="*[local-name(.) != 'title'
                                    and local-name(.) != 'attribution']"/>
     </fo:block>
-    <xsl:if test="attribution">
+    <xsl:if test="d:attribution">
       <fo:block text-align="right">
         <!-- mdash -->
         <xsl:text>&#x2014;</xsl:text>
-        <xsl:apply-templates select="attribution"/>
+        <xsl:apply-templates select="d:attribution"/>
       </fo:block>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
 <!-- Use an em dash per Chicago Manual of Style and https://sourceforge.net/tracker/index.php?func=detail&aid=2793878&group_id=21935&atid=373747 -->
-<xsl:template match="epigraph">
+<xsl:template match="d:epigraph">
   <fo:block>
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
-    <xsl:if test="attribution">
+    <xsl:if test="d:attribution">
       <fo:inline>
         <xsl:text>&#x2014;</xsl:text>
-        <xsl:apply-templates select="attribution"/>
+        <xsl:apply-templates select="d:attribution"/>
       </fo:inline>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="attribution">
+<xsl:template match="d:attribution">
   <fo:inline><xsl:apply-templates/></fo:inline>
 </xsl:template>
 
         </fo:float>
       </xsl:variable>
       <xsl:choose>
-        <xsl:when test="$axf.extensions != 0 and self::sidebar">
+        <xsl:when test="$axf.extensions != 0 and self::d:sidebar">
           <fo:block xsl:use-attribute-sets="normal.para.spacing"
                     space-after="0pt"
                     space-after.precedence="force"
                       end-indent="{$start.indent} + {$width} + {$end.indent}">
               <xsl:attribute name="start-indent">
                 <xsl:choose>
-                  <xsl:when test="ancestor::para">
+                  <xsl:when test="ancestor::d:para">
                     <!-- Special case for handling inline floats
                          in Antenna House-->
                     <xsl:value-of select="concat('-', $body.start.indent)"/>
           </fo:float>
 
         </xsl:when>
-        <xsl:when test="$xep.extensions != 0 and self::sidebar">
+        <xsl:when test="$xep.extensions != 0 and self::d:sidebar">
           <!-- float needs some space above  to line up with following para -->
           <fo:block xsl:use-attribute-sets="normal.para.spacing">
             <xsl:copy-of select="$float"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="sidebar" name="sidebar">
+<xsl:template match="d:sidebar" name="sidebar">
   <!-- Also does margin notes -->
   <xsl:variable name="pi-type">
     <xsl:call-template name="pi.dbfo_float-type"/>
         <fo:block xsl:use-attribute-sets="sidebar.properties"
                   id="{$id}">
           <xsl:call-template name="sidebar.titlepage"/>
-          <xsl:apply-templates select="node()[not(self::title) and
-                                         not(self::info) and
-                                         not(self::sidebarinfo)]"/>
+          <xsl:apply-templates select="node()[not(self::d:title) and
+                                         not(self::d:info) and
+                                         not(self::d:sidebarinfo)]"/>
         </fo:block>
       </xsl:variable>
 
 
 </xsl:template>
 
-<xsl:template match="sidebar/title|sidebarinfo|sidebar/info"/>
+<xsl:template match="d:sidebar/d:title|d:sidebarinfo|d:sidebar/d:info"/>
 
-<xsl:template match="sidebar/title|sidebarinfo/title|sidebar/info/title"
+<xsl:template match="d:sidebar/d:title|d:sidebarinfo/d:title|d:sidebar/d:info/d:title"
               mode="titlepage.mode" priority="1">
   <fo:block xsl:use-attribute-sets="sidebar.title.properties">
     <xsl:apply-templates/>
 </xsl:template>
 
 <!-- Turn off para space-before if sidebar starts with a para, not title -->
-<xsl:template match="sidebar/*[1][self::para]">
+<xsl:template match="d:sidebar/*[1][self::d:para]">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 <xsl:template name="margin.note">
   <xsl:param name="content">
     <fo:block xsl:use-attribute-sets="margin.note.properties">
-      <xsl:if test="./title">
+      <xsl:if test="./d:title">
         <fo:block xsl:use-attribute-sets="margin.note.title.properties">
-          <xsl:apply-templates select="./title" mode="margin.note.title.mode"/>
+          <xsl:apply-templates select="./d:title" mode="margin.note.title.mode"/>
         </fo:block>
       </xsl:if>
       <xsl:apply-templates/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="sidebar/title" mode="margin.note.title.mode">
+<xsl:template match="d:sidebar/d:title" mode="margin.note.title.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="abstract">
+<xsl:template match="d:abstract">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="abstract/title|abstract/info/title">
+<xsl:template match="d:abstract/d:title|d:abstract/d:info/d:title">
   <fo:block xsl:use-attribute-sets="abstract.title.properties">
     <xsl:apply-templates/>
   </fo:block>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="msgset">
+<xsl:template match="d:msgset">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgentry">
+<xsl:template match="d:msgentry">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="simplemsgentry">
+<xsl:template match="d:simplemsgentry">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msg">
+<xsl:template match="d:msg">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msgmain">
+<xsl:template match="d:msgmain">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgsub">
+<xsl:template match="d:msgsub">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgrel">
+<xsl:template match="d:msgrel">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgtext">
+<xsl:template match="d:msgtext">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msginfo">
+<xsl:template match="d:msginfo">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msglevel">
+<xsl:template match="d:msglevel">
   <fo:block>
     <fo:inline font-weight="bold"
                keep-with-next.within-line="always">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="msgorig">
+<xsl:template match="d:msgorig">
   <fo:block>
     <fo:inline font-weight="bold"
                keep-with-next.within-line="always">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="msgaud">
+<xsl:template match="d:msgaud">
   <fo:block>
     <fo:inline font-weight="bold"
                keep-with-next.within-line="always">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="msgexplan">
+<xsl:template match="d:msgexplan">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msgexplan/title">
+<xsl:template match="d:msgexplan/d:title">
   <fo:block font-weight="bold"
             keep-with-next.within-column="always"
             hyphenate="false">
 <!-- ==================================================================== -->
 <!-- For better or worse, revhistory is allowed in content... -->
 
-<xsl:template match="revhistory">
+<xsl:template match="d:revhistory">
   <fo:table table-layout="fixed" xsl:use-attribute-sets="revhistory.table.properties">
     <xsl:call-template name="anchor"/>
     <fo:table-column column-number="1" column-width="proportional-column-width(1)"/>
         <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
           <fo:block xsl:use-attribute-sets="revhistory.title.properties">
             <xsl:choose>
-              <xsl:when test="title|info/title">
-                <xsl:apply-templates select="title|info/title" mode="titlepage.mode"/>
+              <xsl:when test="d:title|d:info/d:title">
+                <xsl:apply-templates select="d:title|d:info/d:title" mode="titlepage.mode"/>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:call-template name="gentext">
   </fo:table>
 </xsl:template>
 
-<xsl:template match="revhistory/title">
+<xsl:template match="d:revhistory/d:title">
   <!-- Handled in titlepage.mode -->
 </xsl:template>
 
-<xsl:template match="revhistory/revision">
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate"   select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
+<xsl:template match="d:revhistory/d:revision">
+  <xsl:variable name="revnumber" select="d:revnumber"/>
+  <xsl:variable name="revdate"   select="d:date"/>
+  <xsl:variable name="revauthor" select="d:authorinitials|d:author"/>
+  <xsl:variable name="revremark" select="d:revremark|d:revdescription"/>
   <fo:table-row>
     <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
       <fo:block>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="revision/revnumber">
+<xsl:template match="d:revision/d:revnumber">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/date">
+<xsl:template match="d:revision/d:date">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/authorinitials">
+<xsl:template match="d:revision/d:authorinitials">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/author">
+<xsl:template match="d:revision/d:author">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/revremark">
+<xsl:template match="d:revision/d:revremark">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/revdescription">
+<xsl:template match="d:revision/d:revdescription">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="ackno|acknowledgements[parent::article]">
+<xsl:template match="d:ackno|d:acknowledgements[parent::d:article]">
   <fo:block xsl:use-attribute-sets="normal.para.spacing">
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="highlights">
+<xsl:template match="d:highlights">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
index 05de1b3d666a62c4fcdf0b9833e6b82b99b233bd..f6a4412120d98813258603597290c15fb63731ac 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
                 xmlns:xverb="com.nwalsh.xalan.Verbatim"
                 xmlns:lxslt="http://xml.apache.org/xslt"
-                exclude-result-prefixes="sverb xverb lxslt"
+                exclude-result-prefixes="sverb xverb lxslt d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -18,8 +19,8 @@
 <lxslt:component prefix="xverb"
                  functions="insertCallouts"/>
 
-<xsl:template match="programlistingco|screenco">
-  <xsl:variable name="verbatim" select="programlisting|screen"/>
+<xsl:template match="d:programlistingco|d:screenco">
+  <xsl:variable name="verbatim" select="d:programlisting|d:screen"/>
   <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
 
   <xsl:choose>
       <xsl:variable name="rtf-with-callouts">
         <xsl:choose>
           <xsl:when test="contains($vendor, 'SAXON ')">
-            <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
+            <xsl:copy-of select="sverb:insertCallouts(d:areaspec,$rtf)"/>
           </xsl:when>
           <xsl:when test="contains($vendor, 'Apache Software Foundation')">
-            <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
+            <xsl:copy-of select="xverb:insertCallouts(d:areaspec,$rtf)"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:message terminate="yes">
           <xsl:call-template name="number.rtf.lines">
             <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
             <xsl:with-param name="pi.context"
-                            select="programlisting|screen"/>
+                            select="d:programlisting|d:screen"/>
           </xsl:call-template>
-          <xsl:apply-templates select="calloutlist"/>
+          <xsl:apply-templates select="d:calloutlist"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:copy-of select="$rtf-with-callouts"/>
-          <xsl:apply-templates select="calloutlist"/>
+          <xsl:apply-templates select="d:calloutlist"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="areaspec|areaset|area">
+<xsl:template match="d:areaspec|d:areaset|d:area">
 </xsl:template>
 
-<xsl:template match="areaset" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
+<xsl:template match="d:areaset" mode="conumber">
+  <xsl:number count="d:area|d:areaset" format="1"/>
 </xsl:template>
 
-<xsl:template match="area" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
+<xsl:template match="d:area" mode="conumber">
+  <xsl:number count="d:area|d:areaset" format="1"/>
 </xsl:template>
 
-<xsl:template match="co">
+<xsl:template match="d:co">
   <xsl:param name="coref"/> 
   <!-- link to the callout? -->
   <xsl:variable name="linkend">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="coref">
+<xsl:template match="d:coref">
   <!-- this relies on the fact that we can process the "co" that's -->
   <!-- "over there" as if it were "right here" -->
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="co" mode="callout-bug">
+<xsl:template match="d:co" mode="callout-bug">
   <xsl:call-template name="callout-bug">
     <xsl:with-param name="conum">
-      <xsl:number count="co"
+      <xsl:number count="d:co"
                   level="any"
-                  from="programlisting|screen|literallayout|synopsis"
+                  from="d:programlisting|d:screen|d:literallayout|d:synopsis"
                   format="1"/>
     </xsl:with-param>
   </xsl:call-template>
index d1df171736e89078a9f33de3b39198aca55eb2ad..a8b2a5e1cc9f2ed3a89d8168ef37cdbcfb987ee8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 
   <xsl:variable name="level">
     <xsl:choose>
-      <xsl:when test="ancestor::section">
-        <xsl:value-of select="count(ancestor::section)+1"/>
+      <xsl:when test="ancestor::d:section">
+        <xsl:value-of select="count(ancestor::d:section)+1"/>
       </xsl:when>
-      <xsl:when test="ancestor::sect5">6</xsl:when>
-      <xsl:when test="ancestor::sect4">5</xsl:when>
-      <xsl:when test="ancestor::sect3">4</xsl:when>
-      <xsl:when test="ancestor::sect2">3</xsl:when>
-      <xsl:when test="ancestor::sect1">2</xsl:when>
+      <xsl:when test="ancestor::d:sect5">6</xsl:when>
+      <xsl:when test="ancestor::d:sect4">5</xsl:when>
+      <xsl:when test="ancestor::d:sect3">4</xsl:when>
+      <xsl:when test="ancestor::d:sect2">3</xsl:when>
+      <xsl:when test="ancestor::d:sect1">2</xsl:when>
       <xsl:otherwise>1</xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="dedication" mode="dedication">
+<xsl:template match="d:dedication" mode="dedication">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
-<xsl:template match="dedication/docinfo"></xsl:template>
-<xsl:template match="dedication/title"></xsl:template>
-<xsl:template match="dedication/subtitle"></xsl:template>
-<xsl:template match="dedication/titleabbrev"></xsl:template>
+<xsl:template match="d:dedication"></xsl:template> <!-- see mode="dedication" -->
+<xsl:template match="d:dedication/d:docinfo"></xsl:template>
+<xsl:template match="d:dedication/d:title"></xsl:template>
+<xsl:template match="d:dedication/d:subtitle"></xsl:template>
+<xsl:template match="d:dedication/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="acknowledgements" mode="acknowledgements">
+<xsl:template match="d:acknowledgements" mode="acknowledgements">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="acknowledgements"></xsl:template>
-<xsl:template match="acknowledgements/info"></xsl:template>
-<xsl:template match="acknowledgements/title"></xsl:template>
-<xsl:template match="acknowledgements/titleabbrev"></xsl:template>
-<xsl:template match="acknowledgements/subtitle"></xsl:template>
+<xsl:template match="d:acknowledgements"></xsl:template>
+<xsl:template match="d:acknowledgements/d:info"></xsl:template>
+<xsl:template match="d:acknowledgements/d:title"></xsl:template>
+<xsl:template match="d:acknowledgements/d:titleabbrev"></xsl:template>
+<xsl:template match="d:acknowledgements/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="colophon">
+<xsl:template match="d:colophon">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="colophon/title"></xsl:template>
-<xsl:template match="colophon/subtitle"></xsl:template>
-<xsl:template match="colophon/titleabbrev"></xsl:template>
+<xsl:template match="d:colophon/d:title"></xsl:template>
+<xsl:template match="d:colophon/d:subtitle"></xsl:template>
+<xsl:template match="d:colophon/d:titleabbrev"></xsl:template>
 
 <!-- article/colophon has no page sequence -->
-<xsl:template match="article/colophon">
+<xsl:template match="d:article/d:colophon">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="preface">
+<xsl:template match="d:preface">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
-<xsl:template match="preface/info"></xsl:template>
-<xsl:template match="preface/title"></xsl:template>
-<xsl:template match="preface/titleabbrev"></xsl:template>
-<xsl:template match="preface/subtitle"></xsl:template>
+<xsl:template match="d:preface/d:docinfo|d:prefaceinfo"></xsl:template>
+<xsl:template match="d:preface/d:info"></xsl:template>
+<xsl:template match="d:preface/d:title"></xsl:template>
+<xsl:template match="d:preface/d:titleabbrev"></xsl:template>
+<xsl:template match="d:preface/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="chapter">
+<xsl:template match="d:chapter">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
-<xsl:template match="chapter/info"></xsl:template>
-<xsl:template match="chapter/title"></xsl:template>
-<xsl:template match="chapter/titleabbrev"></xsl:template>
-<xsl:template match="chapter/subtitle"></xsl:template>
+<xsl:template match="d:chapter/d:docinfo|d:chapterinfo"></xsl:template>
+<xsl:template match="d:chapter/d:info"></xsl:template>
+<xsl:template match="d:chapter/d:title"></xsl:template>
+<xsl:template match="d:chapter/d:titleabbrev"></xsl:template>
+<xsl:template match="d:chapter/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="appendix">
+<xsl:template match="d:appendix">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
-<xsl:template match="appendix/info"></xsl:template>
-<xsl:template match="appendix/title"></xsl:template>
-<xsl:template match="appendix/titleabbrev"></xsl:template>
-<xsl:template match="appendix/subtitle"></xsl:template>
+<xsl:template match="d:appendix/d:docinfo|d:appendixinfo"></xsl:template>
+<xsl:template match="d:appendix/d:info"></xsl:template>
+<xsl:template match="d:appendix/d:title"></xsl:template>
+<xsl:template match="d:appendix/d:titleabbrev"></xsl:template>
+<xsl:template match="d:appendix/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="article">
+<xsl:template match="d:article">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="article/artheader"></xsl:template>
-<xsl:template match="article/articleinfo"></xsl:template>
-<xsl:template match="article/info"></xsl:template>
-<xsl:template match="article/title"></xsl:template>
-<xsl:template match="article/subtitle"></xsl:template>
-<xsl:template match="article/titleabbrev"></xsl:template>
+<xsl:template match="d:article/d:artheader"></xsl:template>
+<xsl:template match="d:article/d:articleinfo"></xsl:template>
+<xsl:template match="d:article/d:info"></xsl:template>
+<xsl:template match="d:article/d:title"></xsl:template>
+<xsl:template match="d:article/d:subtitle"></xsl:template>
+<xsl:template match="d:article/d:titleabbrev"></xsl:template>
 
-<xsl:template match="article/appendix">
+<xsl:template match="d:article/d:appendix">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:if test="contains($toc.params,'figure') and .//figure">
+  <xsl:if test="contains($toc.params,'figure') and .//d:figure">
     <xsl:call-template name="component.list.of.titles">
       <xsl:with-param name="titles" select="'figure'"/>
-      <xsl:with-param name="nodes" select=".//figure"/>
+      <xsl:with-param name="nodes" select=".//d:figure"/>
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:if test="contains($toc.params,'table') and .//table">
+  <xsl:if test="contains($toc.params,'table') and .//d:table">
     <xsl:call-template name="component.list.of.titles">
       <xsl:with-param name="titles" select="'table'"/>
-      <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
+      <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:if test="contains($toc.params,'example') and .//example">
+  <xsl:if test="contains($toc.params,'example') and .//d:example">
     <xsl:call-template name="component.list.of.titles">
       <xsl:with-param name="titles" select="'example'"/>
-      <xsl:with-param name="nodes" select=".//example"/>
+      <xsl:with-param name="nodes" select=".//d:example"/>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params,'equation') and 
-                 .//equation[title or info/title]">
+                 .//d:equation[d:title or d:info/d:title]">
     <xsl:call-template name="component.list.of.titles">
       <xsl:with-param name="titles" select="'equation'"/>
       <xsl:with-param name="nodes" 
-                      select=".//equation[title or info/title]"/>
+                      select=".//d:equation[d:title or d:info/d:title]"/>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params,'procedure') and 
-                 .//procedure[title or info/title]">
+                 .//d:procedure[d:title or d:info/d:title]">
     <xsl:call-template name="component.list.of.titles">
       <xsl:with-param name="titles" select="'procedure'"/>
       <xsl:with-param name="nodes" 
-                      select=".//procedure[title or info/title]"/>
+                      select=".//d:procedure[d:title or d:info/d:title]"/>
     </xsl:call-template>
   </xsl:if>
 
 
 </xsl:template>
 
-<xsl:template match="topic">
+<xsl:template match="d:topic">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="/topic | book/topic" name="topic.page.sequence">
+<xsl:template match="/d:topic | d:book/d:topic" name="topic.page.sequence">
   <xsl:variable name="master-reference">
     <xsl:call-template name="select.pagemaster"/>
   </xsl:variable>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="topic/info"></xsl:template>
-<xsl:template match="topic/title"></xsl:template>
-<xsl:template match="topic/subtitle"></xsl:template>
-<xsl:template match="topic/titleabbrev"></xsl:template>
+<xsl:template match="d:topic/d:info"></xsl:template>
+<xsl:template match="d:topic/d:title"></xsl:template>
+<xsl:template match="d:topic/d:subtitle"></xsl:template>
+<xsl:template match="d:topic/d:titleabbrev"></xsl:template>
 
 </xsl:stylesheet>
 
index 47ec043bb42c02ccd7c6355e19f6102e3b6e3549..69c850f82b9ecc20ca914a1b286b2132838af0cf 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
 
 <!-- ==================================================================== -->
 
-<xsl:template match="set">
+<xsl:template match="d:set">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <xsl:variable name="preamble"
-                select="*[not(self::book or self::set or self::setindex)]"/>
+                select="*[not(self::d:book or self::d:set or self::d:setindex)]"/>
 
-  <xsl:variable name="content" select="book|set|setindex"/>
+  <xsl:variable name="content" select="d:book|d:set|d:setindex"/>
 
   <xsl:variable name="titlepage-master-reference">
     <xsl:call-template name="select.pagemaster">
   <xsl:apply-templates select="$content"/>
 </xsl:template>
 
-<xsl:template match="set/setinfo"></xsl:template>
-<xsl:template match="set/title"></xsl:template>
-<xsl:template match="set/subtitle"></xsl:template>
-<xsl:template match="set/titleabbrev"></xsl:template>
+<xsl:template match="d:set/d:setinfo"></xsl:template>
+<xsl:template match="d:set/d:title"></xsl:template>
+<xsl:template match="d:set/d:subtitle"></xsl:template>
+<xsl:template match="d:set/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="book">
+<xsl:template match="d:book">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <xsl:variable name="preamble"
-                select="title|subtitle|titleabbrev|bookinfo|info"/>
+                select="d:title|d:subtitle|d:titleabbrev|d:bookinfo|d:info"/>
 
   <xsl:variable name="content"
-                select="node()[not(self::title or self::subtitle
-                            or self::titleabbrev
-                            or self::info
-                            or self::bookinfo)]"/>
+                select="node()[not(self::d:title or self::d:subtitle
+                            or self::d:titleabbrev
+                            or self::d:info
+                            or self::d:bookinfo)]"/>
 
   <xsl:variable name="titlepage-master-reference">
     <xsl:call-template name="select.pagemaster">
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:apply-templates select="dedication" mode="dedication"/>
-  <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/>
+  <xsl:apply-templates select="d:dedication" mode="dedication"/>
+  <xsl:apply-templates select="d:acknowledgements" mode="acknowledgements"/>
 
   <xsl:call-template name="make.book.tocs"/>
 
 
 </xsl:template>
 
-<xsl:template match="book/bookinfo"></xsl:template>
-<xsl:template match="book/info"></xsl:template>
-<xsl:template match="book/title"></xsl:template>
-<xsl:template match="book/subtitle"></xsl:template>
-<xsl:template match="book/titleabbrev"></xsl:template>
+<xsl:template match="d:book/d:bookinfo"></xsl:template>
+<xsl:template match="d:book/d:info"></xsl:template>
+<xsl:template match="d:book/d:title"></xsl:template>
+<xsl:template match="d:book/d:subtitle"></xsl:template>
+<xsl:template match="d:book/d:titleabbrev"></xsl:template>
 
 <!-- Placeholder templates -->
 <xsl:template name="front.cover"/>
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:if test="contains($toc.params,'figure') and .//figure">
+  <xsl:if test="contains($toc.params,'figure') and .//d:figure">
     <xsl:call-template name="page.sequence">
       <xsl:with-param name="master-reference"
                       select="$lot-master-reference"/>
       <xsl:with-param name="content">
         <xsl:call-template name="list.of.titles">
           <xsl:with-param name="titles" select="'figure'"/>
-          <xsl:with-param name="nodes" select=".//figure"/>
+          <xsl:with-param name="nodes" select=".//d:figure"/>
         </xsl:call-template>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:if test="contains($toc.params,'table') and .//table">
+  <xsl:if test="contains($toc.params,'table') and .//d:table">
     <xsl:call-template name="page.sequence">
       <xsl:with-param name="master-reference"
                       select="$lot-master-reference"/>
       <xsl:with-param name="content">
         <xsl:call-template name="list.of.titles">
           <xsl:with-param name="titles" select="'table'"/>
-          <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
+          <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
         </xsl:call-template>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:if>
 
-  <xsl:if test="contains($toc.params,'example') and .//example">
+  <xsl:if test="contains($toc.params,'example') and .//d:example">
     <xsl:call-template name="page.sequence">
       <xsl:with-param name="master-reference"
                       select="$lot-master-reference"/>
       <xsl:with-param name="content">
         <xsl:call-template name="list.of.titles">
           <xsl:with-param name="titles" select="'example'"/>
-          <xsl:with-param name="nodes" select=".//example"/>
+          <xsl:with-param name="nodes" select=".//d:example"/>
         </xsl:call-template>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params,'equation') and 
-                 .//equation[title or info/title]">
+                 .//d:equation[d:title or d:info/d:title]">
     <xsl:call-template name="page.sequence">
       <xsl:with-param name="master-reference"
                       select="$lot-master-reference"/>
         <xsl:call-template name="list.of.titles">
           <xsl:with-param name="titles" select="'equation'"/>
           <xsl:with-param name="nodes" 
-                          select=".//equation[title or info/title]"/>
+                          select=".//d:equation[d:title or d:info/d:title]"/>
         </xsl:call-template>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params,'procedure') and 
-                 .//procedure[title or info/title]">
+                 .//d:procedure[d:title or d:info/d:title]">
     <xsl:call-template name="page.sequence">
       <xsl:with-param name="master-reference"
                       select="$lot-master-reference"/>
         <xsl:call-template name="list.of.titles">
           <xsl:with-param name="titles" select="'procedure'"/>
           <xsl:with-param name="nodes" 
-                          select=".//procedure[title or info/title]"/>
+                          select=".//d:procedure[d:title or d:info/d:title]"/>
         </xsl:call-template>
       </xsl:with-param>
     </xsl:call-template>
 </xsl:template>
 <!-- ==================================================================== -->
 
-<xsl:template match="part">
-  <xsl:if test="not(partintro)">
+<xsl:template match="d:part">
+  <xsl:if test="not(d:partintro)">
     <xsl:apply-templates select="." mode="part.titlepage.mode"/>
     <xsl:call-template name="generate.part.toc"/>
   </xsl:if>
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="part" mode="part.titlepage.mode">
+<xsl:template match="d:part" mode="part.titlepage.mode">
   <!-- done this way to force the context node to be the part -->
   <xsl:param name="additional.content"/>
 
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="part/docinfo|partinfo"></xsl:template>
-<xsl:template match="part/info"></xsl:template>
-<xsl:template match="part/title"></xsl:template>
-<xsl:template match="part/subtitle"></xsl:template>
-<xsl:template match="part/titleabbrev"></xsl:template>
+<xsl:template match="d:part/d:docinfo|d:partinfo"></xsl:template>
+<xsl:template match="d:part/d:info"></xsl:template>
+<xsl:template match="d:part/d:title"></xsl:template>
+<xsl:template match="d:part/d:subtitle"></xsl:template>
+<xsl:template match="d:part/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:variable name="nodes" select="$part/reference|
-                                     $part/preface|
-                                     $part/chapter|
-                                     $part/appendix|
-                                     $part/article|
-                                     $part/bibliography|
-                                     $part/glossary|
-                                     $part/index"/>
+  <xsl:variable name="nodes" select="$part/d:reference|
+                                     $part/d:preface|
+                                     $part/d:chapter|
+                                     $part/d:appendix|
+                                     $part/d:article|
+                                     $part/d:bibliography|
+                                     $part/d:glossary|
+                                     $part/d:index"/>
 
   <xsl:if test="count($nodes) &gt; 0 and contains($toc.params, 'toc')">
     <fo:page-sequence hyphenate="{$hyphenate}"
 
 <!-- ==================================================================== -->
 
-<xsl:template match="part/partintro">
+<xsl:template match="d:part/d:partintro">
   <xsl:apply-templates select=".." mode="part.titlepage.mode">
     <xsl:with-param name="additional.content">
-      <xsl:if test="title">
+      <xsl:if test="d:title">
         <xsl:call-template name="partintro.titlepage"/>
       </xsl:if>
       <xsl:apply-templates/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="partintro/title"></xsl:template>
-<xsl:template match="partintro/subtitle"></xsl:template>
-<xsl:template match="partintro/titleabbrev"></xsl:template>
+<xsl:template match="d:partintro/d:title"></xsl:template>
+<xsl:template match="d:partintro/d:subtitle"></xsl:template>
+<xsl:template match="d:partintro/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="book" mode="division.number">
-  <xsl:number from="set" count="book" format="1."/>
+<xsl:template match="d:book" mode="division.number">
+  <xsl:number from="d:set" count="d:book" format="1."/>
 </xsl:template>
 
-<xsl:template match="part" mode="division.number">
-  <xsl:number from="book" count="part" format="I."/>
+<xsl:template match="d:part" mode="division.number">
+  <xsl:number from="d:book" count="d:part" format="I."/>
 </xsl:template>
 
 <!-- ==================================================================== -->
index f4b490d7edecea922b2dcb5894a72f89c133dff5..5d4058159cce8637ed6adf790994706cba41d4df 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:ng="http://docbook.org/docbook-ng"
                 xmlns:db="http://docbook.org/ns/docbook"
-                exclude-result-prefixes="db ng exsl"
+                exclude-result-prefixes="db ng exsl d"
                 version='1.0'>
 
 <!-- It is important to use indent="no" here, otherwise verbatim -->
@@ -76,7 +77,7 @@
 <xsl:include href="../html/chunker.xsl"/>
 <xsl:include href="annotations.xsl"/>
 <xsl:include href="publishers.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
+<xsl:include href="../common/addns.xsl"/>
 
 <xsl:include href="fop.xsl"/>
 <xsl:include href="fop1.xsl"/>
   <xsl:choose>
     <!-- fix namespace if necessary -->
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
-      <xsl:variable name="no.namespace">
-        <xsl:apply-templates select="/*" mode="stripNS"/>
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
+      <xsl:variable name="with.namespace">
+        <xsl:apply-templates select="/*" mode="addNS"/>
       </xsl:variable>
 
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
       <!-- DEBUG: uncomment to save namespace-fixed document.
         <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
         <xsl:with-param name="method" select="'xml'"/>
         <xsl:with-param name="content">
-          <xsl:copy-of select="exsl:node-set($no.namespace)"/>
+          <xsl:copy-of select="exsl:node-set($with.namespace)"/>
         </xsl:with-param>
       </xsl:call-template>
       -->
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
 
   <xsl:variable name="title">
     <xsl:choose>
-      <xsl:when test="$document.element/title | $document.element/info/title">
+      <xsl:when test="$document.element/d:title | $document.element/d:info/d:title">
         <xsl:value-of 
-             select="($document.element/title | $document.element/info/title)[1]"/>
+             select="($document.element/d:title | $document.element/d:info/d:title)[1]"/>
       </xsl:when>
       <xsl:otherwise>[could not find document title]</xsl:otherwise>
     </xsl:choose>
   <xsl:apply-templates select="*" mode="bookmark"/>
 </xsl:template>
 
-<xsl:template match="set|book|part|reference|
-                     preface|chapter|appendix|article|topic
-                     |glossary|bibliography|index|setindex
-                     |refentry
-                     |sect1|sect2|sect3|sect4|sect5|section"
+<xsl:template match="d:set|d:book|d:part|d:reference|
+                     d:preface|d:chapter|d:appendix|d:article|d:topic
+                     |d:glossary|d:bibliography|d:index|d:setindex
+                     |d:refentry
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section"
               mode="bookmark">
 
   <xsl:variable name="id">
   <!-- If the object is a set or book, generate a bookmark for the toc -->
 
   <xsl:choose>
-    <xsl:when test="self::index and $generate.index = 0"/>
+    <xsl:when test="self::d:index and $generate.index = 0"/>
     <xsl:when test="parent::*">
       <fo:bookmark internal-destination="{$id}">
         <xsl:attribute name="starting-state">
       </xsl:variable>
 
       <xsl:if test="contains($toc.params, 'toc')
-                    and (book|part|reference|preface|chapter|appendix|article|topic
-                         |glossary|bibliography|index|setindex
-                         |refentry
-                         |sect1|sect2|sect3|sect4|sect5|section)">
+                    and (d:book|d:part|d:reference|d:preface|d:chapter|d:appendix|d:article|d:topic
+                         |d:glossary|d:bibliography|d:index|d:setindex
+                         |d:refentry
+                         |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section)">
         <fo:bookmark internal-destination="toc...{$id}">
           <fo:bookmark-title>
             <xsl:call-template name="gentext">
index 965e79263127f61320acdc6094f8ab596fe38ae3..2ce534bafc907177c44254193f66f8e8c5e5c2d5 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -48,11 +49,11 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="productionset">
+<xsl:template match="d:productionset">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:choose>
-    <xsl:when test="title">
+    <xsl:when test="d:title">
       <fo:block id="{$id}" xsl:use-attribute-sets="formal.object.properties">
         <xsl:call-template name="formal.object.heading">
           <xsl:with-param name="placement" select="'before'"/>
@@ -65,7 +66,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
           <fo:table-column column-number="4" column-width="52%"/>
           <fo:table-column column-number="5" column-width="25%"/>
           <fo:table-body start-indent="0pt" end-indent="0pt">
-            <xsl:apply-templates select="production|productionrecap"/>
+            <xsl:apply-templates select="d:production|d:productionrecap"/>
           </fo:table-body>
         </fo:table>
       </fo:block>
@@ -78,18 +79,18 @@ to be incomplete. Don't forget to read the source, too :-)</para>
         <fo:table-column column-number="4" column-width="52%"/>
         <fo:table-column column-number="5" column-width="25%"/>
         <fo:table-body start-indent="0pt" end-indent="0pt">
-          <xsl:apply-templates select="production|productionrecap"/>
+          <xsl:apply-templates select="d:production|d:productionrecap"/>
         </fo:table-body>
       </fo:table>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="productionset/title">
+<xsl:template match="d:productionset/d:title">
   <!-- suppressed -->
 </xsl:template>
 
-<xsl:template match="production">
+<xsl:template match="d:production">
   <xsl:param name="recap" select="false()"/>
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   <fo:table-row>
@@ -106,12 +107,12 @@ to be incomplete. Don't forget to read the source, too :-)</para>
           <xsl:when test="$recap">
             <fo:basic-link internal-destination="{$id}"
                            xsl:use-attribute-sets="xref.properties">
-              <xsl:apply-templates select="lhs"/>
+              <xsl:apply-templates select="d:lhs"/>
             </fo:basic-link>
           </xsl:when>
           <xsl:otherwise>
             <fo:wrapper id="{$id}">
-              <xsl:apply-templates select="lhs"/>
+              <xsl:apply-templates select="d:lhs"/>
             </fo:wrapper>
           </xsl:otherwise>
         </xsl:choose>
@@ -124,16 +125,16 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </fo:table-cell>
     <fo:table-cell>
       <fo:block>
-        <xsl:apply-templates select="rhs"/>
+        <xsl:apply-templates select="d:rhs"/>
         <xsl:copy-of select="$ebnf.statement.terminator"/>
       </fo:block>
     </fo:table-cell>
     <fo:table-cell border-start-width="3pt">
       <fo:block text-align="start">
         <xsl:choose>
-          <xsl:when test="rhs/lineannotation|constraint">
-            <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
-            <xsl:apply-templates select="constraint"/>
+          <xsl:when test="d:rhs/d:lineannotation|d:constraint">
+            <xsl:apply-templates select="d:rhs/d:lineannotation" mode="rhslo"/>
+            <xsl:apply-templates select="d:constraint"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:text>&#160;</xsl:text>
@@ -144,7 +145,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </fo:table-row>
 </xsl:template>
 
-<xsl:template match="productionrecap">
+<xsl:template match="d:productionrecap">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
@@ -169,15 +170,15 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="lhs">
+<xsl:template match="d:lhs">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="rhs">
+<xsl:template match="d:rhs">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="nonterminal">
+<xsl:template match="d:nonterminal">
   <xsl:variable name="linkend">
     <xsl:call-template name="xpointer.idref">
       <xsl:with-param name="xpointer" select="@def"/>
@@ -236,7 +237,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
           <xsl:when test="$linkend != ''">
             <xsl:variable name="targets" select="key('id',$linkend)"/>
             <xsl:variable name="target" select="$targets[1]"/>
-            <xsl:apply-templates select="$target/lhs"/>
+            <xsl:apply-templates select="$target/d:lhs"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:text>???</xsl:text>
@@ -247,17 +248,17 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </fo:basic-link>
 </xsl:template>
 
-<xsl:template match="rhs/lineannotation">
+<xsl:template match="d:rhs/d:lineannotation">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="rhs/lineannotation" mode="rhslo">
+<xsl:template match="d:rhs/d:lineannotation" mode="rhslo">
   <xsl:text>/*&#160;</xsl:text>
   <xsl:apply-templates/>
   <xsl:text>&#160;*/</xsl:text>
 </xsl:template>
 
-<xsl:template match="constraint">
+<xsl:template match="d:constraint">
   <xsl:call-template name="check.id.unique">
     <xsl:with-param name="linkend" select="@linkend"/>
   </xsl:call-template>
@@ -275,7 +276,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:if test="preceding-sibling::constraint">
+  <xsl:if test="preceding-sibling::d:constraint">
     <fo:inline linefeed-treatment="preserve">&#xA;</fo:inline>
   </xsl:if>
   <xsl:text>[&#160;</xsl:text>
@@ -304,14 +305,14 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   <xsl:text>&#160;]</xsl:text>
 </xsl:template>
 
-<xsl:template match="constraintdef">
+<xsl:template match="d:constraintdef">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   <fo:block id="{$id}">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="constraintdef/title">
+<xsl:template match="d:constraintdef/d:title">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
index b0df05b19e11d0e6d99b2818cb369cf0eb2771c4..6ede70b648bf50f8f5143c989d1ee27de9df7b4b 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:set="http://exslt.org/sets"
-                exclude-result-prefixes="exsl set"
+                exclude-result-prefixes="exsl set d"
                 version="1.0">
 
 <!-- ********************************************************************
index f16f182e821f5f42e5805741a0ecc54013ff8552..30d726773027b135667773d1a601691cd20c86ab 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
index 4ba47afc53fec278fadb813ad237fefd7fb29da1..f4b8fa4d55c5671816ea6d1272e70aec20657714 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
                 xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl xlink"
+                exclude-result-prefixes="exsl xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -29,9 +30,9 @@
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="footnote">
+<xsl:template match="d:footnote">
   <xsl:choose>
-    <xsl:when test="ancestor::table or ancestor::informaltable">
+    <xsl:when test="ancestor::d:table or ancestor::d:informaltable">
       <xsl:call-template name="format.footnote.mark">
         <xsl:with-param name="mark">
           <xsl:apply-templates select="." mode="footnote.number"/>
@@ -55,7 +56,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="footnoteref">
+<xsl:template match="d:footnoteref">
   <xsl:variable name="footnote" select="key('id',@linkend)"/>
 
   <xsl:if test="not(local-name($footnote) = 'footnote')">
@@ -74,14 +75,14 @@ linkend/id: <xsl:value-of select="@linkend"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="footnote" mode="footnote.number">
+<xsl:template match="d:footnote" mode="footnote.number">
   <xsl:choose>
     <xsl:when test="string-length(@label) != 0">
       <xsl:value-of select="@label"/>
     </xsl:when>
-    <xsl:when test="ancestor::table or ancestor::informaltable">
+    <xsl:when test="ancestor::d:table or ancestor::d:informaltable">
       <xsl:variable name="tfnum">
-        <xsl:number level="any" from="table|informaltable" format="1"/>
+        <xsl:number level="any" from="d:table|d:informaltable" format="1"/>
       </xsl:variable>
 
       <xsl:choose>
@@ -89,7 +90,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
           <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number level="any" from="table|informaltable"
+          <xsl:number level="any" from="d:table|d:informaltable"
                       format="{$table.footnote.number.format}"/>
         </xsl:otherwise>
       </xsl:choose>
@@ -115,13 +116,13 @@ linkend/id: <xsl:value-of select="@linkend"/>
         <!-- * non-zero -->
         <!-- FIXME: list in @from is probably not complete -->
         <xsl:number level="any" 
-                    from="chapter|appendix|preface|article|refentry|bibliography" 
-                    count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)]
-                    |ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::footnote)][$ulink.show != 0]
+                    from="d:chapter|d:appendix|d:preface|d:article|d:refentry|d:bibliography"
+                    count="d:footnote[not(@label)][not(ancestor::d:table) and not(ancestor::d:informaltable)]
+                    |d:ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::d:footnote)][$ulink.show != 0]
                     |*[node()][@xlink:href][not(@xlink:href = .)][not(starts-with(@xlink:href,'#'))]
                       [not(contains(@xlink:href,'#') and @xlink:role = $xolink.role)]
                       [not(@xlink:type) or @xlink:type='simple']
-                      [not(ancestor::footnote)][$ulink.footnotes != 0][$ulink.show != 0]
+                      [not(ancestor::d:footnote)][$ulink.footnotes != 0][$ulink.show != 0]
                     "
                     format="1"/>
       </xsl:variable>
@@ -143,7 +144,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
   <xsl:variable name="footnote.mark">
     <xsl:call-template name="format.footnote.mark">
       <xsl:with-param name="mark">
-        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
+        <xsl:apply-templates select="ancestor::d:footnote" mode="footnote.number"/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:variable>
@@ -170,23 +171,23 @@ linkend/id: <xsl:value-of select="@linkend"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="footnote/para[1]
-                     |footnote/simpara[1]
-                     |footnote/formalpara[1]"
+<xsl:template match="d:footnote/d:para[1]
+                     |d:footnote/d:simpara[1]
+                     |d:footnote/d:formalpara[1]"
               priority="2">
   <!-- this only works if the first thing in a footnote is a para, -->
   <!-- which is ok, because it usually is. -->
   <fo:block>
     <xsl:call-template name="format.footnote.mark">
       <xsl:with-param name="mark">
-        <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
+        <xsl:apply-templates select="ancestor::d:footnote" mode="footnote.number"/>
       </xsl:with-param>
     </xsl:call-template>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="footnote" mode="table.footnote.mode">
+<xsl:template match="d:footnote" mode="table.footnote.mode">
   <xsl:choose>
     <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'">
       <fo:block xsl:use-attribute-sets="table.footnote.properties">
index 8929d6f00ac2f1580fc77ccf1e4892ccddfed632..44fb4b98ac168f69ac85d6e2bcb4bc960b6dae92 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0' encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:fox="http://xml.apache.org/fop/extensions"
                 version='1.0'>
 
@@ -30,10 +32,10 @@ translates characters with code>255 back to ASCII.
   <xsl:apply-templates select="*" mode="fop.outline"/>
 </xsl:template>
 
-<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex
-                     |refentry
-                     |sect1|sect2|sect3|sect4|sect5|section"
+<xsl:template match="d:set|d:book|d:part|d:reference|d:preface|d:chapter|d:appendix|d:article
+                     |d:glossary|d:bibliography|d:index|d:setindex
+                     |d:refentry
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section"
               mode="fop.outline">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
@@ -46,7 +48,7 @@ translates characters with code>255 back to ASCII.
   <!-- If the object is a set or book, generate a bookmark for the toc -->
 
   <xsl:choose>
-    <xsl:when test="self::index and $generate.index = 0"/>     
+    <xsl:when test="self::d:index and $generate.index = 0"/>
     <xsl:when test="parent::*">
       <fox:outline internal-destination="{$id}">
         <fox:label>
@@ -69,10 +71,10 @@ translates characters with code>255 back to ASCII.
       </xsl:variable>
 
       <xsl:if test="contains($toc.params, 'toc')
-                    and (book|part|reference|preface|chapter|appendix|article
-                         |glossary|bibliography|index|setindex
-                         |refentry
-                         |sect1|sect2|sect3|sect4|sect5|section)">
+                    and (d:book|d:part|d:reference|d:preface|d:chapter|d:appendix|d:article
+                         |d:glossary|d:bibliography|d:index|d:setindex
+                         |d:refentry
+                         |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section)">
         <fox:outline internal-destination="toc...{$id}">
           <fox:label>
             <xsl:call-template name="gentext">
index cc543b43d46f8dcdbc181b853575b83170ca45cd..1544f9f81a58001c8c9052c17c190581676fbd13 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
   <xsl:apply-templates select="*" mode="fop1.outline"/>
 </xsl:template>
 
-<xsl:template match="set|book|part|reference|
-                     preface|chapter|appendix|article|topic
-                     |glossary|bibliography|index|setindex
-                     |refentry|refsynopsisdiv
-                     |refsect1|refsect2|refsect3|refsection
-                     |sect1|sect2|sect3|sect4|sect5|section"
+<xsl:template match="d:set|d:book|d:part|d:reference|
+                     d:preface|d:chapter|d:appendix|d:article|d:topic
+                     |d:glossary|d:bibliography|d:index|d:setindex
+                     |d:refentry|d:refsynopsisdiv
+                     |d:refsect1|d:refsect2|d:refsect3|d:refsection
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section"
               mode="fop1.outline">
 
   <xsl:variable name="id">
@@ -38,7 +40,7 @@
   <!-- If the object is a set or book, generate a bookmark for the toc -->
 
   <xsl:choose>
-    <xsl:when test="self::index and $generate.index = 0"/>     
+    <xsl:when test="self::d:index and $generate.index = 0"/>
     <xsl:when test="parent::*">
       <fo:bookmark internal-destination="{$id}">
        <xsl:attribute name="starting-state">
       </xsl:variable>
 
       <xsl:if test="contains($toc.params, 'toc')
-                    and (book|part|reference|preface|chapter|appendix|article|topic
-                         |glossary|bibliography|index|setindex
-                         |refentry|refsynopsisdiv
-                         |refsect1|refsect2|refsect3|refsection
-                         |sect1|sect2|sect3|sect4|sect5|section)">
+                    and (d:book|d:part|d:reference|d:preface|d:chapter|d:appendix|d:article|d:topic
+                         |d:glossary|d:bibliography|d:index|d:setindex
+                         |d:refentry|d:refsynopsisdiv
+                         |d:refsect1|d:refsect2|d:refsect3|d:refsection
+                         |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section)">
         <fo:bookmark internal-destination="toc...{$id}">
           <fo:bookmark-title>
             <xsl:call-template name="gentext">
@@ -93,9 +95,9 @@
     <xsl:value-of select="(@id|@xml:id)[1]"/>
   </xsl:variable>
   <xsl:choose>
-    <xsl:when test="self::index and $generate.index = 0"/>
+    <xsl:when test="self::d:index and $generate.index = 0"/>
     <!-- ID on the footnote is not passed to the output FO -->
-    <xsl:when test="not(self::footnote) and $id != ''">
+    <xsl:when test="not(self::d:footnote) and $id != ''">
       <fox:destination internal-destination="{$id}"/>
       <xsl:apply-templates select="*" mode="fop1.foxdest"/>
     </xsl:when>
 
 <!-- Metadata support ("Document Properties" in Adobe Reader) -->
 <xsl:template name="fop1-document-information">
-  <xsl:variable name="authors" select="(//author|//editor|//corpauthor|//authorgroup)[1]"/>
+  <xsl:variable name="authors" select="(//d:author|//d:editor|//d:corpauthor|//d:authorgroup)[1]"/>
 
   <xsl:variable name="title">
     <xsl:apply-templates select="/*[1]" mode="label.markup"/>
          <xsl:if test="$authors">
            <xsl:variable name="author">
              <xsl:choose>
-               <xsl:when test="$authors[self::authorgroup]">
+               <xsl:when test="$authors[self::d:authorgroup]">
                   <xsl:call-template name="person.name.list">
                     <xsl:with-param name="person.list" 
-                       select="$authors/*[self::author|self::corpauthor|
-                                     self::othercredit|self::editor]"/>
+                       select="$authors/*[self::d:author|self::d:corpauthor|
+                                     self::d:othercredit|self::d:editor]"/>
                   </xsl:call-template>
                 </xsl:when>
-                <xsl:when test="$authors[self::corpauthor]">
+                <xsl:when test="$authors[self::d:corpauthor]">
                   <xsl:value-of select="$authors"/>
                 </xsl:when>
-                <xsl:when test="$authors[orgname]">
-                  <xsl:value-of select="$authors/orgname"/>
+                <xsl:when test="$authors[d:orgname]">
+                  <xsl:value-of select="$authors/d:orgname"/>
                 </xsl:when>
                 <xsl:otherwise>
                   <xsl:call-template name="person.name">
           </xsl:if>
 
           <!-- Subject -->
-          <xsl:if test="//subjectterm">
+          <xsl:if test="//d:subjectterm">
             <dc:description>
-              <xsl:for-each select="//subjectterm">
+              <xsl:for-each select="//d:subjectterm">
                 <xsl:value-of select="normalize-space(.)"/>
                 <xsl:if test="position() != last()">
                   <xsl:text>, </xsl:text>
           <!-- PDF properties go here -->
 
           <!-- Keywords -->
-          <xsl:if test="//keyword">
+          <xsl:if test="//d:keyword">
             <pdf:Keywords>
-              <xsl:for-each select="//keyword">
+              <xsl:for-each select="//d:keyword">
                 <xsl:value-of select="normalize-space(.)"/>
                 <xsl:if test="position() != last()">
                   <xsl:text>, </xsl:text>
index 736ed2d5cb759a1bea9ef716d07a888583e1d5f1..ed212b64bf8b1e570872dc483bbed25ade526978 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -45,7 +47,7 @@
   <xsl:choose>
     <!-- tables have their own templates and 
          are not handled by formal.object -->
-    <xsl:when test="self::figure">
+    <xsl:when test="self::d:figure">
       <fo:block id="{$id}"
                 xsl:use-attribute-sets="figure.properties">
         <xsl:if test="$keep.together != ''">
@@ -55,7 +57,7 @@
         <xsl:copy-of select="$content"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="self::example">
+    <xsl:when test="self::d:example">
       <fo:block id="{$id}"
                 xsl:use-attribute-sets="example.properties">
         <xsl:if test="$keep.together != ''">
@@ -65,7 +67,7 @@
         <xsl:copy-of select="$content"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="self::equation">
+    <xsl:when test="self::d:equation">
       <fo:block id="{$id}"
                 xsl:use-attribute-sets="equation.properties">
         <xsl:if test="$keep.together != ''">
@@ -75,7 +77,7 @@
         <xsl:copy-of select="$content"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="self::procedure">
+    <xsl:when test="self::d:procedure">
       <fo:block id="{$id}"
                 xsl:use-attribute-sets="procedure.properties">
         <xsl:if test="$keep.together != ''">
 <xsl:template name="semiformal.object">
   <xsl:param name="placement" select="'before'"/>
   <xsl:choose>
-    <xsl:when test="title or info/title">
+    <xsl:when test="d:title or d:info/d:title">
       <xsl:call-template name="formal.object">
         <xsl:with-param name="placement" select="$placement"/>
       </xsl:call-template>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="figure">
+<xsl:template match="d:figure">
   <xsl:variable name="param.placement"
               select="substring-after(normalize-space($formal.title.placement),
                                       concat(local-name(.), ' '))"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="example">
+<xsl:template match="d:example">
   <xsl:variable name="param.placement"
              select="substring-after(normalize-space($formal.title.placement),
                                      concat(local-name(.), ' '))"/>
 
   <!-- Get align value from internal mediaobject -->
   <xsl:variable name="align">
-    <xsl:if test="mediaobject|mediaobjectco">
-      <xsl:variable name="olist" select="mediaobject/imageobject
-                     |mediaobjectco/imageobjectco
-                     |mediaobject/videoobject
-                     |mediaobject/audioobject
-                     |mediaobject/textobject"/>
+    <xsl:if test="d:mediaobject|d:mediaobjectco">
+      <xsl:variable name="olist" select="d:mediaobject/d:imageobject
+                     |d:mediaobjectco/d:imageobjectco
+                     |d:mediaobject/d:videoobject
+                     |d:mediaobject/d:audioobject
+                     |d:mediaobject/d:textobject"/>
 
       <xsl:variable name="object.index">
         <xsl:call-template name="select.mediaobject.index">
 
       <xsl:variable name="object" select="$olist[position() = $object.index]"/>
 
-      <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
+      <xsl:value-of select="$object/descendant::d:imagedata[@align][1]/@align"/>
     </xsl:if>
   </xsl:variable>
 
      Created from the innermost and working out.
      Not all layers apply to every table.
 -->
-<xsl:template match="table|informaltable">
-  <xsl:if test="tgroup/tbody/tr
-                |tgroup/thead/tr
-                |tgroup/tfoot/tr">
+<xsl:template match="d:table|d:informaltable">
+  <xsl:if test="d:tgroup/d:tbody/d:tr
+                |d:tgroup/d:thead/d:tr
+                |d:tgroup/d:tfoot/d:tr">
     <xsl:message terminate="yes">
       <xsl:text>Broken table: tr descendent of CALS Table.</xsl:text>
       <xsl:text>The text in the first tr is:&#10;</xsl:text>
       <xsl:value-of 
-               select="(tgroup//tr)[1]"/>
+               select="(d:tgroup//d:tr)[1]"/>
     </xsl:message>
   </xsl:if>
-  <xsl:if test="not(tgroup) and .//row">
+  <xsl:if test="not(d:tgroup) and .//d:row">
     <xsl:message terminate="yes">
       <xsl:text>Broken table: row descendent of HTML table.</xsl:text>
       <xsl:text>The text in the first row is:&#10;</xsl:text>
       <xsl:value-of 
-               select=".//row[1]"/>
+               select=".//d:row[1]"/>
     </xsl:message>
   </xsl:if>
 
 </xsl:template>
 
 
-<xsl:template match="equation">
+<xsl:template match="d:equation">
   <xsl:variable name="param.placement"
               select="substring-after(normalize-space($formal.title.placement),
                                       concat(local-name(.), ' '))"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="figure/title"></xsl:template>
-<xsl:template match="figure/titleabbrev"></xsl:template>
-<xsl:template match="table/title"></xsl:template>
-<xsl:template match="table/titleabbrev"></xsl:template>
-<xsl:template match="table/textobject"></xsl:template>
-<xsl:template match="example/title"></xsl:template>
-<xsl:template match="example/titleabbrev"></xsl:template>
-<xsl:template match="equation/title"></xsl:template>
-<xsl:template match="equation/titleabbrev"></xsl:template>
-
-<xsl:template match="informalfigure">
+<xsl:template match="d:figure/d:title"></xsl:template>
+<xsl:template match="d:figure/d:titleabbrev"></xsl:template>
+<xsl:template match="d:table/d:title"></xsl:template>
+<xsl:template match="d:table/d:titleabbrev"></xsl:template>
+<xsl:template match="d:table/d:textobject"></xsl:template>
+<xsl:template match="d:example/d:title"></xsl:template>
+<xsl:template match="d:example/d:titleabbrev"></xsl:template>
+<xsl:template match="d:equation/d:title"></xsl:template>
+<xsl:template match="d:equation/d:titleabbrev"></xsl:template>
+
+<xsl:template match="d:informalfigure">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
-<xsl:template match="informalexample">
+<xsl:template match="d:informalexample">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
-<xsl:template match="informaltable/textobject"></xsl:template>
+<xsl:template match="d:informaltable/d:textobject"></xsl:template>
 
-<xsl:template match="informalequation">
+<xsl:template match="d:informalequation">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
index b8e4f8bdca439ae98cc9ef40b0a11691d2d9475e..4b770e53bfb732568996089222c42c0cd2a756cf 100644 (file)
@@ -4,9 +4,10 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="xlink"
+                exclude-result-prefixes="xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
 
 <!-- ==================================================================== -->
 
-<xsl:template match="glossary">
+<xsl:template match="d:glossary">
   <xsl:call-template name="make-glossary"/>
 </xsl:template>
 
-<xsl:template match="glossdiv/title"/>
-<xsl:template match="glossdiv/subtitle"/>
-<xsl:template match="glossdiv/titleabbrev"/>
+<xsl:template match="d:glossdiv/d:title"/>
+<xsl:template match="d:glossdiv/d:subtitle"/>
+<xsl:template match="d:glossdiv/d:titleabbrev"/>
 
 <!-- ==================================================================== -->
 
 <xsl:template name="make-glossary">
-  <xsl:param name="divs" select="glossdiv"/>
-  <xsl:param name="entries" select="glossentry"/>
-  <xsl:param name="preamble" select="*[not(self::title
-                                           or self::subtitle
-                                           or self::glossdiv
-                                           or self::glossentry)]"/>
+  <xsl:param name="divs" select="d:glossdiv"/>
+  <xsl:param name="entries" select="d:glossentry"/>
+  <xsl:param name="preamble" select="*[not(self::d:title
+                                           or self::d:subtitle
+                                           or self::d:glossdiv
+                                           or self::d:glossentry)]"/>
 
   &setup-language-variable;
 
@@ -82,7 +83,7 @@
           <xsl:choose>
             <xsl:when test="$glossary.sort != 0">
               <xsl:apply-templates select="$entries" mode="glossary.as.list">
-                                  <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                                  <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
               </xsl:apply-templates>
             </xsl:when>
             <xsl:otherwise>
@@ -97,7 +98,7 @@
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
           <xsl:apply-templates select="$entries" mode="glossary.as.blocks">
-                          <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                          <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
           <xsl:apply-templates select="$entries" mode="glossary.as.blocks">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
           <xsl:choose>
             <xsl:when test="$glossary.sort != 0">
               <xsl:apply-templates select="$entries" mode="glossary.as.list">
-                                        <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                                        <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
               </xsl:apply-templates>
             </xsl:when>
             <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="book/glossary|part/glossary|/glossary" priority="2">
+<xsl:template match="d:book/d:glossary|d:part/d:glossary|/d:glossary" priority="2">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="glossary/glossaryinfo"></xsl:template>
-<xsl:template match="glossary/info"></xsl:template>
-<xsl:template match="glossary/title"></xsl:template>
-<xsl:template match="glossary/subtitle"></xsl:template>
-<xsl:template match="glossary/titleabbrev"></xsl:template>
+<xsl:template match="d:glossary/d:glossaryinfo"></xsl:template>
+<xsl:template match="d:glossary/d:info"></xsl:template>
+<xsl:template match="d:glossary/d:title"></xsl:template>
+<xsl:template match="d:glossary/d:subtitle"></xsl:template>
+<xsl:template match="d:glossary/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="glosslist">
+<xsl:template match="d:glosslist">
   &setup-language-variable;
 
   <xsl:variable name="presentation">
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:if test="title or info/title">
-    <xsl:apply-templates select="(title|info/title)[1]" mode="list.title.mode"/>
+  <xsl:if test="d:title or d:info/d:title">
+    <xsl:apply-templates select="(d:title|d:info/d:title)[1]" mode="list.title.mode"/>
   </xsl:if>
 
   <xsl:choose>
                      xsl:use-attribute-sets="normal.para.spacing">
         <xsl:choose>
           <xsl:when test="$glossary.sort != 0">
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+            <xsl:apply-templates select="d:glossentry" mode="glossary.as.list">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
             </xsl:apply-templates>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list"/>
+            <xsl:apply-templates select="d:glossentry" mode="glossary.as.list"/>
           </xsl:otherwise>
         </xsl:choose>
       </fo:list-block>
     <xsl:when test="$presentation = 'blocks'">
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+          <xsl:apply-templates select="d:glossentry" mode="glossary.as.blocks">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"/>
+          <xsl:apply-templates select="d:glossentry" mode="glossary.as.blocks"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
     <xsl:when test="$glosslist.as.blocks != 0">
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+          <xsl:apply-templates select="d:glossentry" mode="glossary.as.blocks">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="glossentry" mode="glossary.as.blocks"/>
+          <xsl:apply-templates select="d:glossentry" mode="glossary.as.blocks"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
                      xsl:use-attribute-sets="normal.para.spacing">
         <xsl:choose>
           <xsl:when test="$glossary.sort != 0">
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+            <xsl:apply-templates select="d:glossentry" mode="glossary.as.list">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
             </xsl:apply-templates>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:apply-templates select="glossentry" mode="glossary.as.list"/>
+            <xsl:apply-templates select="d:glossentry" mode="glossary.as.list"/>
           </xsl:otherwise>
         </xsl:choose>
       </fo:list-block>
 <!-- ==================================================================== -->
 <!-- Glossary collection -->
 
-<xsl:template match="glossary[@role='auto']" priority="2">
+<xsl:template match="d:glossary[@role='auto']" priority="2">
   <xsl:variable name="collection" select="document($glossary.collection, .)"/>
   <xsl:if test="$glossary.collection = ''">
     <xsl:message>
 
 <xsl:template name="make-auto-glossary">
   <xsl:param name="collection" select="document($glossary.collection, .)"/>
-  <xsl:param name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
-  <xsl:param name="preamble" select="*[not(self::title
-                                           or self::subtitle
-                                           or self::glossdiv
-                                           or self::glossentry)]"/>
+  <xsl:param name="terms" select="//d:glossterm[not(parent::d:glossdef)]|//d:firstterm"/>
+  <xsl:param name="preamble" select="*[not(self::d:title
+                                           or self::d:subtitle
+                                           or self::d:glossdiv
+                                           or self::d:glossentry)]"/>
 
   &setup-language-variable;
 
   </xsl:if>
 
   <xsl:choose>
-    <xsl:when test="glossdiv and $collection//glossdiv">
-      <xsl:for-each select="$collection//glossdiv">
+    <xsl:when test="d:glossdiv and $collection//d:glossdiv">
+      <xsl:for-each select="$collection//d:glossdiv">
         <!-- first see if there are any in this div -->
         <xsl:variable name="exist.test">
-          <xsl:for-each select="glossentry">
-            <xsl:variable name="cterm" select="glossterm"/>
+          <xsl:for-each select="d:glossentry">
+            <xsl:variable name="cterm" select="d:glossterm"/>
             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-              <xsl:value-of select="glossterm"/>
+              <xsl:value-of select="d:glossterm"/>
             </xsl:if>
           </xsl:for-each>
         </xsl:variable>
                          xsl:use-attribute-sets="normal.para.spacing">
             <xsl:choose>
               <xsl:when test="$glossary.sort != 0">
-                <xsl:for-each select="$collection//glossentry">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-                  <xsl:variable name="cterm" select="glossterm"/>
+                <xsl:for-each select="$collection//d:glossentry">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                  <xsl:variable name="cterm" select="d:glossterm"/>
                   <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                     <xsl:apply-templates select="." 
                                          mode="auto-glossary-as-list"/>
                 </xsl:for-each>
               </xsl:when>
               <xsl:otherwise>
-                <xsl:for-each select="$collection//glossentry">
-                  <xsl:variable name="cterm" select="glossterm"/>
+                <xsl:for-each select="$collection//d:glossentry">
+                  <xsl:variable name="cterm" select="d:glossterm"/>
                   <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                     <xsl:apply-templates select="." 
                                          mode="auto-glossary-as-list"/>
                         $glossary.as.blocks != 0">
           <xsl:choose>
             <xsl:when test="$glossary.sort != 0">
-              <xsl:for-each select="$collection//glossentry">
-                                        <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-                <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:for-each select="$collection//d:glossentry">
+                                        <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                <xsl:variable name="cterm" select="d:glossterm"/>
                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                   <xsl:apply-templates select="." 
                                        mode="auto-glossary-as-blocks"/>
               </xsl:for-each>
             </xsl:when>
             <xsl:otherwise>
-              <xsl:for-each select="$collection//glossentry">
-                <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:for-each select="$collection//d:glossentry">
+                <xsl:variable name="cterm" select="d:glossterm"/>
                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                   <xsl:apply-templates select="." 
                                        mode="auto-glossary-as-blocks"/>
                          xsl:use-attribute-sets="normal.para.spacing">
             <xsl:choose>
               <xsl:when test="$glossary.sort != 0">
-                <xsl:for-each select="$collection//glossentry">
+                <xsl:for-each select="$collection//d:glossentry">
 
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-                  <xsl:variable name="cterm" select="glossterm"/>
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                  <xsl:variable name="cterm" select="d:glossterm"/>
                   <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                     <xsl:apply-templates select="." 
                                          mode="auto-glossary-as-list"/>
                 </xsl:for-each>
               </xsl:when>
               <xsl:otherwise>
-                <xsl:for-each select="$collection//glossentry">
-                  <xsl:variable name="cterm" select="glossterm"/>
+                <xsl:for-each select="$collection//d:glossentry">
+                  <xsl:variable name="cterm" select="d:glossterm"/>
                   <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                     <xsl:apply-templates select="." 
                                          mode="auto-glossary-as-list"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="book/glossary[@role='auto']|
-                     part/glossary[@role='auto']|
-                     /glossary[@role='auto']" priority="2.5">
+<xsl:template match="d:book/d:glossary[@role='auto']|
+                     d:part/d:glossary[@role='auto']|
+                     /d:glossary[@role='auto']" priority="2.5">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:variable name="master-reference">
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="glossdiv" mode="auto-glossary-as-list">
+<xsl:template match="d:glossdiv" mode="auto-glossary-as-list">
   <xsl:param name="width" select="$glossterm.width"/>
   <xsl:param name="terms" select="."/>
 
   </xsl:variable>
 
   <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
+                select="*[not(self::d:title
+                            or self::d:subtitle
+                            or self::d:glossentry)]"/>
 
   <fo:block id="{$id}">
     <xsl:call-template name="glossdiv.titlepage"/>
                  xsl:use-attribute-sets="normal.para.spacing">
     <xsl:choose>
       <xsl:when test="$glossary.sort != 0">
-        <xsl:for-each select="glossentry">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-          <xsl:variable name="cterm" select="glossterm"/>
+        <xsl:for-each select="d:glossentry">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+          <xsl:variable name="cterm" select="d:glossterm"/>
           <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
             <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
           </xsl:if>
         </xsl:for-each>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:for-each select="glossentry">
-          <xsl:variable name="cterm" select="glossterm"/>
+        <xsl:for-each select="d:glossentry">
+          <xsl:variable name="cterm" select="d:glossterm"/>
           <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
             <xsl:apply-templates select="." mode="auto-glossary-as-list"/>
           </xsl:if>
   </fo:list-block>
 </xsl:template>
 
-<xsl:template match="glossentry" mode="auto-glossary-as-list">
+<xsl:template match="d:glossentry" mode="auto-glossary-as-list">
   <xsl:apply-templates select="." mode="glossary.as.list"/>
 </xsl:template>
 
-<xsl:template match="glossdiv" mode="auto-glossary-as-blocks">
+<xsl:template match="d:glossdiv" mode="auto-glossary-as-blocks">
   <xsl:param name="terms" select="."/>
 
   &setup-language-variable;
   </xsl:variable>
 
   <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
+                select="*[not(self::d:title
+                            or self::d:subtitle
+                            or self::d:glossentry)]"/>
 
   <fo:block id="{$id}">
     <xsl:call-template name="glossdiv.titlepage"/>
 
   <xsl:choose>
     <xsl:when test="$glossary.sort != 0">
-      <xsl:for-each select="glossentry">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-        <xsl:variable name="cterm" select="glossterm"/>
+      <xsl:for-each select="d:glossentry">
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+        <xsl:variable name="cterm" select="d:glossterm"/>
         <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
           <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
         </xsl:if>
       </xsl:for-each>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:for-each select="glossentry">
-        <xsl:variable name="cterm" select="glossterm"/>
+      <xsl:for-each select="d:glossentry">
+        <xsl:variable name="cterm" select="d:glossterm"/>
         <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
           <xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
         </xsl:if>
 
 </xsl:template>
 
-<xsl:template match="glossentry" mode="auto-glossary-as-blocks">
+<xsl:template match="d:glossentry" mode="auto-glossary-as-blocks">
   <xsl:apply-templates select="." mode="glossary.as.blocks"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 <!-- Format glossary as a list -->
 
-<xsl:template match="glossdiv" mode="glossary.as.list">
+<xsl:template match="d:glossdiv" mode="glossary.as.list">
   <xsl:param name="width" select="$glossterm.width"/>
 
   &setup-language-variable;
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <xsl:variable name="entries" select="glossentry"/>
+  <xsl:variable name="entries" select="d:glossentry"/>
 
   <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
+                select="*[not(self::d:title
+                            or self::d:subtitle
+                            or self::d:glossentry)]"/>
 
   <fo:block id="{$id}">
     <xsl:call-template name="glossdiv.titlepage"/>
     <xsl:choose>
       <xsl:when test="$glossary.sort != 0">
         <xsl:apply-templates select="$entries" mode="glossary.as.list">
-                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                                <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
         </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
@@ -720,7 +721,7 @@ GlossEntry ::=
   (GlossSee | GlossDef+)
 -->
 
-<xsl:template match="glossentry" mode="glossary.as.list">
+<xsl:template match="d:glossentry" mode="glossary.as.list">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -741,72 +742,72 @@ GlossEntry ::=
         <xsl:choose>
           <xsl:when test="$glossentry.show.acronym = 'primary'">
             <xsl:choose>
-              <xsl:when test="acronym|abbrev">
-                <xsl:apply-templates select="acronym|abbrev" 
+              <xsl:when test="d:acronym|d:abbrev">
+                <xsl:apply-templates select="d:acronym|d:abbrev"
                                      mode="glossary.as.list"/>
                 <xsl:text> (</xsl:text>
-                <xsl:apply-templates select="glossterm" 
+                <xsl:apply-templates select="d:glossterm"
                                      mode="glossary.as.list"/>
                 <xsl:text>)</xsl:text>
               </xsl:when>
               <xsl:otherwise>
-                <xsl:apply-templates select="glossterm" 
+                <xsl:apply-templates select="d:glossterm"
                                      mode="glossary.as.list"/>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:when>
 
           <xsl:when test="$glossentry.show.acronym = 'yes'">
-            <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
+            <xsl:apply-templates select="d:glossterm" mode="glossary.as.list"/>
 
-            <xsl:if test="acronym|abbrev">
+            <xsl:if test="d:acronym|d:abbrev">
               <xsl:text> (</xsl:text>
-              <xsl:apply-templates select="acronym|abbrev" 
+              <xsl:apply-templates select="d:acronym|d:abbrev"
                                    mode="glossary.as.list"/>
               <xsl:text>)</xsl:text>
             </xsl:if>
           </xsl:when>
 
           <xsl:otherwise>
-            <xsl:apply-templates select="glossterm" mode="glossary.as.list"/>
+            <xsl:apply-templates select="d:glossterm" mode="glossary.as.list"/>
           </xsl:otherwise>
         </xsl:choose>
-        <xsl:apply-templates select="indexterm"/>
+        <xsl:apply-templates select="d:indexterm"/>
       </fo:block>
     </fo:list-item-label>
 
     <fo:list-item-body start-indent="body-start()">
       <fo:block xsl:use-attribute-sets="glossdef.list.properties">
-        <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.list"/>
+        <xsl:apply-templates select="d:glosssee|d:glossdef" mode="glossary.as.list"/>
       </fo:block>
     </fo:list-item-body>
   </fo:list-item>
 </xsl:template>
 
-<xsl:template match="glossentry/glossterm" mode="glossary.as.list">
+<xsl:template match="d:glossentry/d:glossterm" mode="glossary.as.list">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   <fo:inline id="{$id}">
     <xsl:apply-templates/>
   </fo:inline>
-  <xsl:if test="following-sibling::glossterm">, </xsl:if>
+  <xsl:if test="following-sibling::d:glossterm">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/acronym" mode="glossary.as.list">
+<xsl:template match="d:glossentry/d:acronym" mode="glossary.as.list">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+  <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/abbrev" mode="glossary.as.list">
+<xsl:template match="d:glossentry/d:abbrev" mode="glossary.as.list">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+  <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/revhistory" mode="glossary.as.list">
+<xsl:template match="d:glossentry/d:revhistory" mode="glossary.as.list">
 </xsl:template>
 
-<xsl:template match="glossentry/glosssee" mode="glossary.as.list">
+<xsl:template match="d:glossentry/d:glosssee" mode="glossary.as.list">
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="key('id', $otherterm)"/>
   <xsl:variable name="target" select="$targets[1]"/>
@@ -853,9 +854,9 @@ GlossEntry ::=
   </fo:block>
 </xsl:template>
 
-<xsl:template match="glossentry/glossdef" mode="glossary.as.list">
+<xsl:template match="d:glossentry/d:glossdef" mode="glossary.as.list">
   <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
-  <xsl:if test="glossseealso">
+  <xsl:if test="d:glossseealso">
     <fo:block>
       <xsl:variable name="template">
         <xsl:call-template name="gentext.template">
@@ -864,7 +865,7 @@ GlossEntry ::=
         </xsl:call-template>
       </xsl:variable>
       <xsl:variable name="title">
-        <xsl:apply-templates select="glossseealso" mode="glossary.as.list"/>
+        <xsl:apply-templates select="d:glossseealso" mode="glossary.as.list"/>
       </xsl:variable>
       <xsl:call-template name="substitute-markup">
         <xsl:with-param name="template" select="$template"/>
@@ -874,14 +875,14 @@ GlossEntry ::=
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]"
+<xsl:template match="d:glossentry/d:glossdef/d:para[1]|d:glossentry/d:glossdef/d:simpara[1]"
               mode="glossary.as.list">
   <fo:block>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="glossseealso" mode="glossary.as.list">
+<xsl:template match="d:glossseealso" mode="glossary.as.list">
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="key('id', $otherterm)"/>
   <xsl:variable name="target" select="$targets[1]"/>
@@ -927,18 +928,18 @@ GlossEntry ::=
 <!-- ==================================================================== -->
 <!-- Format glossary blocks -->
 
-<xsl:template match="glossdiv" mode="glossary.as.blocks">
+<xsl:template match="d:glossdiv" mode="glossary.as.blocks">
   &setup-language-variable;
 
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
-  <xsl:variable name="entries" select="glossentry"/>
+  <xsl:variable name="entries" select="d:glossentry"/>
   <xsl:variable name="preamble"
-                select="*[not(self::title
-                            or self::subtitle
-                            or self::glossentry)]"/>
+                select="*[not(self::d:title
+                            or self::d:subtitle
+                            or self::d:glossentry)]"/>
 
   <fo:block id="{$id}">
     <xsl:call-template name="glossdiv.titlepage"/>
@@ -949,7 +950,7 @@ GlossEntry ::=
   <xsl:choose>
     <xsl:when test="$glossary.sort != 0">
       <xsl:apply-templates select="$entries" mode="glossary.as.blocks">
-                  <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                  <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
@@ -966,7 +967,7 @@ GlossEntry ::=
   (GlossSee | GlossDef+)
 -->
 
-<xsl:template match="glossentry" mode="glossary.as.blocks">
+<xsl:template match="d:glossentry" mode="glossary.as.blocks">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -985,62 +986,62 @@ GlossEntry ::=
     <xsl:choose>
       <xsl:when test="$glossentry.show.acronym = 'primary'">
         <xsl:choose>
-          <xsl:when test="acronym|abbrev">
-            <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/>
+          <xsl:when test="d:acronym|d:abbrev">
+            <xsl:apply-templates select="d:acronym|d:abbrev" mode="glossary.as.blocks"/>
             <xsl:text> (</xsl:text>
-            <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+            <xsl:apply-templates select="d:glossterm" mode="glossary.as.blocks"/>
             <xsl:text>)</xsl:text>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+            <xsl:apply-templates select="d:glossterm" mode="glossary.as.blocks"/>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
 
       <xsl:when test="$glossentry.show.acronym = 'yes'">
-        <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+        <xsl:apply-templates select="d:glossterm" mode="glossary.as.blocks"/>
 
-        <xsl:if test="acronym|abbrev">
+        <xsl:if test="d:acronym|d:abbrev">
           <xsl:text> (</xsl:text>
-          <xsl:apply-templates select="acronym|abbrev" mode="glossary.as.blocks"/>
+          <xsl:apply-templates select="d:acronym|d:abbrev" mode="glossary.as.blocks"/>
           <xsl:text>)</xsl:text>
         </xsl:if>
       </xsl:when>
 
       <xsl:otherwise>
-        <xsl:apply-templates select="glossterm" mode="glossary.as.blocks"/>
+        <xsl:apply-templates select="d:glossterm" mode="glossary.as.blocks"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:apply-templates select="indexterm"/>
+    <xsl:apply-templates select="d:indexterm"/>
   </fo:block>
 
   <fo:block xsl:use-attribute-sets="glossdef.block.properties">
-    <xsl:apply-templates select="glosssee|glossdef" mode="glossary.as.blocks"/>
+    <xsl:apply-templates select="d:glosssee|d:glossdef" mode="glossary.as.blocks"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="glossentry/glossterm" mode="glossary.as.blocks">
+<xsl:template match="d:glossentry/d:glossterm" mode="glossary.as.blocks">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   <fo:inline id="{$id}">
     <xsl:apply-templates/>
   </fo:inline>
-  <xsl:if test="following-sibling::glossterm">, </xsl:if>
+  <xsl:if test="following-sibling::d:glossterm">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/acronym" mode="glossary.as.blocks">
+<xsl:template match="d:glossentry/d:acronym" mode="glossary.as.blocks">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+  <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/abbrev" mode="glossary.as.blocks">
+<xsl:template match="d:glossentry/d:abbrev" mode="glossary.as.blocks">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+  <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/glosssee" mode="glossary.as.blocks">
+<xsl:template match="d:glossentry/d:glosssee" mode="glossary.as.blocks">
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="key('id', $otherterm)"/>
   <xsl:variable name="target" select="$targets[1]"/>
@@ -1085,10 +1086,10 @@ GlossEntry ::=
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="glossentry/glossdef" mode="glossary.as.blocks">
+<xsl:template match="d:glossentry/d:glossdef" mode="glossary.as.blocks">
   <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"
                        mode="glossary.as.blocks"/>
-  <xsl:if test="glossseealso">
+  <xsl:if test="d:glossseealso">
     <fo:block>
       <xsl:variable name="template">
         <xsl:call-template name="gentext.template">
@@ -1097,7 +1098,7 @@ GlossEntry ::=
         </xsl:call-template>
       </xsl:variable>
       <xsl:variable name="title">
-        <xsl:apply-templates select="glossseealso" mode="glossary.as.blocks"/>
+        <xsl:apply-templates select="d:glossseealso" mode="glossary.as.blocks"/>
       </xsl:variable>
       <xsl:call-template name="substitute-markup">
         <xsl:with-param name="template" select="$template"/>
@@ -1107,7 +1108,7 @@ GlossEntry ::=
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/glossdef/para[1]|glossentry/glossdef/simpara[1]"
+<xsl:template match="d:glossentry/d:glossdef/d:para[1]|d:glossentry/d:glossdef/d:simpara[1]"
               mode="glossary.as.blocks">
   <fo:block>
     <xsl:apply-templates/>
@@ -1119,7 +1120,7 @@ GlossEntry ::=
   <xsl:apply-templates select="." />
 </xsl:template>
 
-<xsl:template match="glossseealso" mode="glossary.as.blocks">
+<xsl:template match="d:glossseealso" mode="glossary.as.blocks">
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="key('id', $otherterm)"/>
   <xsl:variable name="target" select="$targets[1]"/>
index 44a0a3018abb8ffabc1dd6a2f6466de2bfd1d63d..3f21f4e45c7cb7c05c7409b2fcf0bd8677c9af9a 100644 (file)
@@ -4,12 +4,13 @@
 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
  ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
                 xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
                 xmlns:xtext="com.nwalsh.xalan.Text"
                 xmlns:lxslt="http://xml.apache.org/xslt"
-                exclude-result-prefixes="xlink stext xtext lxslt"
+                exclude-result-prefixes="xlink stext xtext lxslt d"
                 extension-element-prefixes="stext xtext"
                 version='1.0'>
 
 
 <!-- ==================================================================== -->
 
-<xsl:template match="screenshot">
+<xsl:template match="d:screenshot">
   <fo:block>
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="screenshot/title">
+<xsl:template match="d:screenshot/d:title">
   <xsl:call-template name="formal.object.heading">
     <xsl:with-param name="object" select=".."/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="screeninfo">
+<xsl:template match="d:screeninfo">
 </xsl:template>
 
 <!-- ==================================================================== -->
 <xsl:template name="image.valign">
   <xsl:if test="@valign">
     <xsl:choose>
-      <xsl:when test="ancestor::inlinemediaobject or ancestor-or-self::inlinegraphic">
+      <xsl:when test="ancestor::d:inlinemediaobject or ancestor-or-self::d:inlinegraphic">
         <xsl:choose>
           <xsl:when test="@valign = 'top'">baseline</xsl:when>
           <xsl:when test="@valign = 'middle'">central</xsl:when>
     <xsl:if test="$valign != ''">
       <xsl:variable name="att.name">
         <xsl:choose>
-          <xsl:when test="ancestor::inlinemediaobject or ancestor-or-self::inlinegraphic">
+          <xsl:when test="ancestor::d:inlinemediaobject or ancestor-or-self::d:inlinegraphic">
             <xsl:text>alignment-baseline</xsl:text>
           </xsl:when>
           <xsl:otherwise>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="graphic">
+<xsl:template match="d:graphic">
   <xsl:choose>
-    <xsl:when test="parent::inlineequation">
+    <xsl:when test="parent::d:inlineequation">
       <xsl:call-template name="process.image"/>
     </xsl:when>
     <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="inlinegraphic">
+<xsl:template match="d:inlinegraphic">
   <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
   <xsl:variable name="filename">
     <xsl:choose>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="mediaobject|mediaobjectco">
+<xsl:template match="d:mediaobject|d:mediaobjectco">
 
-  <xsl:variable name="olist" select="imageobject|imageobjectco
-                     |videoobject|audioobject
-                     |textobject"/>
+  <xsl:variable name="olist" select="d:imageobject|d:imageobjectco
+                     |d:videoobject|d:audioobject
+                     |d:textobject"/>
 
   <xsl:variable name="object.index">
     <xsl:call-template name="select.mediaobject.index">
   <xsl:variable name="object" select="$olist[position() = $object.index]"/>
 
   <xsl:variable name="align">
-    <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
+    <xsl:value-of select="$object/descendant::d:imagedata[@align][1]/@align"/>
   </xsl:variable>
 
   <xsl:variable name="id">
     </xsl:if>
 
     <xsl:apply-templates select="$object"/>
-    <xsl:apply-templates select="caption"/>
+    <xsl:apply-templates select="d:caption"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="inlinemediaobject">
+<xsl:template match="d:inlinemediaobject">
   <xsl:call-template name="select.mediaobject"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="imageobjectco">
+<xsl:template match="d:imageobjectco">
   <xsl:choose>
     <!-- select one imageobject? -->
     <xsl:when test="$use.role.for.mediaobject != 0 and
-                    count(imageobject) &gt; 1 and
-                    imageobject[@role]">
-      <xsl:variable name="olist" select="imageobject"/>
+                    count(d:imageobject) &gt; 1 and
+                    d:imageobject[@role]">
+      <xsl:variable name="olist" select="d:imageobject"/>
     
       <xsl:variable name="object.index">
         <xsl:call-template name="select.mediaobject.index">
     </xsl:when>
     <xsl:otherwise>
       <!-- otherwise process them all -->
-      <xsl:apply-templates select="imageobject"/>
+      <xsl:apply-templates select="d:imageobject"/>
     </xsl:otherwise>
   </xsl:choose>
 
-  <xsl:apply-templates select="calloutlist"/>
+  <xsl:apply-templates select="d:calloutlist"/>
 
 </xsl:template>
 
-<xsl:template match="imageobject">
+<xsl:template match="d:imageobject">
   <xsl:choose>
-    <xsl:when test="imagedata">
-      <xsl:apply-templates select="imagedata"/>
+    <xsl:when test="d:imagedata">
+      <xsl:apply-templates select="d:imagedata"/>
     </xsl:when>
     <xsl:otherwise>
       <fo:instream-foreign-object>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="imagedata">
+<xsl:template match="d:imagedata">
   <xsl:choose>
     <xsl:when test="@format='linespecific'">
       <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="videoobject">
-  <xsl:apply-templates select="videodata"/>
+<xsl:template match="d:videoobject">
+  <xsl:apply-templates select="d:videodata"/>
 </xsl:template>
 
-<xsl:template match="videodata">
+<xsl:template match="d:videodata">
   <xsl:call-template name="process.image"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="audioobject">
-  <xsl:apply-templates select="audiodata"/>
+<xsl:template match="d:audioobject">
+  <xsl:apply-templates select="d:audiodata"/>
 </xsl:template>
 
-<xsl:template match="audiodata">
+<xsl:template match="d:audiodata">
   <xsl:call-template name="process.image"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="textobject">
+<xsl:template match="d:textobject">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="textdata">
+<xsl:template match="d:textdata">
   <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
   <xsl:variable name="filename">
     <xsl:choose>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="mediaobject/caption|figure/caption">
+<xsl:template match="d:mediaobject/d:caption|d:figure/d:caption">
   <fo:block>
     <xsl:if test="@align = 'right' or @align = 'left' or @align='center'">
       <xsl:attribute name="text-align"><xsl:value-of
index 0bd4210ed939e4ae6b84a6e3d3a4a34373f0aa1e..7559f7c1c87c8a720a4bcb53dbbb23db46accf2e 100644 (file)
@@ -1,75 +1,76 @@
-<?xml version='1.0'?>\r
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-               xmlns:fo="http://www.w3.org/1999/XSL/Format"\r
-               xmlns:xslthl="http://xslthl.sf.net"\r
-                exclude-result-prefixes="xslthl"\r
-                version='1.0'>\r
-\r
-<!-- ********************************************************************\r
-\r
-     This file is part of the XSL DocBook Stylesheet distribution.\r
-     See ../README or http://cdn.docbook.org/release/xsl/current/ for\r
-     and other information.\r
-\r
-     ******************************************************************** -->\r
-\r
-<xsl:import href="../highlighting/common.xsl"/>\r
-\r
-<xsl:template match='xslthl:keyword' mode="xslthl">\r
-  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:string' mode="xslthl">\r
-  <fo:inline font-weight="bold" font-style="italic"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:comment' mode="xslthl">\r
-  <fo:inline font-style="italic"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:tag' mode="xslthl">\r
-  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:attribute' mode="xslthl">\r
-  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:value' mode="xslthl">\r
-  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<!--\r
-<xsl:template match='xslthl:html'>\r
-  <span style='background:#AFF'><font color='blue'><xsl:apply-templates/></font></span>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:xslt'>\r
-  <span style='background:#AAA'><font color='blue'><xsl:apply-templates/></font></span>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:section'>\r
-  <span style='background:yellow'><xsl:apply-templates/></span>\r
-</xsl:template>\r
--->\r
-\r
-<xsl:template match='xslthl:number' mode="xslthl">\r
-  <xsl:apply-templates mode="xslthl"/>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:annotation' mode="xslthl">\r
-  <fo:inline color="gray"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-<xsl:template match='xslthl:directive' mode="xslthl">\r
-  <xsl:apply-templates mode="xslthl"/>\r
-</xsl:template>\r
-\r
-<!-- Not sure which element will be in final XSLTHL 2.0 -->\r
-<xsl:template match='xslthl:doccomment|xslthl:doctype' mode="xslthl">\r
-  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>\r
-</xsl:template>\r
-\r
-\r
-</xsl:stylesheet>\r
-\r
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
+               xmlns:xslthl="http://xslthl.sf.net"
+                exclude-result-prefixes="xslthl d"
+                version='1.0'>
+
+<!-- ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://cdn.docbook.org/release/xsl/current/ for
+     and other information.
+
+     ******************************************************************** -->
+
+<xsl:import href="../highlighting/common.xsl"/>
+
+<xsl:template match='xslthl:keyword' mode="xslthl">
+  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:string' mode="xslthl">
+  <fo:inline font-weight="bold" font-style="italic"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:comment' mode="xslthl">
+  <fo:inline font-style="italic"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:tag' mode="xslthl">
+  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:attribute' mode="xslthl">
+  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:value' mode="xslthl">
+  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<!--
+<xsl:template match='xslthl:html'>
+  <span style='background:#AFF'><font color='blue'><xsl:apply-templates/></font></span>
+</xsl:template>
+
+<xsl:template match='xslthl:xslt'>
+  <span style='background:#AAA'><font color='blue'><xsl:apply-templates/></font></span>
+</xsl:template>
+
+<xsl:template match='xslthl:section'>
+  <span style='background:yellow'><xsl:apply-templates/></span>
+</xsl:template>
+-->
+
+<xsl:template match='xslthl:number' mode="xslthl">
+  <xsl:apply-templates mode="xslthl"/>
+</xsl:template>
+
+<xsl:template match='xslthl:annotation' mode="xslthl">
+  <fo:inline color="gray"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+<xsl:template match='xslthl:directive' mode="xslthl">
+  <xsl:apply-templates mode="xslthl"/>
+</xsl:template>
+
+<!-- Not sure which element will be in final XSLTHL 2.0 -->
+<xsl:template match='xslthl:doccomment|xslthl:doctype' mode="xslthl">
+  <fo:inline font-weight="bold"><xsl:apply-templates mode="xslthl"/></fo:inline>
+</xsl:template>
+
+
+</xsl:stylesheet>
+
index 3f840e650e4aea4c22d39fcd9b171389ef57796b..319a4e39cd55d9c5c09a59331764ce75a95b6803 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
 
 <!-- ********************************************************************
 <!-- ==================================================================== -->
 
 <!-- Outputs an fo:table only, not the caption -->
-<xsl:template match="table|informaltable" mode="htmlTable">
+<xsl:template match="d:table|d:informaltable" mode="htmlTable">
 
   <xsl:variable name="numcols">
     <xsl:call-template name="widest-html-row">
-      <xsl:with-param name="rows" select=".//tr"/>
+      <xsl:with-param name="rows" select=".//d:tr"/>
     </xsl:call-template>
   </xsl:variable>
 
   <xsl:variable name="prop-columns"
-                select=".//col[contains(@width, '%')] |
-                        .//colgroup[contains(@width, '%')]"/>
+                select=".//d:col[contains(@width, '%')] |
+                        .//d:colgroup[contains(@width, '%')]"/>
 
   <xsl:variable name="table.width">
     <xsl:call-template name="table.width"/>
       <xsl:with-param name="count" select="$numcols"/>
     </xsl:call-template>
 
-    <xsl:apply-templates select="thead" mode="htmlTable"/>
-    <xsl:apply-templates select="tfoot" mode="htmlTable"/>
+    <xsl:apply-templates select="d:thead" mode="htmlTable"/>
+    <xsl:apply-templates select="d:tfoot" mode="htmlTable"/>
     <xsl:choose>
-      <xsl:when test="tbody">
-        <xsl:apply-templates select="tbody" mode="htmlTable"/>
+      <xsl:when test="d:tbody">
+        <xsl:apply-templates select="d:tbody" mode="htmlTable"/>
       </xsl:when>
       <xsl:otherwise>
         <fo:table-body start-indent="0pt" end-indent="0pt">
-          <xsl:apply-templates select="tr" mode="htmlTable"/>
+          <xsl:apply-templates select="d:tr" mode="htmlTable"/>
         </fo:table-body>
       </xsl:otherwise>
     </xsl:choose>
 <!-- This template writes rowsep or colsep equivalant for html tables -->
 <xsl:template name="html.table.cell.rules">
   <xsl:variable name="border" 
-                select="(ancestor::table |
-                         ancestor::informaltable)[last()]/@border"/>
+                select="(ancestor::d:table |
+                         ancestor::d:informaltable)[last()]/@border"/>
   <xsl:variable name="table.rules"
-                select="(ancestor::table |
-                         ancestor::informaltable)[last()]/@rules"/>
+                select="(ancestor::d:table |
+                         ancestor::d:informaltable)[last()]/@rules"/>
 
   <xsl:variable name="rules">
     <xsl:choose>
       <xsl:variable name="rowborder">
         <xsl:choose>
           <!-- If in thead and tbody has rows, add border -->
-          <xsl:when test="parent::tr/parent::thead/
-                          following-sibling::tbody/tr">1</xsl:when>
+          <xsl:when test="parent::d:tr/parent::d:thead/
+                          following-sibling::d:tbody/d:tr">1</xsl:when>
           <!-- If in tbody and tfoot has rows, add border -->
-          <xsl:when test="parent::tr/parent::tbody/
-                          following-sibling::tfoot/tr">1</xsl:when>
-          <xsl:when test="parent::tr/parent::tbody/
-                          preceding-sibling::tfoot/tr">1</xsl:when>
+          <xsl:when test="parent::d:tr/parent::d:tbody/
+                          following-sibling::d:tfoot/d:tr">1</xsl:when>
+          <xsl:when test="parent::d:tr/parent::d:tbody/
+                          preceding-sibling::d:tfoot/d:tr">1</xsl:when>
           <!-- If following rows, but not rowspan reaches last row -->
-          <xsl:when test="parent::tr/following-sibling::tr and
-             not(@rowspan = count(parent::tr/following-sibling::tr) + 1)">1</xsl:when>
+          <xsl:when test="parent::d:tr/following-sibling::d:tr and
+             not(@rowspan = count(parent::d:tr/following-sibling::d:tr) + 1)">1</xsl:when>
           <xsl:otherwise>0</xsl:otherwise>
         </xsl:choose>
       </xsl:variable>
       <xsl:variable name="rowborder">
         <xsl:choose>
           <!-- If in thead and tbody has rows, add border -->
-          <xsl:when test="parent::tr/parent::thead/
-                          following-sibling::tbody/tr">1</xsl:when>
+          <xsl:when test="parent::d:tr/parent::d:thead/
+                          following-sibling::d:tbody/d:tr">1</xsl:when>
           <!-- If in tbody and tfoot has rows, add border -->
-          <xsl:when test="parent::tr/parent::tbody/
-                          following-sibling::tfoot/tr">1</xsl:when>
-          <xsl:when test="parent::tr/parent::tbody/
-                          preceding-sibling::tfoot/tr">1</xsl:when>
+          <xsl:when test="parent::d:tr/parent::d:tbody/
+                          following-sibling::d:tfoot/d:tr">1</xsl:when>
+          <xsl:when test="parent::d:tr/parent::d:tbody/
+                          preceding-sibling::d:tfoot/d:tr">1</xsl:when>
           <!-- If following rows, but not rowspan reaches last row -->
-          <xsl:when test="parent::tr/following-sibling::tr and
-             not(@rowspan = count(parent::tr/following-sibling::tr) + 1)">1</xsl:when>
+          <xsl:when test="parent::d:tr/following-sibling::d:tr and
+             not(@rowspan = count(parent::d:tr/following-sibling::d:tr) + 1)">1</xsl:when>
           <xsl:otherwise>0</xsl:otherwise>
         </xsl:choose>
       </xsl:variable>
         </xsl:attribute>
       </xsl:if>
     </xsl:when>
-    <xsl:when test="$rules = 'groups' and ancestor::thead 
-                    and not(parent::tr/following-sibling::tr)">
+    <xsl:when test="$rules = 'groups' and ancestor::d:thead
+                    and not(parent::d:tr/following-sibling::d:tr)">
       <xsl:attribute name="border-start-style">none</xsl:attribute>
       <xsl:attribute name="border-end-style">none</xsl:attribute>
       <xsl:attribute name="border-top-style">none</xsl:attribute>
         <xsl:value-of select="$table.frame.border.color"/>
       </xsl:attribute>
     </xsl:when>
-    <xsl:when test="$rules = 'groups' and ancestor::tfoot 
-                    and not(parent::tr/preceding-sibling::tr)">
+    <xsl:when test="$rules = 'groups' and ancestor::d:tfoot
+                    and not(parent::d:tr/preceding-sibling::d:tr)">
       <xsl:attribute name="border-start-style">none</xsl:attribute>
       <xsl:attribute name="border-end-style">none</xsl:attribute>
       <xsl:attribute name="border-top-style">none</xsl:attribute>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="caption" mode="htmlTable">
+<xsl:template match="d:caption" mode="htmlTable">
   <!-- Handled by formal.object.heading -->
 </xsl:template>
 
   <xsl:param name="number" select="1"/>
 
   <xsl:choose>
-    <xsl:when test="col|colgroup/col">
-      <xsl:for-each select="col|colgroup/col">
+    <xsl:when test="d:col|d:colgroup/d:col">
+      <xsl:for-each select="d:col|d:colgroup/d:col">
         <fo:table-column>
           <xsl:attribute name="column-number">
-            <xsl:number from="table|informaltable" level="any" format="1"/>
+            <xsl:number from="d:table|d:informaltable" level="any" format="1"/>
           </xsl:attribute>
           <xsl:if test="@width">
             <xsl:attribute name="column-width">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="tbody" mode="htmlTable">
+<xsl:template match="d:tbody" mode="htmlTable">
   <fo:table-body start-indent="0pt"
                  end-indent="0pt">
     <xsl:apply-templates mode="htmlTable"/>
   </fo:table-body>
 </xsl:template>
 
-<xsl:template match="tfoot" mode="htmlTable">
+<xsl:template match="d:tfoot" mode="htmlTable">
   <fo:table-footer start-indent="0pt"
                    end-indent="0pt">
     <xsl:apply-templates mode="htmlTable"/>
   </fo:table-footer>
 </xsl:template>
 
-<xsl:template match="th|td" mode="htmlTable">
+<xsl:template match="d:th|d:td" mode="htmlTable">
   <xsl:variable name="bgcolor.pi">
     <xsl:call-template name="pi.dbfo_bgcolor"/>
   </xsl:variable>
   <xsl:variable name="align">
     <xsl:call-template name="inherited.table.attribute">
       <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="row" select="parent::tr"/>
+      <xsl:with-param name="row" select="parent::d:tr"/>
       <xsl:with-param name="attribute" select="'align'"/>
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="valign">
     <xsl:call-template name="inherited.table.attribute">
       <xsl:with-param name="entry" select="."/>
-      <xsl:with-param name="row" select="parent::tr"/>
+      <xsl:with-param name="row" select="parent::d:tr"/>
       <xsl:with-param name="attribute" select="'valign'"/>
     </xsl:call-template>
   </xsl:variable>
   </fo:table-cell>
 </xsl:template>
 
-<xsl:template match="thead" mode="htmlTable">
+<xsl:template match="d:thead" mode="htmlTable">
   <fo:table-header start-indent="0pt"
                    end-indent="0pt">
     <xsl:apply-templates mode="htmlTable"/>
   </fo:table-header>
 </xsl:template>
 
-<xsl:template match="tr" mode="htmlTable">
+<xsl:template match="d:tr" mode="htmlTable">
   <fo:table-row>
     <xsl:call-template name="table.row.properties"/>
     <xsl:apply-templates mode="htmlTable"/>
index e90b513e635bff6b037962ffa1ff3fd2111694c9..d06dbaea0c3e6fae14a6b3281740b8bf4a365b35 100644 (file)
@@ -3,8 +3,10 @@
 <!ENTITY % common.entities SYSTEM "../common/entities.ent">
 %common.entities;
 ]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:rx="http://www.renderx.com/XSL/Extensions"
                 version='1.0'>
 
@@ -18,7 +20,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="index">
+<xsl:template match="d:index">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -28,7 +30,7 @@
     <xsl:when test="$make.index.markup != 0">
       <fo:block>
         <xsl:call-template name="generate-index-markup">
-          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+          <xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
         </xsl:call-template>
       </fo:block>
     </xsl:when>
@@ -37,9 +39,9 @@
         <xsl:call-template name="index.titlepage"/>
       </fo:block>
       <xsl:apply-templates/>
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+      <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
         <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+          <xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
         </xsl:call-template>
       </xsl:if>
     </xsl:otherwise>
@@ -47,7 +49,7 @@
  </xsl:if>
 </xsl:template>
 
-<xsl:template match="book/index|part/index">
+<xsl:template match="d:book/d:index|d:part/d:index">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
         <xsl:call-template name="index.titlepage"/>
       </fo:block>
       <xsl:apply-templates/>
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+      <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
 
         <xsl:choose>
           <xsl:when test="$make.index.markup != 0">
                       xsl:use-attribute-sets="monospace.verbatim.properties"
                       linefeed-treatment="preserve">
               <xsl:call-template name="generate-index-markup">
-                <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+                <xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
               </xsl:call-template>
             </fo:block>
           </xsl:when>
-          <xsl:when test="indexentry|indexdiv/indexentry">
+          <xsl:when test="d:indexentry|d:indexdiv/d:indexentry">
             <xsl:apply-templates/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:call-template name="generate-index">
-              <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+              <xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
             </xsl:call-template>
           </xsl:otherwise>
         </xsl:choose>
  </xsl:if>
 </xsl:template>
 
-<xsl:template match="setindex">
+<xsl:template match="d:setindex">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
         <xsl:call-template name="setindex.titlepage"/>
       </fo:block>
       <xsl:apply-templates/>
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+      <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
 
         <xsl:choose>
           <xsl:when test="$make.index.markup != 0">
               </xsl:call-template>
             </fo:block>
           </xsl:when>
-          <xsl:when test="indexentry|indexdiv/indexentry">
+          <xsl:when test="d:indexentry|d:indexdiv/d:indexentry">
             <xsl:apply-templates/>
           </xsl:when>
           <xsl:otherwise>
  </xsl:if>
 </xsl:template>
 
-<xsl:template match="index/indexinfo"></xsl:template>
-<xsl:template match="index/info"></xsl:template>
-<xsl:template match="index/title"></xsl:template>
-<xsl:template match="index/subtitle"></xsl:template>
-<xsl:template match="index/titleabbrev"></xsl:template>
+<xsl:template match="d:index/d:indexinfo"></xsl:template>
+<xsl:template match="d:index/d:info"></xsl:template>
+<xsl:template match="d:index/d:title"></xsl:template>
+<xsl:template match="d:index/d:subtitle"></xsl:template>
+<xsl:template match="d:index/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
   </fo:block>
 </xsl:template>
 
-<xsl:template match="indexdiv">
+<xsl:template match="d:indexdiv">
   <fo:block>
     <xsl:call-template name="indexdiv.titlepage"/>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="indexdiv/title"/>
-<xsl:template match="indexdiv/subtitle"/>
-<xsl:template match="indexdiv/titleabbrev"/>
+<xsl:template match="d:indexdiv/d:title"/>
+<xsl:template match="d:indexdiv/d:subtitle"/>
+<xsl:template match="d:indexdiv/d:titleabbrev"/>
 
 <!-- ==================================================================== -->
 
 <!-- Text used for distiguishing between normal and significant entries -->
 <xsl:variable name="significant.flag">.tnacifingis</xsl:variable>
 
-<xsl:template match="indexterm" name="indexterm">
+<xsl:template match="d:indexterm" name="indexterm">
   <!-- Temporal workaround for bug in AXF -->
   <xsl:variable name="wrapper.name">
     <xsl:choose>
         <xsl:attribute name="rx:key">
           <xsl:value-of select="&primary;"/>
           <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
-          <xsl:if test="secondary">
+          <xsl:if test="d:secondary">
             <xsl:text>, </xsl:text>
             <xsl:value-of select="&secondary;"/>
           </xsl:if>
-          <xsl:if test="tertiary">
+          <xsl:if test="d:tertiary">
             <xsl:text>, </xsl:text>
             <xsl:value-of select="&tertiary;"/>
           </xsl:if>
         <xsl:comment>
           <xsl:call-template name="comment-escape-string">
             <xsl:with-param name="string">
-              <xsl:value-of select="primary"/>
-              <xsl:if test="secondary">
+              <xsl:value-of select="d:primary"/>
+              <xsl:if test="d:secondary">
                 <xsl:text>, </xsl:text>
-                <xsl:value-of select="secondary"/>
+                <xsl:value-of select="d:secondary"/>
               </xsl:if>
-              <xsl:if test="tertiary">
+              <xsl:if test="d:tertiary">
                 <xsl:text>, </xsl:text>
-                <xsl:value-of select="tertiary"/>
+                <xsl:value-of select="d:tertiary"/>
               </xsl:if>
             </xsl:with-param>
           </xsl:call-template>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="indexterm[@class='startofrange']">
+<xsl:template match="d:indexterm[@class='startofrange']">
   <xsl:choose>
     <xsl:when test="$xep.extensions != 0">
       <rx:begin-index-range>
         <xsl:attribute name="rx:key">
           <xsl:value-of select="&primary;"/>
           <xsl:if test="@significance='preferred'"><xsl:value-of select="$significant.flag"/></xsl:if>
-          <xsl:if test="secondary">
+          <xsl:if test="d:secondary">
             <xsl:text>, </xsl:text>
             <xsl:value-of select="&secondary;"/>
           </xsl:if>
-          <xsl:if test="tertiary">
+          <xsl:if test="d:tertiary">
             <xsl:text>, </xsl:text>
             <xsl:value-of select="&tertiary;"/>
           </xsl:if>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm[@class='endofrange']">
+<xsl:template match="d:indexterm[@class='endofrange']">
   <xsl:choose>
     <xsl:when test="$xep.extensions != 0">
       <rx:end-index-range>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="indexentry">
+<xsl:template match="d:indexentry">
   <fo:block>
     <!-- don't process 'seeie's from here -->
-    <xsl:apply-templates select="primaryie|secondaryie|tertiaryie|seealsoie"/>
+    <xsl:apply-templates select="d:primaryie|d:secondaryie|d:tertiaryie|d:seealsoie"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="primaryie">
+<xsl:template match="d:primaryie">
   <fo:block>
     <xsl:apply-templates/>
-    <xsl:if test="following-sibling::seeie">
+    <xsl:if test="following-sibling::d:seeie">
       <xsl:text> (</xsl:text>
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'see'"/>
       </xsl:call-template>
       <xsl:text> </xsl:text>
-      <xsl:apply-templates select="following-sibling::seeie"/>
+      <xsl:apply-templates select="following-sibling::d:seeie"/>
       <xsl:text>)</xsl:text>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="secondaryie">
+<xsl:template match="d:secondaryie">
   <fo:block start-indent="1pc">
     <xsl:apply-templates/>
-    <xsl:if test="following-sibling::seeie">
+    <xsl:if test="following-sibling::d:seeie">
       <xsl:text> (</xsl:text>
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'see'"/>
       </xsl:call-template>
       <xsl:text> </xsl:text>
-      <xsl:apply-templates select="following-sibling::seeie"/>
+      <xsl:apply-templates select="following-sibling::d:seeie"/>
       <xsl:text>)</xsl:text>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="tertiaryie">
+<xsl:template match="d:tertiaryie">
   <fo:block start-indent="2pc">
     <xsl:apply-templates/>
-    <xsl:if test="following-sibling::seeie">
+    <xsl:if test="following-sibling::d:seeie">
       <xsl:text> (</xsl:text>
       <xsl:call-template name="gentext">
         <xsl:with-param name="key" select="'see'"/>
       </xsl:call-template>
       <xsl:text> </xsl:text>
-      <xsl:apply-templates select="following-sibling::seeie"/>
+      <xsl:apply-templates select="following-sibling::d:seeie"/>
       <xsl:text>)</xsl:text>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="seeie">
+<xsl:template match="d:seeie">
   <fo:inline>
     <xsl:apply-templates/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="seealsoie">
+<xsl:template match="d:seealsoie">
   <fo:block>
     <xsl:attribute name="start-indent">
       <xsl:choose>
-        <xsl:when test="(preceding-sibling::tertiaryie |
-                         preceding-sibling::secondaryie)[last()]
-                         [self::tertiaryie]">3pc</xsl:when>
-        <xsl:when test="(preceding-sibling::tertiaryie |
-                         preceding-sibling::secondaryie)[last()]
-                         [self::secondaryie]">2pc</xsl:when>
+        <xsl:when test="(preceding-sibling::d:tertiaryie |
+                         preceding-sibling::d:secondaryie)[last()]
+                         [self::d:tertiaryie]">3pc</xsl:when>
+        <xsl:when test="(preceding-sibling::d:tertiaryie |
+                         preceding-sibling::d:secondaryie)[last()]
+                         [self::d:secondaryie]">2pc</xsl:when>
         <xsl:otherwise>1pc</xsl:otherwise>
       </xsl:choose>
     </xsl:attribute>
index 6b3e6468f082ca5a577a9cd640fa8509a7053c56..8c423e9799c451c84466e63c31339ea897e531da 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -21,7 +23,7 @@
 <!-- ==================================================================== -->
 <!-- called from named templates in a given mode -->
 
-<xsl:template match="corpauthor">
+<xsl:template match="d:corpauthor">
   <fo:inline>
     <xsl:apply-templates/>
   </fo:inline>
index db76305ac217c4eea09d54949422490785e44f21..bbe2bb7c43c3d7b910c107a0251952ad0f1f1026 100644 (file)
@@ -4,9 +4,10 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="xlink"
+                exclude-result-prefixes="xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -17,8 +18,8 @@
 
      ******************************************************************** -->
 
-<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/>
-<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/>
+<xsl:key name="glossentries" match="d:glossentry" use="normalize-space(d:glossterm)"/>
+<xsl:key name="glossentries" match="d:glossentry" use="normalize-space(d:glossterm/@baseform)"/>
 
 <xsl:template name="simple.xlink">
   <xsl:param name="node" select="."/>
 <!-- ==================================================================== -->
 <!-- some special cases -->
 
-<xsl:template match="author">
+<xsl:template match="d:author">
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
       <xsl:call-template name="person.name"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="editor">
+<xsl:template match="d:editor">
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
       <xsl:call-template name="person.name"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="othercredit">
+<xsl:template match="d:othercredit">
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
       <xsl:call-template name="person.name"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="authorinitials">
+<xsl:template match="d:authorinitials">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="accel">
+<xsl:template match="d:accel">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="action">
+<xsl:template match="d:action">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="application">
+<xsl:template match="d:application">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="classname">
+<xsl:template match="d:classname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="exceptionname">
+<xsl:template match="d:exceptionname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="interfacename">
+<xsl:template match="d:interfacename">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="methodname">
+<xsl:template match="d:methodname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="command">
+<xsl:template match="d:command">
   <xsl:call-template name="inline.boldseq"/>
 </xsl:template>
 
-<xsl:template match="computeroutput">
+<xsl:template match="d:computeroutput">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="constant">
+<xsl:template match="d:constant">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="database">
+<xsl:template match="d:database">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="date">
+<xsl:template match="d:date">
   <!-- should this support locale-specific formatting? how? -->
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errorcode">
+<xsl:template match="d:errorcode">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errorname">
+<xsl:template match="d:errorname">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errortype">
+<xsl:template match="d:errortype">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errortext">
+<xsl:template match="d:errortext">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="envar">
+<xsl:template match="d:envar">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="filename">
+<xsl:template match="d:filename">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="function">
+<xsl:template match="d:function">
   <xsl:choose>
     <xsl:when test="$function.parens != '0'
-                    and (parameter or function or replaceable)">
+                    and (d:parameter or d:function or d:replaceable)">
       <xsl:variable name="nodes" select="text()|*"/>
       <xsl:call-template name="inline.monoseq">
         <xsl:with-param name="content">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="function/parameter" priority="2">
+<xsl:template match="d:function/d:parameter" priority="2">
   <xsl:call-template name="inline.italicmonoseq"/>
   <xsl:if test="$function.parens != 0 and following-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="function/replaceable" priority="2">
+<xsl:template match="d:function/d:replaceable" priority="2">
   <xsl:call-template name="inline.italicmonoseq"/>
   <xsl:if test="$function.parens != 0 and following-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="guibutton">
+<xsl:template match="d:guibutton">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guiicon">
+<xsl:template match="d:guiicon">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guilabel">
+<xsl:template match="d:guilabel">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guimenu">
+<xsl:template match="d:guimenu">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guimenuitem">
+<xsl:template match="d:guimenuitem">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guisubmenu">
+<xsl:template match="d:guisubmenu">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="hardware">
+<xsl:template match="d:hardware">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="interface">
+<xsl:template match="d:interface">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="interfacedefinition">
+<xsl:template match="d:interfacedefinition">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="keycap">
+<xsl:template match="d:keycap">
   <xsl:choose>
     <xsl:when test="@function and normalize-space(.) = ''">
       <xsl:call-template name="inline.boldseq">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="keycode">
+<xsl:template match="d:keycode">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="keysym">
+<xsl:template match="d:keysym">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="literal">
+<xsl:template match="d:literal">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="code">
+<xsl:template match="d:code">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="medialabel">
+<xsl:template match="d:medialabel">
   <xsl:call-template name="inline.italicseq"/>
 </xsl:template>
 
-<xsl:template match="shortcut">
+<xsl:template match="d:shortcut">
   <xsl:call-template name="inline.boldseq"/>
 </xsl:template>
 
-<xsl:template match="mousebutton">
+<xsl:template match="d:mousebutton">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="option">
+<xsl:template match="d:option">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="package">
+<xsl:template match="d:package">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="parameter">
+<xsl:template match="d:parameter">
   <xsl:call-template name="inline.italicmonoseq"/>
 </xsl:template>
 
-<xsl:template match="property">
+<xsl:template match="d:property">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="prompt">
+<xsl:template match="d:prompt">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="replaceable">
+<xsl:template match="d:replaceable">
   <xsl:call-template name="inline.italicmonoseq"/>
 </xsl:template>
 
-<xsl:template match="returnvalue">
+<xsl:template match="d:returnvalue">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="structfield">
+<xsl:template match="d:structfield">
   <xsl:call-template name="inline.italicmonoseq"/>
 </xsl:template>
 
-<xsl:template match="structname">
+<xsl:template match="d:structname">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="symbol">
+<xsl:template match="d:symbol">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="systemitem">
+<xsl:template match="d:systemitem">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="token">
+<xsl:template match="d:token">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="type">
+<xsl:template match="d:type">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="userinput">
+<xsl:template match="d:userinput">
   <xsl:call-template name="inline.boldmonoseq"/>
 </xsl:template>
 
-<xsl:template match="abbrev">
+<xsl:template match="d:abbrev">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="acronym">
+<xsl:template match="d:acronym">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="citerefentry">
+<xsl:template match="d:citerefentry">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="citetitle">
+<xsl:template match="d:citetitle">
   <xsl:choose>
     <xsl:when test="@pubwork = 'article'">
       <xsl:call-template name="gentext.startquote"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="emphasis">
+<xsl:template match="d:emphasis">
   <xsl:choose>
     <xsl:when test="@role='bold' or @role='strong'">
       <xsl:call-template name="inline.boldseq"/>
     </xsl:when>
     <xsl:otherwise>
       <!-- How many regular emphasis ancestors does this element have -->
-      <xsl:variable name="depth" select="count(ancestor::emphasis
+      <xsl:variable name="depth" select="count(ancestor::d:emphasis
        [not(contains(' bold strong underline strikethrough ', concat(' ', @role, ' ')))]
        )"/>
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="foreignphrase">
+<xsl:template match="d:foreignphrase">
   <xsl:call-template name="inline.italicseq"/>
 </xsl:template>
 
-<xsl:template match="markup">
+<xsl:template match="d:markup">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="phrase">
+<xsl:template match="d:phrase">
   <fo:inline>
     <xsl:call-template name="anchor"/>
     <xsl:call-template name="inline.charseq"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="quote">
+<xsl:template match="d:quote">
   <xsl:variable name="depth">
     <xsl:call-template name="dot.count">
       <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
 
 </xsl:template>
 
-<xsl:template match="varname">
+<xsl:template match="d:varname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="wordasword">
+<xsl:template match="d:wordasword">
   <xsl:call-template name="inline.italicseq"/>
 </xsl:template>
 
-<xsl:template match="lineannotation">
+<xsl:template match="d:lineannotation">
   <fo:inline font-style="italic">
     <xsl:call-template name="inline.charseq"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="superscript">
+<xsl:template match="d:superscript">
   <xsl:call-template name="inline.superscriptseq"/>
 </xsl:template>
 
-<xsl:template match="subscript">
+<xsl:template match="d:subscript">
   <xsl:call-template name="inline.subscriptseq"/>
 </xsl:template>
 
-<xsl:template match="trademark">
+<xsl:template match="d:trademark">
   <xsl:call-template name="inline.charseq"/>
   <xsl:choose>
     <xsl:when test="@class = 'copyright'
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="firstterm">
+<xsl:template match="d:firstterm">
   <xsl:call-template name="glossterm">
     <xsl:with-param name="firstterm" select="1"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="glossterm" name="glossterm">
+<xsl:template match="d:glossterm" name="glossterm">
   <xsl:param name="firstterm" select="0"/>
 
   <xsl:choose>
         </xsl:choose>
       </xsl:variable>
       <xsl:variable name="cterm"
-           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+           select="(document($glossary.collection,.)//d:glossentry[d:glossterm=$term])[1]"/>
 
       <xsl:choose>
         <xsl:when test="not($cterm)">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="termdef">
+<xsl:template match="d:termdef">
   <fo:inline>
     <xsl:call-template name="gentext.template">
       <xsl:with-param name="context" select="'termdef'"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="sgmltag|tag">
+<xsl:template match="d:sgmltag|d:tag">
   <xsl:variable name="class">
     <xsl:choose>
       <xsl:when test="@class">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="email">
+<xsl:template match="d:email">
   <xsl:call-template name="inline.monoseq">
     <xsl:with-param name="content">
       <fo:inline keep-together.within-line="always" hyphenate="false">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="keycombo">
+<xsl:template match="d:keycombo">
   <xsl:variable name="action" select="@action"/>
   <xsl:variable name="joinchar">
     <xsl:choose>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="uri">
+<xsl:template match="d:uri">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="menuchoice">
-  <xsl:variable name="shortcut" select="./shortcut"/>
+<xsl:template match="d:menuchoice">
+  <xsl:variable name="shortcut" select="./d:shortcut"/>
   <xsl:call-template name="process.menuchoice"/>
   <xsl:if test="$shortcut">
     <xsl:text> (</xsl:text>
 </xsl:template>
 
 <xsl:template name="process.menuchoice">
-  <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
+  <xsl:param name="nodelist" select="d:guibutton|d:guiicon|d:guilabel|d:guimenu|d:guimenuitem|d:guisubmenu|d:interface"/><!-- not(shortcut) -->
   <xsl:param name="count" select="1"/>
 
   <xsl:variable name="mm.separator">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="optional">
+<xsl:template match="d:optional">
   <xsl:value-of select="$arg.choice.opt.open.str"/>
   <xsl:call-template name="inline.charseq"/>
   <xsl:value-of select="$arg.choice.opt.close.str"/>
 </xsl:template>
 
-<xsl:template match="citation">
+<xsl:template match="d:citation">
   <!-- todo: integrate with bibliography collection -->
-  <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
+  <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[d:abbrev = string(current())]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
     <!-- try automatic linking based on match to abbrev -->
-    <xsl:when test="$target and not(xref) and not(link)">
+    <xsl:when test="$target and not(d:xref) and not(d:link)">
 
       <xsl:text>[</xsl:text>
       <fo:basic-link>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="citebiblioid">
-  <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
+<xsl:template match="d:citebiblioid">
+  <xsl:variable name="targets" select="//*[d:biblioid = string(current())]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
     <!-- try automatic linking based on match to parent of biblioid -->
-    <xsl:when test="$target and not(xref) and not(link)">
+    <xsl:when test="$target and not(d:xref) and not(d:link)">
 
       <xsl:text>[</xsl:text>
       <fo:basic-link>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="citation">
-  <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="citation">
+  <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
               level="any" format="1"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
+<xsl:template match="d:comment[&comment.block.parents;]|d:remark[&comment.block.parents;]">
   <xsl:if test="$show.comments != 0">
     <fo:block font-style="italic">
       <xsl:call-template name="inline.charseq"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="comment|remark">
+<xsl:template match="d:comment|d:remark">
   <xsl:if test="$show.comments != 0">
     <fo:inline font-style="italic">
       <xsl:call-template name="inline.charseq"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="productname">
+<xsl:template match="d:productname">
   <xsl:call-template name="inline.charseq"/>
   <xsl:if test="@class">
     <xsl:call-template name="dingbat">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="productnumber">
+<xsl:template match="d:productnumber">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
+<xsl:template match="d:pob|d:street|d:city|d:state|d:postcode|d:country|d:otheraddr">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="phone|fax">
+<xsl:template match="d:phone|d:fax">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- in Addresses, for example -->
-<xsl:template match="honorific|firstname|surname|lineage|othername">
+<xsl:template match="d:honorific|d:firstname|d:surname|d:lineage|d:othername">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="person">
-  <xsl:apply-templates select="personname"/>
+<xsl:template match="d:person">
+  <xsl:apply-templates select="d:personname"/>
 </xsl:template>
 
-<xsl:template match="personname">
+<xsl:template match="d:personname">
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
       <xsl:call-template name="person.name"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="jobtitle">
+<xsl:template match="d:jobtitle">
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
       <xsl:apply-templates/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="org">
+<xsl:template match="d:org">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="orgname">
+<xsl:template match="d:orgname">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="orgdiv">
+<xsl:template match="d:orgdiv">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="affiliation">
+<xsl:template match="d:affiliation">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="beginpage">
+<xsl:template match="d:beginpage">
   <!-- does nothing; this *is not* markup to force a page break. -->
 </xsl:template>
 
index 10fc5d86014cc70f9a5097949dc0a4fec580c903..425993003b0783226161ab0d9ce280a5a5bec2fd 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -11,8 +13,8 @@
 
      ******************************************************************** -->
 
-<xsl:template match="keywordset"></xsl:template>
-<xsl:template match="subjectset"></xsl:template>
+<xsl:template match="d:keywordset"></xsl:template>
+<xsl:template match="d:subjectset"></xsl:template>
 
 <!-- ==================================================================== -->
 
index 581d94867373cc22d1d709211c60a23fc26c3ab4..84d0dd9d5c668f89f941bf11d5787e06baa50909 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -13,7 +15,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="itemizedlist">
+<xsl:template match="d:itemizedlist">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  <xsl:if test="d:title">
+    <xsl:apply-templates select="d:title" mode="list.title.mode"/>
   </xsl:if>
 
   <!-- Preserve order of PIs and comments -->
   <xsl:apply-templates 
-      select="*[not(self::listitem
-                or self::title
-                or self::titleabbrev)]
-              |comment()[not(preceding-sibling::listitem)]
-              |processing-instruction()[not(preceding-sibling::listitem)]"/>
+      select="*[not(self::d:listitem
+                or self::d:title
+                or self::d:titleabbrev)]
+              |comment()[not(preceding-sibling::d:listitem)]
+              |processing-instruction()[not(preceding-sibling::d:listitem)]"/>
 
   <xsl:variable name="content">
     <xsl:apply-templates 
-          select="listitem
-                  |comment()[preceding-sibling::listitem]
-                  |processing-instruction()[preceding-sibling::listitem]"/>
+          select="d:listitem
+                  |comment()[preceding-sibling::d:listitem]
+                  |processing-instruction()[preceding-sibling::d:listitem]"/>
   </xsl:variable>
 
   <!-- nested lists don't add extra list-block spacing -->
   <xsl:choose>
-    <xsl:when test="ancestor::listitem">
+    <xsl:when test="ancestor::d:listitem">
       <fo:list-block id="{$id}" xsl:use-attribute-sets="itemizedlist.properties">
         <xsl:attribute name="provisional-distance-between-starts">
           <xsl:value-of select="$label-width"/>
 
 </xsl:template>
 
-<xsl:template match="itemizedlist/title|orderedlist/title">
+<xsl:template match="d:itemizedlist/d:title|d:orderedlist/d:title">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="variablelist/title" mode="vl.as.list">
+<xsl:template match="d:variablelist/d:title" mode="vl.as.list">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="variablelist/title" mode="vl.as.blocks">
+<xsl:template match="d:variablelist/d:title" mode="vl.as.blocks">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
+<xsl:template match="d:itemizedlist/d:titleabbrev|d:orderedlist/d:titleabbrev">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="procedure/titleabbrev">
+<xsl:template match="d:procedure/d:titleabbrev">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="variablelist/titleabbrev" mode="vl.as.list">
+<xsl:template match="d:variablelist/d:titleabbrev" mode="vl.as.list">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="variablelist/titleabbrev" mode="vl.as.blocks">
+<xsl:template match="d:variablelist/d:titleabbrev" mode="vl.as.blocks">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="itemizedlist/listitem">
+<xsl:template match="d:itemizedlist/d:listitem">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:variable name="keep.together">
         <xsl:call-template name="itemizedlist.label.markup">
           <xsl:with-param name="itemsymbol">
             <xsl:call-template name="list.itemsymbol">
-              <xsl:with-param name="node" select="parent::itemizedlist"/>
+              <xsl:with-param name="node" select="parent::d:itemizedlist"/>
             </xsl:call-template>
           </xsl:with-param>
         </xsl:call-template>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="orderedlist">
+<xsl:template match="d:orderedlist">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  <xsl:if test="d:title">
+    <xsl:apply-templates select="d:title" mode="list.title.mode"/>
   </xsl:if>
 
   <!-- Preserve order of PIs and comments -->
   <xsl:apply-templates 
-      select="*[not(self::listitem
-                or self::title
-                or self::titleabbrev)]
-              |comment()[not(preceding-sibling::listitem)]
-              |processing-instruction()[not(preceding-sibling::listitem)]"/>
+      select="*[not(self::d:listitem
+                or self::d:title
+                or self::d:titleabbrev)]
+              |comment()[not(preceding-sibling::d:listitem)]
+              |processing-instruction()[not(preceding-sibling::d:listitem)]"/>
 
   <xsl:variable name="content">
     <xsl:apply-templates 
-          select="listitem
-                  |comment()[preceding-sibling::listitem]
-                  |processing-instruction()[preceding-sibling::listitem]"/>
+          select="d:listitem
+                  |comment()[preceding-sibling::d:listitem]
+                  |processing-instruction()[preceding-sibling::d:listitem]"/>
   </xsl:variable>
 
   <!-- nested lists don't add extra list-block spacing -->
   <xsl:choose>
-    <xsl:when test="ancestor::listitem">
+    <xsl:when test="ancestor::d:listitem">
       <fo:list-block id="{$id}" xsl:use-attribute-sets="orderedlist.properties">
         <xsl:attribute name="provisional-distance-between-starts">
           <xsl:value-of select="$label-width"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem">
+<xsl:template match="d:orderedlist/d:listitem">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:variable name="keep.together">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="listitem/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
+<xsl:template match="d:listitem/*[1][local-name()='para' or
+                                   local-name()='simpara' or
                                    local-name()='formalpara']
-                     |glossdef/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
+                     |d:glossdef/*[1][local-name()='para' or
+                                   local-name()='simpara' or
                                    local-name()='formalpara']
-                     |step/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
+                     |d:step/*[1][local-name()='para' or
+                                   local-name()='simpara' or
                                    local-name()='formalpara']
-                     |callout/*[1][local-name()='para' or 
-                                   local-name()='simpara' or 
+                     |d:callout/*[1][local-name()='para' or
+                                   local-name()='simpara' or
                                    local-name()='formalpara']"
               priority="2">
   <fo:block xsl:use-attribute-sets="para.properties">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="variablelist">
+<xsl:template match="d:variablelist">
   <xsl:variable name="presentation">
     <xsl:call-template name="pi.dbfo_list-presentation"/>
   </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="variablelist" mode="vl.as.list">
+<xsl:template match="d:variablelist" mode="vl.as.list">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="longest.term">
-          <xsl:with-param name="terms" select="varlistentry/term"/>
+          <xsl:with-param name="terms" select="d:varlistentry/d:term"/>
           <xsl:with-param name="maxlength" select="$variablelist.max.termlength"/>
         </xsl:call-template>
         <xsl:text>em * 0.60</xsl:text>
     <xsl:value-of select="$label-separation"/>
   </xsl:variable>
 
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  <xsl:if test="d:title">
+    <xsl:apply-templates select="d:title" mode="list.title.mode"/>
   </xsl:if>
 
   <!-- Preserve order of PIs and comments -->
   <xsl:apply-templates 
-    select="*[not(self::varlistentry
-              or self::title
-              or self::titleabbrev)]
-            |comment()[not(preceding-sibling::varlistentry)]
-            |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+    select="*[not(self::d:varlistentry
+              or self::d:title
+              or self::d:titleabbrev)]
+            |comment()[not(preceding-sibling::d:varlistentry)]
+            |processing-instruction()[not(preceding-sibling::d:varlistentry)]"/>
 
   <xsl:variable name="content">
     <xsl:apply-templates mode="vl.as.list"
-      select="varlistentry
-              |comment()[preceding-sibling::varlistentry]
-              |processing-instruction()[preceding-sibling::varlistentry]"/>
+      select="d:varlistentry
+              |comment()[preceding-sibling::d:varlistentry]
+              |processing-instruction()[preceding-sibling::d:varlistentry]"/>
   </xsl:variable>
 
   <!-- nested lists don't add extra list-block spacing -->
   <xsl:choose>
-    <xsl:when test="ancestor::listitem">
+    <xsl:when test="ancestor::d:listitem">
       <fo:list-block id="{$id}"
                      provisional-distance-between-starts=
                         "{$distance-between-starts}"
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="varlistentry" mode="vl.as.list">
+<xsl:template match="d:varlistentry" mode="vl.as.list">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   <xsl:variable name="item.contents">
     <fo:list-item-label end-indent="label-end()" text-align="start">
       <fo:block xsl:use-attribute-sets="variablelist.term.properties">
-        <xsl:apply-templates select="term"/>
+        <xsl:apply-templates select="d:term"/>
       </fo:block>
     </fo:list-item-label>
     <fo:list-item-body start-indent="body-start()">
       <fo:block>
-        <xsl:apply-templates select="listitem"/>
+        <xsl:apply-templates select="d:listitem"/>
       </fo:block>
     </fo:list-item-body>
   </xsl:variable>
 </xsl:template>
 
 
-<xsl:template match="variablelist" mode="vl.as.blocks">
+<xsl:template match="d:variablelist" mode="vl.as.blocks">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <!-- termlength is irrelevant -->
 
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  <xsl:if test="d:title">
+    <xsl:apply-templates select="d:title" mode="list.title.mode"/>
   </xsl:if>
 
   <!-- Preserve order of PIs and comments -->
   <xsl:apply-templates 
-    select="*[not(self::varlistentry
-              or self::title
-              or self::titleabbrev)]
-            |comment()[not(preceding-sibling::varlistentry)]
-            |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+    select="*[not(self::d:varlistentry
+              or self::d:title
+              or self::d:titleabbrev)]
+            |comment()[not(preceding-sibling::d:varlistentry)]
+            |processing-instruction()[not(preceding-sibling::d:varlistentry)]"/>
 
   <xsl:variable name="content">
     <xsl:apply-templates mode="vl.as.blocks"
-      select="varlistentry
-              |comment()[preceding-sibling::varlistentry]
-              |processing-instruction()[preceding-sibling::varlistentry]"/>
+      select="d:varlistentry
+              |comment()[preceding-sibling::d:varlistentry]
+              |processing-instruction()[preceding-sibling::d:varlistentry]"/>
   </xsl:variable>
 
   <!-- nested lists don't add extra list-block spacing -->
   <xsl:choose>
-    <xsl:when test="ancestor::listitem">
+    <xsl:when test="ancestor::d:listitem">
       <fo:block id="{$id}">
         <xsl:copy-of select="$content"/>
       </fo:block>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="varlistentry" mode="vl.as.blocks">
+<xsl:template match="d:varlistentry" mode="vl.as.blocks">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <fo:block id="{$id}" xsl:use-attribute-sets="variablelist.term.properties
                                                list.item.spacing"  
       keep-together.within-column="always" 
       keep-with-next.within-column="always">
-    <xsl:apply-templates select="term"/>
+    <xsl:apply-templates select="d:term"/>
   </fo:block>
 
   <fo:block>
     <xsl:attribute name="margin-{$direction.align.start}">0.25in</xsl:attribute>
-    <xsl:apply-templates select="listitem"/>
+    <xsl:apply-templates select="d:listitem"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="varlistentry/term">
+<xsl:template match="d:varlistentry/d:term">
   <fo:inline>
     <xsl:call-template name="anchor"/>
     <xsl:call-template name="simple.xlink">
     </xsl:call-template>
   </fo:inline>
   <xsl:choose>
-    <xsl:when test="not(following-sibling::term)"/> <!-- do nothing -->
+    <xsl:when test="not(following-sibling::d:term)"/> <!-- do nothing -->
     <xsl:otherwise>
       <!-- * if we have multiple terms in the same varlistentry, generate -->
       <!-- * a separator (", " by default) and/or an additional line -->
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="varlistentry/listitem">
+<xsl:template match="d:varlistentry/d:listitem">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="title" mode="list.title.mode">
+<xsl:template match="d:title" mode="list.title.mode">
   <xsl:call-template name="formal.object.heading">
     <xsl:with-param name="object" select=".."/>
   </xsl:call-template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="simplelist|simplelist[@type='vert']">
+<xsl:template match="d:simplelist|d:simplelist[@type='vert']">
   <!-- with no type specified, the default is 'vert' -->
 
   <xsl:variable name="id">
   </fo:table>
 </xsl:template>
 
-<xsl:template match="simplelist[@type='inline']">
+<xsl:template match="d:simplelist[@type='inline']">
   <!-- if dbchoice PI exists, use that to determine the choice separator -->
   <!-- (that is, equivalent of "and" or "or" in current locale), or literal -->
   <!-- value of "choice" otherwise -->
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:for-each select="member">
+  <xsl:for-each select="d:member">
     <xsl:apply-templates/>
     <xsl:choose>
       <xsl:when test="position() = last()"/> <!-- do nothing -->
   </xsl:for-each></fo:inline>
 </xsl:template>
 
-<xsl:template match="simplelist[@type='horiz']">
+<xsl:template match="d:simplelist[@type='horiz']">
 
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
 <xsl:template name="simplelist.horiz">
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
 
   <xsl:if test="$cell &lt;= count($members)">
     <fo:table-row>
 <xsl:template name="simplelist.horiz.row">
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
   <xsl:param name="curcol">1</xsl:param>
 
   <xsl:if test="$curcol &lt;= $cols">
 <xsl:template name="simplelist.vert">
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
   <xsl:param name="rows"
              select="floor((count($members)+$cols - 1) div $cols)"/>
 
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="rows">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
   <xsl:param name="curcol">1</xsl:param>
 
   <xsl:if test="$curcol &lt;= $cols">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="member">
+<xsl:template match="d:member">
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
       <xsl:apply-templates/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="procedure">
+<xsl:template match="d:procedure">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <!-- Preserve order of PIs and comments -->
   <xsl:variable name="preamble"
-        select="*[not(self::step
-                  or self::title
-                  or self::titleabbrev)]
-                |comment()[not(preceding-sibling::step)]
-                |processing-instruction()[not(preceding-sibling::step)]"/>
+        select="*[not(self::d:step
+                  or self::d:title
+                  or self::d:titleabbrev)]
+                |comment()[not(preceding-sibling::d:step)]
+                |processing-instruction()[not(preceding-sibling::d:step)]"/>
 
   <xsl:variable name="steps" 
-                select="step
-                        |comment()[preceding-sibling::step]
-                        |processing-instruction()[preceding-sibling::step]"/>
+                select="d:step
+                        |comment()[preceding-sibling::d:step]
+                        |processing-instruction()[preceding-sibling::d:step]"/>
 
   <fo:block id="{$id}" xsl:use-attribute-sets="procedure.properties list.block.spacing">
-    <xsl:if test="(title or blockinfo/title or info/title) and $placement = 'before'">
+    <xsl:if test="(d:title or d:blockinfo/d:title or d:info/d:title) and $placement = 'before'">
       <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" -->
       <!-- heading even though we called formal.object.heading. odd but true. -->
       <xsl:call-template name="formal.object.heading"/>
       <xsl:apply-templates select="$steps"/>
     </fo:list-block>
 
-    <xsl:if test="(title or blockinfo/title or info/title) and $placement != 'before'">
+    <xsl:if test="(d:title or d:blockinfo/d:title or d:info/d:title) and $placement != 'before'">
       <!-- n.b. gentext code tests for $formal.procedures and may make an "informal" -->
       <!-- heading even though we called formal.object.heading. odd but true. -->
       <xsl:call-template name="formal.object.heading"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="procedure/title">
+<xsl:template match="d:procedure/d:title">
 </xsl:template>
 
-<xsl:template match="substeps">
+<xsl:template match="d:substeps">
   <fo:list-block xsl:use-attribute-sets="list.block.spacing"
                  provisional-distance-between-starts="2em"
                  provisional-label-separation="0.2em">
   </fo:list-block>
 </xsl:template>
 
-<xsl:template match="procedure/step|substeps/step">
+<xsl:template match="d:procedure/d:step|d:substeps/d:step">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
       <fo:block id="{$id}">
         <!-- dwc: fix for one step procedures. Use a bullet if there's no step 2 -->
         <xsl:choose>
-          <xsl:when test="count(../step) = 1">
+          <xsl:when test="count(../d:step) = 1">
             <xsl:text>&#x2022;</xsl:text>
           </xsl:when>
           <xsl:otherwise>
   </fo:list-item>
 </xsl:template>
 
-<xsl:template match="stepalternatives">
+<xsl:template match="d:stepalternatives">
   <fo:list-block provisional-distance-between-starts="2em"
                  provisional-label-separation="0.2em">
-    <xsl:apply-templates select="step"/>
+    <xsl:apply-templates select="d:step"/>
   </fo:list-block>
 </xsl:template>
 
-<xsl:template match="stepalternatives/step">
+<xsl:template match="d:stepalternatives/d:step">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:list-item>
 </xsl:template>
 
-<xsl:template match="step/title">
+<xsl:template match="d:step/d:title">
   <fo:block font-weight="bold"
             keep-together.within-column="always" 
             keep-with-next.within-column="always">
 </xsl:template>
 
 <!-- Add (Optional) when the step is optional -->
-<xsl:template match="step[@performance = 'optional']/*[1][self::para]" priority="3">
+<xsl:template match="d:step[@performance = 'optional']/*[1][self::d:para]" priority="3">
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 </xsl:template>
 <!-- ==================================================================== -->
 
-<xsl:template match="segmentedlist">
+<xsl:template match="d:segmentedlist">
   <xsl:variable name="presentation">
     <xsl:call-template name="pi.dbfo_list-presentation"/>
   </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="segmentedlist/title">
+<xsl:template match="d:segmentedlist/d:title">
   <xsl:apply-templates select="." mode="list.title.mode" />
 </xsl:template>
 
-<xsl:template match="segtitle">
+<xsl:template match="d:segtitle">
 </xsl:template>
 
-<xsl:template match="segtitle" mode="segtitle-in-seg">
+<xsl:template match="d:segtitle" mode="segtitle-in-seg">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="seglistitem">
+<xsl:template match="d:seglistitem">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="seg">
-  <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
-  <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
-  <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+<xsl:template match="d:seg">
+  <xsl:variable name="segnum" select="count(preceding-sibling::d:seg)+1"/>
+  <xsl:variable name="seglist" select="ancestor::d:segmentedlist"/>
+  <xsl:variable name="segtitles" select="$seglist/d:segtitle"/>
 
   <!--
      Note: segtitle is only going to be the right thing in a well formed
   </fo:block>
 </xsl:template>
 
-<xsl:template match="segmentedlist" mode="seglist-table">
-  <xsl:apply-templates select="title" mode="list.title.mode" />
+<xsl:template match="d:segmentedlist" mode="seglist-table">
+  <xsl:apply-templates select="d:title" mode="list.title.mode" />
   <fo:table table-layout="fixed">
     <xsl:call-template name="segmentedlist.table.columns">
-      <xsl:with-param name="cols" select="count(segtitle)"/>
+      <xsl:with-param name="cols" select="count(d:segtitle)"/>
     </xsl:call-template>
     <fo:table-header start-indent="0pt" end-indent="0pt">
       <fo:table-row>
-        <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+        <xsl:apply-templates select="d:segtitle" mode="seglist-table"/>
       </fo:table-row>
     </fo:table-header>
     <fo:table-body start-indent="0pt" end-indent="0pt">
-      <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+      <xsl:apply-templates select="d:seglistitem" mode="seglist-table"/>
     </fo:table-body>
   </fo:table>
 </xsl:template>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="segtitle" mode="seglist-table">
+<xsl:template match="d:segtitle" mode="seglist-table">
   <fo:table-cell>
     <fo:block font-weight="bold">
       <xsl:apply-templates/>
   </fo:table-cell>
 </xsl:template>
 
-<xsl:template match="seglistitem" mode="seglist-table">
+<xsl:template match="d:seglistitem" mode="seglist-table">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:table-row>
 </xsl:template>
 
-<xsl:template match="seg" mode="seglist-table">
+<xsl:template match="d:seg" mode="seglist-table">
   <fo:table-cell>
     <fo:block>
       <xsl:apply-templates/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="calloutlist">
+<xsl:template match="d:calloutlist">
   <xsl:variable name="id">
   <xsl:call-template name="object.id"/>
   </xsl:variable>
   <fo:block id="{$id}"
             text-align="{$alignment}">
     <!-- The above restores alignment altered by image align attribute -->
-    <xsl:if test="title|info/title">
-      <xsl:apply-templates select="(title|info/title)[1]" 
+    <xsl:if test="d:title|d:info/d:title">
+      <xsl:apply-templates select="(d:title|d:info/d:title)[1]"
                            mode="list.title.mode"/>
     </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)]"/>
+         select="*[not(self::d:callout or self::d:title or self::d:titleabbrev)]
+                   |comment()[not(preceding-sibling::d:callout)]
+                   |processing-instruction()[not(preceding-sibling::d:callout)]"/>
 
     <fo:list-block xsl:use-attribute-sets="calloutlist.properties">
 
         </xsl:attribute>
       </xsl:if>
       
-      <xsl:apply-templates select="callout
-                                |comment()[preceding-sibling::callout]
-                                |processing-instruction()[preceding-sibling::callout]"/>
+      <xsl:apply-templates select="d:callout
+                                |comment()[preceding-sibling::d:callout]
+                                |processing-instruction()[preceding-sibling::d:callout]"/>
     </fo:list-block>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="calloutlist/title">
+<xsl:template match="d:calloutlist/d:title">
 </xsl:template>
 
-<xsl:template match="callout">
+<xsl:template match="d:callout">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:variable name="keep.together">
     </xsl:when>
     <xsl:when test="local-name($target)='area'">
       <xsl:choose>
-        <xsl:when test="$target/parent::areaset">
+        <xsl:when test="$target/parent::d:areaset">
           <xsl:call-template name="callout-bug">
             <xsl:with-param name="conum">
-              <xsl:apply-templates select="$target/parent::areaset"
+              <xsl:apply-templates select="$target/parent::d:areaset"
                                    mode="conumber"/>
             </xsl:with-param>
           </xsl:call-template>
index 1fee702550484eeebca863ec19129f7d1ed46c6d..2a621d693d6eb1c3aa3cc51a9ac789fe2a7e385b 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:mml="http://www.w3.org/1998/Math/MathML"
-                exclude-result-prefixes="mml"
+                exclude-result-prefixes="mml d"
                 version='1.0'>
 
 <!-- ********************************************************************
 
      ******************************************************************** -->
 
-<xsl:template match="inlineequation">
+<xsl:template match="d:inlineequation">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="alt">
+<xsl:template match="d:alt">
 </xsl:template>
 
-<xsl:template match="mathphrase">
+<xsl:template match="d:mathphrase">
   <fo:inline>
     <xsl:apply-templates/>
   </fo:inline>
@@ -44,7 +45,7 @@
   </xsl:copy>
 </xsl:template>
 
-<xsl:template match="equation/graphic | informalequation/graphic">
+<xsl:template match="d:equation/d:graphic | d:informalequation/d:graphic">
   <xsl:if test="$tex.math.in.alt = ''">
     <fo:block>
       <xsl:call-template name="process.image"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="inlineequation/alt[@role='tex'] | 
-                     inlineequation/inlinemediaobject/textobject[@role='tex']" priority="1">
+<xsl:template match="d:inlineequation/d:alt[@role='tex'] |
+                     d:inlineequation/d:inlinemediaobject/d:textobject[@role='tex']" priority="1">
   <xsl:param name="output.delims" select="1"/>
 </xsl:template>
 
-<xsl:template match="equation/alt[@role='tex'] | informalequation/alt[@role='tex'] |
-                     equation/mediaobject/textobject[@role='tex'] |
-                     informalequation/mediaobject/textobject[@role='tex']" priority="1">
+<xsl:template match="d:equation/d:alt[@role='tex'] | d:informalequation/d:alt[@role='tex'] |
+                     d:equation/d:mediaobject/d:textobject[@role='tex'] |
+                     d:informalequation/d:mediaobject/d:textobject[@role='tex']" priority="1">
   <xsl:variable name="output.delims">
     <xsl:call-template name="tex.math.output.delims"/>
   </xsl:variable>
index b4dfa7ce819e9971582696c87b62b8bd6f61f8cc..31388240f13036e0bc8a7e2a009dc28fe203bb80 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
 
 <!-- ********************************************************************
       <xsl:when test="($sequence='odd' or $sequence='even') and $position='center'">
         <xsl:if test="$pageclass != 'titlepage'">
           <xsl:choose>
-            <xsl:when test="ancestor::book and ($double.sided != 0)">
+            <xsl:when test="ancestor::d:book and ($double.sided != 0)">
               <fo:retrieve-marker retrieve-class-name="section.head.marker"
                                   retrieve-position="first-including-carryover"
                                   retrieve-boundary="page-sequence"/>
   <xsl:param name="master-reference" select="''"/>
 
   <xsl:choose>
-    <xsl:when test="$element = 'toc' and self::book">i</xsl:when>
+    <xsl:when test="$element = 'toc' and self::d:book">i</xsl:when>
     <xsl:when test="$element = 'set'">i</xsl:when>
     <xsl:when test="$element = 'book'">i</xsl:when>
     <xsl:when test="$element = 'preface'">i</xsl:when>
   <!-- Select the first content that the stylesheet places
        after the TOC -->
   <xsl:variable name="first.book.content" 
-                select="ancestor::book/*[
-                          not(self::title or
-                              self::subtitle or
-                              self::titleabbrev or
-                              self::bookinfo or
-                              self::info or
-                              self::dedication or
-                              self::acknowledgements or
-                              self::preface or
-                              self::toc or
-                              self::lot)][1]"/>
+                select="ancestor::d:book/*[
+                          not(self::d:title or
+                              self::d:subtitle or
+                              self::d:titleabbrev or
+                              self::d:bookinfo or
+                              self::d:info or
+                              self::d:dedication or
+                              self::d:acknowledgements or
+                              self::d:preface or
+                              self::d:toc or
+                              self::d:lot)][1]"/>
   <xsl:choose>
     <!-- double-sided output -->
     <xsl:when test="$double.sided != 0">
         <!-- If changed to 1 here, then change page.number.format too -->
         <xsl:when test="$element = 'preface'"><xsl:value-of select="$first"/></xsl:when>
         <xsl:when test="($element = 'dedication' or $element = 'article') 
-                    and not(preceding::chapter
-                            or preceding::preface
-                            or preceding::appendix
-                            or preceding::article
-                            or preceding::dedication
-                            or parent::part
-                            or parent::reference)">1</xsl:when>
+                    and not(preceding::d:chapter
+                            or preceding::d:preface
+                            or preceding::d:appendix
+                            or preceding::d:article
+                            or preceding::d:dedication
+                            or parent::d:part
+                            or parent::d:reference)">1</xsl:when>
         <xsl:when test="generate-id($first.book.content) =
                         generate-id(.)">1</xsl:when>
         <xsl:otherwise><xsl:value-of select="$first"/></xsl:otherwise>
         <xsl:when test="$element = 'book'">auto</xsl:when>
         <xsl:when test="$element = 'preface'">auto</xsl:when>
        <xsl:when test="($element = 'dedication' or $element = 'article') and
-                        not(preceding::chapter
-                            or preceding::preface
-                            or preceding::appendix
-                            or preceding::article
-                            or preceding::dedication
-                            or parent::part
-                            or parent::reference)">1</xsl:when>
+                        not(preceding::d:chapter
+                            or preceding::d:preface
+                            or preceding::d:appendix
+                            or preceding::d:article
+                            or preceding::d:dedication
+                            or parent::d:part
+                            or parent::d:reference)">1</xsl:when>
         <xsl:when test="generate-id($first.book.content) =
                         generate-id(.)">1</xsl:when>
         <xsl:otherwise>auto</xsl:otherwise>
index 4d2e9bd2174ac9542869dca788c0f22c06727d7d..d48d25631ea011705dad7fe7e468520e8cdf13ff 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0' encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
index c8cd777adf90944529de3ecac8a93322fc2f008d..e964e61e9a6b48fff2d4e2ee05a85d0a9fa4e8c4 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
   xmlns:fo="http://www.w3.org/1999/XSL/Format"
   xmlns:xlink="http://www.w3.org/1999/xlink"
-  exclude-result-prefixes="doc xlink"
+  exclude-result-prefixes="doc xlink d"
   version='1.0'>
 
 <!-- ********************************************************************
       </fo:block>
     </xsl:when>
     <xsl:when test="$pi-before != '' and
-      not(following-sibling::listitem) and
-      not(following-sibling::step)">
+      not(following-sibling::d:listitem) and
+      not(following-sibling::d:step)">
       <fo:block space-after="0pt" space-before="{$pi-before}">
         <xsl:copy-of select="$spacer"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="following-sibling::para">
+    <xsl:when test="following-sibling::d:para">
       <fo:block space-after="0pt" 
         xsl:use-attribute-sets="normal.para.spacing">
         <xsl:copy-of select="$spacer"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="following-sibling::note or
-      following-sibling::warning or
-      following-sibling::caution or
-      following-sibling::important or
-      following-sibling::tip">
+    <xsl:when test="following-sibling::d:note or
+      following-sibling::d:warning or
+      following-sibling::d:caution or
+      following-sibling::d:important or
+      following-sibling::d:tip">
       <xsl:choose>
         <xsl:when test="$admon.graphics = 0">
           <fo:block space-after="0pt" 
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
-    <xsl:when test="following-sibling::table or
-      following-sibling::figure or
-      following-sibling::example or
-      following-sibling::equation">
+    <xsl:when test="following-sibling::d:table or
+      following-sibling::d:figure or
+      following-sibling::d:example or
+      following-sibling::d:equation">
       <fo:block space-after="0pt" 
         xsl:use-attribute-sets="formal.object.properties">
         <xsl:copy-of select="$spacer"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="following-sibling::informaltable or
-      following-sibling::informalfigure or
-      following-sibling::informalexample or
-      following-sibling::informalequation">
+    <xsl:when test="following-sibling::d:informaltable or
+      following-sibling::d:informalfigure or
+      following-sibling::d:informalexample or
+      following-sibling::d:informalequation">
       <fo:block space-after="0pt" 
         xsl:use-attribute-sets="informal.object.properties">
         <xsl:copy-of select="$spacer"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="following-sibling::itemizedlist or
-      following-sibling::orderedlist or
-      following-sibling::variablelist or
-      following-sibling::simplelist">
+    <xsl:when test="following-sibling::d:itemizedlist or
+      following-sibling::d:orderedlist or
+      following-sibling::d:variablelist or
+      following-sibling::d:simplelist">
       <fo:block space-after="0pt" 
         xsl:use-attribute-sets="informal.object.properties">
         <xsl:copy-of select="$spacer"/>
       </fo:block>
     </xsl:when>
-    <xsl:when test="following-sibling::listitem or
-      following-sibling::step">
+    <xsl:when test="following-sibling::d:listitem or
+      following-sibling::d:step">
       <fo:list-item space-after="0pt" 
         xsl:use-attribute-sets="informal.object.properties">
         <fo:list-item-label>
         </fo:list-item-body>
       </fo:list-item>
     </xsl:when>
-    <xsl:when test="following-sibling::sect1 or
-      following-sibling::sect2 or
-      following-sibling::sect3 or
-      following-sibling::sect4 or
-      following-sibling::sect5 or
-      following-sibling::section">
+    <xsl:when test="following-sibling::d:sect1 or
+      following-sibling::d:sect2 or
+      following-sibling::d:sect3 or
+      following-sibling::d:sect4 or
+      following-sibling::d:sect5 or
+      following-sibling::d:section">
       <fo:block space-after="0pt" 
         xsl:use-attribute-sets="section.title.properties">
         <xsl:copy-of select="$spacer"/>
     <xsl:when test="$fop.extensions != 0">
       <!-- Doesn't work in fop -->
     </xsl:when>
-    <xsl:when test="following-sibling::listitem or
-      following-sibling::step">
+    <xsl:when test="following-sibling::d:listitem or
+      following-sibling::d:step">
       <fo:list-item space-before.precedence="force"
         space-before="-{$height}"
         space-after="0pt"
index d3a246727fa55d3c3489c7ae66adcc4396d1217a..f3691f14eba05ef2b1dd0636bc169dfe32f6febb 100644 (file)
@@ -1,4 +1,6 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version="1.0">
 
   <xsl:apply-templates select="*" mode="ati.xsl11.bookmarks"/>
 </xsl:template>
 
-<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex
-                     |refentry|refsynopsisdiv
-                     |refsect1|refsect2|refsect3|refsection
-                     |sect1|sect2|sect3|sect4|sect5|section"
+<xsl:template match="d:set|d:book|d:part|d:reference|d:preface|d:chapter|d:appendix|d:article
+                     |d:glossary|d:bibliography|d:index|d:setindex
+                     |d:refentry|d:refsynopsisdiv
+                     |d:refsect1|d:refsect2|d:refsect3|d:refsection
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section"
               mode="ati.xsl11.bookmarks">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
@@ -37,7 +39,7 @@
   <!-- If the object is a set or book, generate a bookmark for the toc -->
 
   <xsl:choose>
-    <xsl:when test="self::index and $generate.index = 0"/>     
+    <xsl:when test="self::d:index and $generate.index = 0"/>
     <xsl:when test="parent::*">
       <fo:bookmark internal-destination="{$id}">
         <fo:bookmark-title>
@@ -59,9 +61,9 @@
         </xsl:call-template>
       </xsl:variable>
       <xsl:if test="contains($toc.params, 'toc')
-                    and section|sect1|refentry
-                        |article|bibliography|glossary
-                        |appendix">
+                    and d:section|d:sect1|d:refentry
+                        |d:article|d:bibliography|d:glossary
+                        |d:appendix">
         <fo:bookmark internal-destination="toc...{$id}">
           <fo:bookmark-title>
             <xsl:call-template name="gentext">
index ce8c6fe35c89662cc495dca7aef9ffaed73d9971..1435a049a8b103951131624e5777a716b494fd07 100644 (file)
@@ -1,15 +1,16 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:fo="http://www.w3.org/1999/XSL/Format"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
-  exclude-result-prefixes="dc"
+  exclude-result-prefixes="dc d"
   version='1.0'>
   
-<xsl:template match="drama/title"/>
-<xsl:template match="poetry/title"/>
-<xsl:template match="dialogue/title"/>
+<xsl:template match="d:drama/d:title"/>
+<xsl:template match="d:poetry/d:title"/>
+<xsl:template match="d:dialogue/d:title"/>
 
-<xsl:template match="drama">
+<xsl:template match="d:drama">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -23,7 +24,7 @@
   </xsl:element>
 </xsl:template>
   
-<xsl:template match="dialogue">
+<xsl:template match="d:dialogue">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -37,7 +38,7 @@
   </xsl:element>
 </xsl:template>
   
-<xsl:template match="poetry">
+<xsl:template match="d:poetry">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -51,7 +52,7 @@
   </xsl:element>
 </xsl:template>
   
-<xsl:template match="stagedir">
+<xsl:template match="d:stagedir">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -70,7 +71,7 @@
 
 </xsl:template>
 
-<xsl:template match="inlinestagedir">
+<xsl:template match="d:inlinestagedir">
   <fo:inline xsl:use-attribute-sets="inlinestagedir.properties">
     <xsl:call-template name="anchor"/>
     <xsl:text> [</xsl:text>
@@ -79,7 +80,7 @@
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="linegroup">
+<xsl:template match="d:linegroup">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     </xsl:if>
     <fo:list-item>
       <fo:list-item-label end-indent="label-end()">
-        <xsl:apply-templates select="speaker"/>
+        <xsl:apply-templates select="d:speaker"/>
       </fo:list-item-label>
       <fo:list-item-body start-indent="body-start()">
-        <xsl:apply-templates select="*[not(self::speaker)]"/>
+        <xsl:apply-templates select="*[not(self::d:speaker)]"/>
       </fo:list-item-body>
     </fo:list-item>
   </fo:list-block>
 </xsl:template>
 
-<xsl:template match="speaker">
+<xsl:template match="d:speaker">
   <fo:block xsl:use-attribute-sets="speaker.properties">
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="line">
+<xsl:template match="d:line">
   <fo:block xsl:use-attribute-sets="line.properties">
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates/>
index 11e983f3be79e4bd9b48641adf11924f9de06e38..ab28260693bbcf46588f45986cfcf5885525b749 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -13,7 +15,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="qandaset" name="process.qandaset">
+<xsl:template match="d:qandaset" name="process.qandaset">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -36,9 +38,9 @@
     <fo:block id="{$id}">
       <xsl:choose>
         <xsl:when test="parent::*">
-          <xsl:if test="blockinfo/title|info/title|title">
-            <xsl:apply-templates select="(blockinfo/title|
-                                          info/title|title)[1]"/>
+          <xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title">
+            <xsl:apply-templates select="(d:blockinfo/d:title|
+                                          d:info/d:title|d:title)[1]"/>
           </xsl:if>
         </xsl:when>
         <!-- If it is the root element -->
@@ -61,9 +63,9 @@
                                    and local-name(.) != 'titleabbrev'
                                    and local-name(.) != 'qandadiv'
                                    and local-name(.) != 'qandaentry']"/>
-      <xsl:apply-templates select="qandadiv"/>
+      <xsl:apply-templates select="d:qandadiv"/>
   
-      <xsl:if test="qandaentry">
+      <xsl:if test="d:qandaentry">
         <fo:list-block xsl:use-attribute-sets="list.block.spacing"
                        provisional-label-separation="0.2em">
           <xsl:attribute name="provisional-distance-between-starts">
@@ -74,7 +76,7 @@
               <xsl:otherwise>2.5em</xsl:otherwise>
             </xsl:choose>
           </xsl:attribute>
-          <xsl:apply-templates select="qandaentry"/>
+          <xsl:apply-templates select="d:qandaentry"/>
         </fo:list-block>
       </xsl:if>
     </fo:block>
     <xsl:when test="$label-width != ''">
       <xsl:value-of select="$label-width"/>
     </xsl:when>
-    <xsl:when test="descendant::label">
+    <xsl:when test="descendant::d:label">
       <xsl:call-template name="longest.term">
-        <xsl:with-param name="terms" select="descendant::label"/>
+        <xsl:with-param name="terms" select="descendant::d:label"/>
         <xsl:with-param name="maxlength" select="20"/>
       </xsl:call-template>
       <xsl:text>em * 0.50</xsl:text>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="qandaset/blockinfo/title|qandset/info/title|qandaset/title">
-  <xsl:variable name="enclsect" select="(ancestor::section
-                                        | ancestor::simplesect
-                                        | ancestor::sect5
-                                        | ancestor::sect4
-                                        | ancestor::sect3
-                                        | ancestor::sect2
-                                        | ancestor::sect1
-                                        | ancestor::refsect3
-                                        | ancestor::refsect2
-                                        | ancestor::refsect1)[last()]"/>
+<xsl:template match="d:qandaset/d:blockinfo/d:title|d:qandset/d:info/d:title|d:qandaset/d:title">
+  <xsl:variable name="enclsect" select="(ancestor::d:section
+                                        | ancestor::d:simplesect
+                                        | ancestor::d:sect5
+                                        | ancestor::d:sect4
+                                        | ancestor::d:sect3
+                                        | ancestor::d:sect2
+                                        | ancestor::d:sect1
+                                        | ancestor::d:refsect3
+                                        | ancestor::d:refsect2
+                                        | ancestor::d:refsect1)[last()]"/>
   <xsl:variable name="sectlvl">
     <xsl:call-template name="section.level">
       <xsl:with-param name="node" select="$enclsect"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="qandaset/blockinfo|qandaset/info">
+<xsl:template match="d:qandaset/d:blockinfo|d:qandaset/d:info">
   <!-- what should this template really do? -->
-  <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
+  <xsl:apply-templates select="d:legalnotice" mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="qandadiv">
+<xsl:template match="d:qandadiv">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
 
   </xsl:variable>
   
   <fo:block id="{$id}">
-    <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/>
+    <xsl:apply-templates select="(d:blockinfo/d:title|d:info/d:title|d:title)[1]"/>
     <xsl:apply-templates select="*[local-name(.) != 'title'
                                  and local-name(.) != 'titleabbrev'
                                  and local-name(.) != 'qandadiv'
                                  and local-name(.) != 'qandaentry']"/>
     <fo:block>
-      <xsl:apply-templates select="qandadiv"/>
+      <xsl:apply-templates select="d:qandadiv"/>
 
-      <xsl:if test="qandaentry">
+      <xsl:if test="d:qandaentry">
         <fo:list-block xsl:use-attribute-sets="list.block.spacing"
                        provisional-label-separation="0.2em">
           <xsl:attribute name="provisional-distance-between-starts">
               <xsl:otherwise>2.5em</xsl:otherwise>
             </xsl:choose>
           </xsl:attribute>
-          <xsl:apply-templates select="qandaentry"/>
+          <xsl:apply-templates select="d:qandaentry"/>
         </fo:list-block>
       </xsl:if>
     </fo:block>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="qandadiv/blockinfo/title|qandadiv/info/title|qandadiv/title">
-  <xsl:variable name="enclsect" select="(ancestor::section
-                                        | ancestor::simplesect
-                                        | ancestor::sect5
-                                        | ancestor::sect4
-                                        | ancestor::sect3
-                                        | ancestor::sect2
-                                        | ancestor::sect1
-                                        | ancestor::refsect3
-                                        | ancestor::refsect2
-                                        | ancestor::refsect1)[last()]"/>
+<xsl:template match="d:qandadiv/d:blockinfo/d:title|d:qandadiv/d:info/d:title|d:qandadiv/d:title">
+  <xsl:variable name="enclsect" select="(ancestor::d:section
+                                        | ancestor::d:simplesect
+                                        | ancestor::d:sect5
+                                        | ancestor::d:sect4
+                                        | ancestor::d:sect3
+                                        | ancestor::d:sect2
+                                        | ancestor::d:sect1
+                                        | ancestor::d:refsect3
+                                        | ancestor::d:refsect2
+                                        | ancestor::d:refsect1)[last()]"/>
   <xsl:variable name="sectlvl">
     <xsl:call-template name="section.level">
       <xsl:with-param name="node" select="$enclsect"/>
   </xsl:variable>
 
   <xsl:call-template name="qanda.heading">
-    <xsl:with-param name="level"  select="$sectlvl + 1 + count(ancestor::qandadiv)"/>
+    <xsl:with-param name="level"  select="$sectlvl + 1 + count(ancestor::d:qandadiv)"/>
     <xsl:with-param name="marker" select="0"/>
     <xsl:with-param name="title">
-      <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+      <xsl:apply-templates select="parent::d:qandadiv" mode="label.markup"/>
       <xsl:if test="$qandadiv.autolabel != 0">
         <xsl:apply-templates select="." mode="intralabel.punctuation"/>
         <xsl:text> </xsl:text>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="qandaentry">
+<xsl:template match="d:qandaentry">
   <!-- Omit revhistory from fo:list-block because it is a table -->
-  <xsl:apply-templates select="question|answer"/>
+  <xsl:apply-templates select="d:question|d:answer"/>
 </xsl:template>
 
-<xsl:template match="question">
+<xsl:template match="d:question">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:variable name="entry.id">
 
   <xsl:variable name="label.content">
     <xsl:apply-templates select="." mode="label.markup"/>
-    <xsl:if test="contains($deflabel, 'number') and not(label)">
+    <xsl:if test="contains($deflabel, 'number') and not(d:label)">
       <xsl:apply-templates select="." mode="intralabel.punctuation"/>
     </xsl:if>
   </xsl:variable>
     </fo:list-item-label>
     <fo:list-item-body start-indent="body-start()">
       <xsl:choose>
-        <xsl:when test="$deflabel = 'none' and not(label)">
+        <xsl:when test="$deflabel = 'none' and not(d:label)">
           <fo:block font-weight="bold">
             <xsl:apply-templates select="*[local-name(.)!='label']"/>
           </fo:block>
         </xsl:otherwise>
       </xsl:choose>
       <!-- Uncomment this line to get revhistory output in the question -->
-      <!-- <xsl:apply-templates select="preceding-sibling::revhistory"/> -->
+      <!-- <xsl:apply-templates select="preceding-sibling::d:revhistory"/> -->
     </fo:list-item-body>
   </fo:list-item>
 </xsl:template>
 
-<xsl:template match="answer">
+<xsl:template match="d:answer">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   <xsl:variable name="entry.id">
     <xsl:call-template name="object.id">
       <xsl:apply-templates select="*[local-name(.)!='label' and local-name(.) != 'qandaentry']"/>
       <!-- * handle nested answer/qandaentry instances -->
       <!-- * (bug 1509043 from Daniel Leidert) -->
-      <xsl:if test="descendant::question">
+      <xsl:if test="descendant::d:question">
         <xsl:call-template name="process.qandaset"/>
       </xsl:if>
     </fo:list-item-body>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="label">
+<xsl:template match="d:label">
   <xsl:apply-templates/>
 </xsl:template>
 
index 4f5aeeb23266e1950c235c2b47b0a31ac2017214..8840b5759776a0393c5982074a876d34e7e693bc 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
@@ -14,9 +16,9 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="reference">
+<xsl:template match="d:reference">
    <!-- If there is a partintro, it triggers the page  sequence -->
-   <xsl:if test="not(partintro)">
+   <xsl:if test="not(d:partintro)">
     <xsl:variable name="id">
       <xsl:call-template name="object.id"/>
     </xsl:variable>
 
         <!-- Create one page sequence if no pagebreaks needed -->
         <xsl:if test="$refentry.pagebreak = 0">
-          <xsl:apply-templates select="refentry"/>
+          <xsl:apply-templates select="d:refentry"/>
         </xsl:if>
       </fo:flow>
     </fo:page-sequence>
   </xsl:if>
-  <xsl:apply-templates select="partintro"/>
+  <xsl:apply-templates select="d:partintro"/>
   <xsl:if test="$refentry.pagebreak != 0">
-    <xsl:apply-templates select="refentry"/>
+    <xsl:apply-templates select="d:refentry"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="reference" mode="reference.titlepage.mode">
+<xsl:template match="d:reference" mode="reference.titlepage.mode">
   <xsl:call-template name="reference.titlepage"/>
 </xsl:template>
 
-<xsl:template match="reference/partintro">
+<xsl:template match="d:reference/d:partintro">
   <xsl:variable name="id">
     <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::reference"/>
+      <xsl:with-param name="object" select="ancestor::d:reference"/>
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="master-reference">
       <fo:block id="{$id}">
         <xsl:apply-templates select=".." mode="reference.titlepage.mode"/>
       </fo:block>
-      <xsl:if test="title">
+      <xsl:if test="d:title">
         <xsl:call-template name="partintro.titlepage"/>
       </xsl:if>
       <xsl:apply-templates/>
 
       <!-- Create one page sequence if no pagebreaks needed -->
       <xsl:if test="$refentry.pagebreak = 0">
-        <xsl:apply-templates select="../refentry"/>
+        <xsl:apply-templates select="../d:refentry"/>
       </xsl:if>
     </fo:flow>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="reference/docinfo|refentry/refentryinfo"></xsl:template>
-<xsl:template match="reference/info"></xsl:template>
-<xsl:template match="reference/title"></xsl:template>
-<xsl:template match="reference/subtitle"></xsl:template>
+<xsl:template match="d:reference/d:docinfo|d:refentry/d:refentryinfo"></xsl:template>
+<xsl:template match="d:reference/d:info"></xsl:template>
+<xsl:template match="d:reference/d:title"></xsl:template>
+<xsl:template match="d:reference/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="refentry">
+<xsl:template match="d:refentry">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <xsl:choose>
     <xsl:when test="not(parent::*) or 
-                    (parent::reference and $refentry.pagebreak != 0) or 
-                    parent::part">
+                    (parent::d:reference and $refentry.pagebreak != 0) or
+                    parent::d:part">
       <!-- make a page sequence -->
       <fo:page-sequence hyphenate="{$hyphenate}"
                         master-reference="{$master-reference}">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="refmeta">
-  <xsl:apply-templates select=".//indexterm"/>
+<xsl:template match="d:refmeta">
+  <xsl:apply-templates select=".//d:indexterm"/>
 </xsl:template>
 
-<xsl:template match="manvolnum">
+<xsl:template match="d:manvolnum">
   <xsl:if test="$refentry.xref.manvolnum != 0">
     <xsl:text>(</xsl:text>
     <xsl:apply-templates/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refmiscinfo">
+<xsl:template match="d:refmiscinfo">
 </xsl:template>
 
-<xsl:template match="refentrytitle">
+<xsl:template match="d:refentrytitle">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="refnamediv">
+<xsl:template match="d:refnamediv">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <!-- generated a "Name" subheading, so we don't need to do it again -->
     <xsl:if test="$refentry.generate.name != 0">
         <xsl:choose>
-          <xsl:when test="preceding-sibling::refnamediv">
+          <xsl:when test="preceding-sibling::d:refnamediv">
             <!-- no generated title on secondary refnamedivs! -->
           </xsl:when>
           <xsl:otherwise>
       <xsl:if test="$refentry.generate.title != 0">
   <xsl:variable name="section.level">
     <xsl:call-template name="refentry.level">
-      <xsl:with-param name="node" select="ancestor::refentry"/>
+      <xsl:with-param name="node" select="ancestor::d:refentry"/>
     </xsl:call-template>
   </xsl:variable>
 
   <xsl:variable name="reftitle">
         <xsl:choose>
-          <xsl:when test="../refmeta/refentrytitle">
-            <xsl:apply-templates select="../refmeta/refentrytitle"/>
+          <xsl:when test="../d:refmeta/d:refentrytitle">
+            <xsl:apply-templates select="../d:refmeta/d:refentrytitle"/>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:apply-templates select="refname[1]"/>
+            <xsl:apply-templates select="d:refname[1]"/>
           </xsl:otherwise>
         </xsl:choose>
   </xsl:variable>
 
   <!-- xsl:use-attribute-sets takes only a Qname, not a variable -->
     <xsl:choose>
-      <xsl:when test="preceding-sibling::refnamediv">
+      <xsl:when test="preceding-sibling::d:refnamediv">
        <!-- no title on secondary refnamedivs! -->
       </xsl:when>
       <xsl:when test="$section.level = 1">
     </xsl:if>
 
     <fo:block>
-      <xsl:if test="not(following-sibling::refnamediv)">
+      <xsl:if test="not(following-sibling::d:refnamediv)">
        <xsl:attribute name="space-after">1em</xsl:attribute>
       </xsl:if>
       <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refname">
-  <xsl:if test="not(preceding-sibling::refdescriptor)">
+<xsl:template match="d:refname">
+  <xsl:if test="not(preceding-sibling::d:refdescriptor)">
     <xsl:apply-templates/>
-    <xsl:if test="following-sibling::refname">
+    <xsl:if test="following-sibling::d:refname">
       <xsl:text>, </xsl:text>
     </xsl:if>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refpurpose">
+<xsl:template match="d:refpurpose">
   <xsl:if test="node()">
     <xsl:text> </xsl:text>
     <xsl:call-template name="dingbat">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refdescriptor">
+<xsl:template match="d:refdescriptor">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="refclass">
+<xsl:template match="d:refclass">
   <xsl:if test="$refclass.suppress = 0">
   <fo:block font-weight="bold">
     <xsl:if test="@role">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refsynopsisdiv">
+<xsl:template match="d:refsynopsisdiv">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <fo:block id="{$id}">
-    <xsl:if test="not(refsynopsisdivinfo/title|docinfo/title|info/title|title)">
+    <xsl:if test="not(d:refsynopsisdivinfo/d:title|d:docinfo/d:title|d:info/d:title|d:title)">
       <!-- * if we there is no appropriate title for this Refsynopsisdiv, -->
       <!-- * then we need to call format.refentry.subheading to generate one -->
       <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refsection">
+<xsl:template match="d:refsection">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refsect1">
+<xsl:template match="d:refsect1">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refsect2">
+<xsl:template match="d:refsect2">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refsect3">
+<xsl:template match="d:refsect3">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refsynopsisdiv/title
-                     |refsection/title
-                     |refsect1/title
-                     |refsect2/title
-                     |refsect3/title">
+<xsl:template match="d:refsynopsisdiv/d:title
+                     |d:refsection/d:title
+                     |d:refsect1/d:title
+                     |d:refsect2/d:title
+                     |d:refsect3/d:title">
   <!-- nop; titlepage.mode instead -->
 </xsl:template>
 
-<xsl:template match="refsynopsisdiv/title
-                     |refsection/title
-                     |refsect1/title
-                     |refsect2/title
-                     |refsect3/title
-                     |refsynopsisdiv/info/title
-                     |refsection/info/title
-                     |refsect1/info/title
-                     |refsect2/info/title
-                     |refsect3/info/title"
+<xsl:template match="d:refsynopsisdiv/d:title
+                     |d:refsection/d:title
+                     |d:refsect1/d:title
+                     |d:refsect2/d:title
+                     |d:refsect3/d:title
+                     |d:refsynopsisdiv/d:info/d:title
+                     |d:refsection/d:info/d:title
+                     |d:refsect1/d:info/d:title
+                     |d:refsect2/d:info/d:title
+                     |d:refsect3/d:info/d:title"
               mode="titlepage.mode"
               priority="2">
   <xsl:call-template name="format.refentry.subheading"/>
 <!--     </xsl:call-template> -->
 <!-- -->
   <xsl:param name="section" 
-             select="(ancestor::refsynopsisdiv 
-                     |ancestor::refsection
-                     |ancestor::refsect1
-                     |ancestor::refsect2
-                     |ancestor::refsect3)[last()]"/>
+             select="(ancestor::d:refsynopsisdiv
+                     |ancestor::d:refsection
+                     |ancestor::d:refsect1
+                     |ancestor::d:refsect2
+                     |ancestor::d:refsect3)[last()]"/>
   <xsl:param name="offset" select="0"/>
   <xsl:param name="gentext.key"/>
 
   </fo:block>
 </xsl:template>
 
-<xsl:template match="refsectioninfo|refsection/info"></xsl:template>
-<xsl:template match="refsect1info|refsect1/info"></xsl:template>
-<xsl:template match="refsect2info|refsect2/info"></xsl:template>
-<xsl:template match="refsect3info|refsect3/info"></xsl:template>
+<xsl:template match="d:refsectioninfo|d:refsection/d:info"></xsl:template>
+<xsl:template match="d:refsect1info|d:refsect1/d:info"></xsl:template>
+<xsl:template match="d:refsect2info|d:refsect2/d:info"></xsl:template>
+<xsl:template match="d:refsect3info|d:refsect3/d:info"></xsl:template>
 
 <!-- ==================================================================== -->
 
index 3dfc174622d25b03b1ccfd71238e08bd1910b41e..e4b0ae6df99b53b24c8a66ed9ecf0a8c091bf1b7 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
                 version='1.0'>
 
@@ -14,7 +16,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="section">
+<xsl:template match="d:section">
   <xsl:choose>
     <xsl:when test="$rootid = @id or $rootid = @xml:id">
       <xsl:call-template name="section.page.sequence"/>
   </xsl:variable>
 
   <xsl:if test="contains($toc.params, 'toc')
-                and (count(ancestor::section)+1) &lt;= 
+                and (count(ancestor::d:section)+1) &lt;=
                $generate.section.toc.level">
     <xsl:call-template name="section.toc">
       <xsl:with-param name="toc.title.p" 
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="/section" name="section.page.sequence">
+<xsl:template match="/d:section" name="section.page.sequence">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
       </xsl:variable>
 
       <xsl:if test="contains($toc.params, 'toc')
-                    and (count(ancestor::section)+1) &lt;= 
+                    and (count(ancestor::d:section)+1) &lt;=
                    $generate.section.toc.level">
         <xsl:call-template name="section.toc">
           <xsl:with-param name="toc.title.p" 
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="section/title
-                     |simplesect/title
-                     |sect1/title
-                     |sect2/title
-                     |sect3/title
-                     |sect4/title
-                     |sect5/title
-                     |section/info/title
-                     |simplesect/info/title
-                     |sect1/info/title
-                     |sect2/info/title
-                     |sect3/info/title
-                     |sect4/info/title
-                     |sect5/info/title
-                     |section/sectioninfo/title
-                     |sect1/sect1info/title
-                     |sect2/sect2info/title
-                     |sect3/sect3info/title
-                     |sect4/sect4info/title
-                     |sect5/sect5info/title"
+<xsl:template match="d:section/d:title
+                     |d:simplesect/d:title
+                     |d:sect1/d:title
+                     |d:sect2/d:title
+                     |d:sect3/d:title
+                     |d:sect4/d:title
+                     |d:sect5/d:title
+                     |d:section/d:info/d:title
+                     |d:simplesect/d:info/d:title
+                     |d:sect1/d:info/d:title
+                     |d:sect2/d:info/d:title
+                     |d:sect3/d:info/d:title
+                     |d:sect4/d:info/d:title
+                     |d:sect5/d:info/d:title
+                     |d:section/d:sectioninfo/d:title
+                     |d:sect1/d:sect1info/d:title
+                     |d:sect2/d:sect2info/d:title
+                     |d:sect3/d:sect3info/d:title
+                     |d:sect4/d:sect4info/d:title
+                     |d:sect5/d:sect5info/d:title"
               mode="titlepage.mode"
               priority="2">
 
   <xsl:variable name="section" 
-                select="(ancestor::section |
-                        ancestor::simplesect |
-                        ancestor::sect1 |
-                        ancestor::sect2 |
-                        ancestor::sect3 |
-                        ancestor::sect4 |
-                        ancestor::sect5)[position() = last()]"/>
+                select="(ancestor::d:section |
+                        ancestor::d:simplesect |
+                        ancestor::d:sect1 |
+                        ancestor::d:sect2 |
+                        ancestor::d:sect3 |
+                        ancestor::d:sect4 |
+                        ancestor::d:sect5)[position() = last()]"/>
 
   <fo:block keep-with-next.within-column="always">
     <xsl:variable name="id">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="sect1">
+<xsl:template match="d:sect1">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="/sect1">
+<xsl:template match="/d:sect1">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </fo:page-sequence>
 </xsl:template>
 
-<xsl:template match="sect2">
+<xsl:template match="d:sect2">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect3">
+<xsl:template match="d:sect3">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect4">
+<xsl:template match="d:sect4">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect5">
+<xsl:template match="d:sect5">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="simplesect">
+<xsl:template match="d:simplesect">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sectioninfo"></xsl:template>
-<xsl:template match="section/info"></xsl:template>
-<xsl:template match="section/title"></xsl:template>
-<xsl:template match="section/titleabbrev"></xsl:template>
-<xsl:template match="section/subtitle"></xsl:template>
-
-<xsl:template match="sect1info"></xsl:template>
-<xsl:template match="sect1/info"></xsl:template>
-<xsl:template match="sect1/title"></xsl:template>
-<xsl:template match="sect1/titleabbrev"></xsl:template>
-<xsl:template match="sect1/subtitle"></xsl:template>
-
-<xsl:template match="sect2info"></xsl:template>
-<xsl:template match="sect2/info"></xsl:template>
-<xsl:template match="sect2/title"></xsl:template>
-<xsl:template match="sect2/titleabbrev"></xsl:template>
-<xsl:template match="sect2/subtitle"></xsl:template>
-
-<xsl:template match="sect3info"></xsl:template>
-<xsl:template match="sect3/info"></xsl:template>
-<xsl:template match="sect3/title"></xsl:template>
-<xsl:template match="sect3/titleabbrev"></xsl:template>
-<xsl:template match="sect3/subtitle"></xsl:template>
-
-<xsl:template match="sect4info"></xsl:template>
-<xsl:template match="sect4/info"></xsl:template>
-<xsl:template match="sect4/title"></xsl:template>
-<xsl:template match="sect4/titleabbrev"></xsl:template>
-<xsl:template match="sect4/subtitle"></xsl:template>
-
-<xsl:template match="sect5info"></xsl:template>
-<xsl:template match="sect5/info"></xsl:template>
-<xsl:template match="sect5/title"></xsl:template>
-<xsl:template match="sect5/titleabbrev"></xsl:template>
-<xsl:template match="sect5/subtitle"></xsl:template>
-
-<xsl:template match="simplesect/info"></xsl:template>
-<xsl:template match="simplesect/title"></xsl:template>
-<xsl:template match="simplesect/titleabbrev"></xsl:template>
-<xsl:template match="simplesect/subtitle"></xsl:template>
+<xsl:template match="d:sectioninfo"></xsl:template>
+<xsl:template match="d:section/d:info"></xsl:template>
+<xsl:template match="d:section/d:title"></xsl:template>
+<xsl:template match="d:section/d:titleabbrev"></xsl:template>
+<xsl:template match="d:section/d:subtitle"></xsl:template>
+
+<xsl:template match="d:sect1info"></xsl:template>
+<xsl:template match="d:sect1/d:info"></xsl:template>
+<xsl:template match="d:sect1/d:title"></xsl:template>
+<xsl:template match="d:sect1/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect1/d:subtitle"></xsl:template>
+
+<xsl:template match="d:sect2info"></xsl:template>
+<xsl:template match="d:sect2/d:info"></xsl:template>
+<xsl:template match="d:sect2/d:title"></xsl:template>
+<xsl:template match="d:sect2/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect2/d:subtitle"></xsl:template>
+
+<xsl:template match="d:sect3info"></xsl:template>
+<xsl:template match="d:sect3/d:info"></xsl:template>
+<xsl:template match="d:sect3/d:title"></xsl:template>
+<xsl:template match="d:sect3/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect3/d:subtitle"></xsl:template>
+
+<xsl:template match="d:sect4info"></xsl:template>
+<xsl:template match="d:sect4/d:info"></xsl:template>
+<xsl:template match="d:sect4/d:title"></xsl:template>
+<xsl:template match="d:sect4/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect4/d:subtitle"></xsl:template>
+
+<xsl:template match="d:sect5info"></xsl:template>
+<xsl:template match="d:sect5/d:info"></xsl:template>
+<xsl:template match="d:sect5/d:title"></xsl:template>
+<xsl:template match="d:sect5/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect5/d:subtitle"></xsl:template>
+
+<xsl:template match="d:simplesect/d:info"></xsl:template>
+<xsl:template match="d:simplesect/d:title"></xsl:template>
+<xsl:template match="d:simplesect/d:titleabbrev"></xsl:template>
+<xsl:template match="d:simplesect/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bridgehead">
+<xsl:template match="d:bridgehead">
   <xsl:variable name="container"
-                select="(ancestor::appendix
-                        |ancestor::article
-                        |ancestor::bibliography
-                        |ancestor::chapter
-                        |ancestor::glossary
-                        |ancestor::glossdiv
-                        |ancestor::index
-                        |ancestor::partintro
-                        |ancestor::preface
-                        |ancestor::refsect1
-                        |ancestor::refsect2
-                        |ancestor::refsect3
-                        |ancestor::sect1
-                        |ancestor::sect2
-                        |ancestor::sect3
-                        |ancestor::sect4
-                        |ancestor::sect5
-                        |ancestor::section
-                        |ancestor::setindex
-                        |ancestor::simplesect)[last()]"/>
+                select="(ancestor::d:appendix
+                        |ancestor::d:article
+                        |ancestor::d:bibliography
+                        |ancestor::d:chapter
+                        |ancestor::d:glossary
+                        |ancestor::d:glossdiv
+                        |ancestor::d:index
+                        |ancestor::d:partintro
+                        |ancestor::d:preface
+                        |ancestor::d:refsect1
+                        |ancestor::d:refsect2
+                        |ancestor::d:refsect3
+                        |ancestor::d:sect1
+                        |ancestor::d:sect2
+                        |ancestor::d:sect3
+                        |ancestor::d:sect4
+                        |ancestor::d:sect5
+                        |ancestor::d:section
+                        |ancestor::d:setindex
+                        |ancestor::d:simplesect)[last()]"/>
 
   <xsl:variable name="clevel">
     <xsl:choose>
                       or local-name($container) = 'preface'
                       or local-name($container) = 'setindex'">2</xsl:when>
       <xsl:when test="local-name($container) = 'glossdiv'">
-        <xsl:value-of select="count(ancestor::glossdiv)+2"/>
+        <xsl:value-of select="count(ancestor::d:glossdiv)+2"/>
       </xsl:when>
       <xsl:when test="local-name($container) = 'sect1'
                       or local-name($container) = 'sect2'
index a21963570129ef9f54b725521ff89a5f5a5ec97f..5db59748cb78473f8a501eceba294990f5521e5a 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0' encoding="utf-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
index 7a7d3d796cf827b96f7a15fd7f243d6a87f424a8..a1795f60ec375ef1133a2d7d91924839ca8cb4e1 100644 (file)
@@ -3,8 +3,10 @@
 <!ENTITY RE "&#10;">
 <!ENTITY nbsp "&#160;">
 ]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
 
 <!-- ==================================================================== -->
 
-<xsl:template match="cmdsynopsis">
+<xsl:template match="d:cmdsynopsis">
   <fo:block xsl:use-attribute-sets="normal.para.spacing">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis/command">
+<xsl:template match="d:cmdsynopsis/d:command">
   <xsl:call-template name="inline.monoseq"/>
   <xsl:text> </xsl:text>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis/command[1]" priority="2">
+<xsl:template match="d:cmdsynopsis/d:command[1]" priority="2">
   <xsl:call-template name="inline.monoseq"/>
   <xsl:text> </xsl:text>
 </xsl:template>
 
-<xsl:template match="group|arg" name="group-or-arg">
+<xsl:template match="d:group|d:arg" name="group-or-arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:variable name="sepchar">
@@ -95,7 +97,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="group/arg">
+<xsl:template match="d:group/d:arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:if test="preceding-sibling::*">
   <xsl:call-template name="group-or-arg"/>
 </xsl:template>
 
-<xsl:template match="sbr">
+<xsl:template match="d:sbr">
   <fo:block/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="synopfragmentref">
+<xsl:template match="d:synopfragmentref">
   <xsl:variable name="target" select="key('id',@linkend)"/>
   <xsl:variable name="snum">
     <xsl:apply-templates select="$target" mode="synopfragment.number"/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="synopfragment" mode="synopfragment.number">
+<xsl:template match="d:synopfragment" mode="synopfragment.number">
   <xsl:number format="1"/>
 </xsl:template>
 
-<xsl:template match="synopfragment">
+<xsl:template match="d:synopfragment">
   <xsl:variable name="snum">
     <xsl:apply-templates select="." mode="synopfragment.number"/>
   </xsl:variable>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="funcsynopsis">
+<xsl:template match="d:funcsynopsis">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
-<xsl:template match="funcsynopsisinfo">
+<xsl:template match="d:funcsynopsisinfo">
   <fo:block space-after.minimum="0.8em"
             space-after.optimum="1em"
             space-after.maximum="1.2em">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="funcprototype">
+<xsl:template match="d:funcprototype">
 
   <xsl:variable name="style">
     <xsl:call-template name="funcsynopsis.style"/>
           space-before.minimum="0.8em"
           space-before.optimum="1em"
           space-before.maximum="1.2em">
-      <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/>
+      <xsl:apply-templates select="./d:paramdef" mode="kr-funcsynopsis-mode"/>
       </fo:block>
     </xsl:if>
 
   </fo:block>
 </xsl:template>
 
-<xsl:template match="funcdef">
+<xsl:template match="d:funcdef">
   <fo:inline font-family="{$monospace.font.family}">
     <xsl:apply-templates/>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="funcdef/function">
+<xsl:template match="d:funcdef/d:function">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <fo:inline font-weight="bold">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="void">
+<xsl:template match="d:void">
 
   <xsl:variable name="style">
     <xsl:call-template name="funcsynopsis.style"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="varargs">
+<xsl:template match="d:varargs">
   <xsl:text>(...);</xsl:text>
 </xsl:template>
 
-<xsl:template match="paramdef">
+<xsl:template match="d:paramdef">
 
   <xsl:variable name="style">
     <xsl:call-template name="funcsynopsis.style"/>
   </xsl:variable>
   
   <xsl:variable name="paramnum">
-    <xsl:number count="paramdef" format="1"/>
+    <xsl:number count="d:paramdef" format="1"/>
   </xsl:variable>
   <xsl:if test="$paramnum=1">(</xsl:if>
   <xsl:choose>
       <xsl:apply-templates/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates select="./parameter"/>
+      <xsl:apply-templates select="./d:parameter"/>
     </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
-    <xsl:when test="following-sibling::paramdef">
+    <xsl:when test="following-sibling::d:paramdef">
       <xsl:text>, </xsl:text>
     </xsl:when>
     <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter">
+<xsl:template match="d:paramdef/d:parameter">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <xsl:call-template name="inline.italicseq"/>
       <xsl:apply-templates/>
     </xsl:otherwise>
   </xsl:choose>
-  <xsl:if test="following-sibling::parameter">
+  <xsl:if test="following-sibling::d:parameter">
     <xsl:text>, </xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
+<xsl:template match="d:paramdef" mode="kr-funcsynopsis-mode">
   <fo:block>
     <xsl:apply-templates/>
     <xsl:text>;</xsl:text>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="funcparams">
+<xsl:template match="d:funcparams">
   <xsl:text>(</xsl:text>
   <xsl:apply-templates/>
   <xsl:text>)</xsl:text>
 <xsl:template name="funcsynopsis.style">
   <xsl:variable name="pi.style">
     <xsl:call-template name="pi.dbfo_funcsynopsis-style">
-      <xsl:with-param name="node" select="ancestor::funcsynopsis/descendant-or-self::*"/>
+      <xsl:with-param name="node" select="ancestor::d:funcsynopsis/descendant-or-self::*"/>
     </xsl:call-template>
   </xsl:variable>
 
 
 <xsl:variable name="default-classsynopsis-language">java</xsl:variable>
 
-<xsl:template match="classsynopsis
-                     |fieldsynopsis
-                     |methodsynopsis
-                     |constructorsynopsis
-                     |destructorsynopsis">
+<xsl:template match="d:classsynopsis
+                     |d:fieldsynopsis
+                     |d:methodsynopsis
+                     |d:constructorsynopsis
+                     |d:destructorsynopsis">
   <xsl:param name="language">
     <xsl:choose>
       <xsl:when test="@language">
 </xsl:template>
 
 <xsl:template name="synop-break">
-  <xsl:if test="parent::classsynopsis
-                or (following-sibling::fieldsynopsis
-                    |following-sibling::methodsynopsis
-                    |following-sibling::constructorsynopsis
-                    |following-sibling::destructorsynopsis)">
+  <xsl:if test="parent::d:classsynopsis
+                or (following-sibling::d:fieldsynopsis
+                    |following-sibling::d:methodsynopsis
+                    |following-sibling::d:constructorsynopsis
+                    |following-sibling::d:destructorsynopsis)">
     <fo:inline>&RE;</fo:inline>
   </xsl:if>
 </xsl:template>
 
 <!-- ===== Java ======================================================== -->
 
-<xsl:template match="classsynopsis" mode="java">
+<xsl:template match="d:classsynopsis" mode="java">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
             xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:apply-templates select="ooclass[1]" mode="java"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:apply-templates select="d:ooclass[1]" mode="java"/>
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text> extends</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
-      <xsl:if test="oointerface|ooexception">
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="java"/>
+      <xsl:if test="d:oointerface|d:ooexception">
         <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="oointerface">
+    <xsl:if test="d:oointerface">
       <xsl:text>implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="java"/>
-      <xsl:if test="ooexception">
+      <xsl:apply-templates select="d:oointerface" mode="java"/>
+      <xsl:if test="d:ooexception">
        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="ooexception">
+    <xsl:if test="d:ooexception">
       <xsl:text>throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="java"/>
+      <xsl:apply-templates select="d:ooexception" mode="java"/>
     </xsl:if>
     <xsl:text>&nbsp;{&RE;</xsl:text>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="java"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="java"/>
     <xsl:text>}</xsl:text>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="java">
+<xsl:template match="d:classsynopsisinfo" mode="java">
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="java">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="java">
   <xsl:choose>
     <xsl:when test="preceding-sibling::*">
       <xsl:text>, </xsl:text>
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="java">
+<xsl:template match="d:modifier|d:package" mode="java">
   <xsl:apply-templates mode="java"/>
   <xsl:if test="following-sibling::*">
     <xsl:text>&nbsp;</xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="classname" mode="java">
+<xsl:template match="d:classname" mode="java">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="java">
+<xsl:template match="d:interfacename" mode="java">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="java">
+<xsl:template match="d:exceptionname" mode="java">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="java">
+<xsl:template match="d:fieldsynopsis" mode="java">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
   </fo:block>
 </xsl:template>
 
-<xsl:template match="type" mode="java">
+<xsl:template match="d:type" mode="java">
   <xsl:apply-templates mode="java"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varname" mode="java">
+<xsl:template match="d:varname" mode="java">
   <xsl:apply-templates mode="java"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="initializer" mode="java">
+<xsl:template match="d:initializer" mode="java">
   <xsl:text>=&nbsp;</xsl:text>
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="void" mode="java">
+<xsl:template match="d:void" mode="java">
   <xsl:text>void&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="methodname" mode="java">
+<xsl:template match="d:methodname" mode="java">
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="java">
+<xsl:template match="d:methodparam" mode="java">
   <xsl:param name="indent">0</xsl:param>
-  <xsl:if test="preceding-sibling::methodparam">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>,&RE;</xsl:text>
     <xsl:if test="$indent &gt; 0">
       <xsl:call-template name="copy-string">
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="parameter" mode="java">
+<xsl:template match="d:parameter" mode="java">
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
 <xsl:template mode="java"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="decl">
     <xsl:text>  </xsl:text>
     <xsl:apply-templates select="$start-modifiers" mode="java"/>
       <xsl:apply-templates select="$notmod[1]" mode="java"/>
     </xsl:if>
 
-    <xsl:apply-templates select="methodname" mode="java"/>
+    <xsl:apply-templates select="d:methodname" mode="java"/>
   </xsl:variable>
 
   <fo:block wrap-option='no-wrap'
             xsl:use-attribute-sets="monospace.verbatim.properties">
     <xsl:copy-of select="$decl"/>
     <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="java">
+    <xsl:apply-templates select="d:methodparam" mode="java">
       <xsl:with-param name="indent" select="string-length($decl)"/>
     </xsl:apply-templates>
     <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
+    <xsl:if test="d:exceptionname">
       <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="java"/>
+      <xsl:apply-templates select="d:exceptionname" mode="java"/>
     </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
+    <xsl:if test="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
       <xsl:text> </xsl:text>
       <xsl:apply-templates select="$end-modifiers" mode="java"/>
     </xsl:if>
 
 <!-- ===== C++ ========================================================= -->
 
-<xsl:template match="classsynopsis" mode="cpp">
+<xsl:template match="d:classsynopsis" mode="cpp">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
             xsl:use-attribute-sets="monospace.verbatim.properties">
-    <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:apply-templates select="d:ooclass[1]" mode="cpp"/>
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
-      <xsl:if test="oointerface|ooexception">
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="cpp"/>
+      <xsl:if test="d:oointerface|d:ooexception">
        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="oointerface">
+    <xsl:if test="d:oointerface">
       <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="cpp"/>
-      <xsl:if test="ooexception">
+      <xsl:apply-templates select="d:oointerface" mode="cpp"/>
+      <xsl:if test="d:ooexception">
        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="ooexception">
+    <xsl:if test="d:ooexception">
       <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="cpp"/>
+      <xsl:apply-templates select="d:ooexception" mode="cpp"/>
     </xsl:if>
     <xsl:text>&nbsp;{&RE;</xsl:text>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="cpp"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="cpp"/>
     <xsl:text>}</xsl:text>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="cpp">
+<xsl:template match="d:classsynopsisinfo" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="cpp">
   <xsl:if test="preceding-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="cpp">
+<xsl:template match="d:modifier|d:package" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
     <xsl:if test="following-sibling::*">
       <xsl:text>&nbsp;</xsl:text>
     </xsl:if>
 </xsl:template>
 
-<xsl:template match="classname" mode="cpp">
+<xsl:template match="d:classname" mode="cpp">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="cpp">
+<xsl:template match="d:interfacename" mode="cpp">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="cpp">
+<xsl:template match="d:exceptionname" mode="cpp">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="cpp">
+<xsl:template match="d:fieldsynopsis" mode="cpp">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="cpp">
+<xsl:template match="d:type" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varname" mode="cpp">
+<xsl:template match="d:varname" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="initializer" mode="cpp">
+<xsl:template match="d:initializer" mode="cpp">
   <xsl:text>=&nbsp;</xsl:text>
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="void" mode="cpp">
+<xsl:template match="d:void" mode="cpp">
   <xsl:text>void&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="methodname" mode="cpp">
+<xsl:template match="d:methodname" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="cpp">
-  <xsl:if test="preceding-sibling::methodparam">
+<xsl:template match="d:methodparam" mode="cpp">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="parameter" mode="cpp">
+<xsl:template match="d:parameter" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
 <xsl:template mode="cpp"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
 
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
       <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
     </xsl:if>
 
-    <xsl:apply-templates select="methodname" mode="cpp"/>
+    <xsl:apply-templates select="d:methodname" mode="cpp"/>
     <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="cpp"/>
+    <xsl:apply-templates select="d:methodparam" mode="cpp"/>
     <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
+    <xsl:if test="d:exceptionname">
       <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="cpp"/>
+      <xsl:apply-templates select="d:exceptionname" mode="cpp"/>
     </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
+    <xsl:if test="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
       <xsl:text> </xsl:text>
       <xsl:apply-templates select="$end-modifiers" mode="cpp"/>
     </xsl:if>
 
 <!-- ===== IDL ========================================================= -->
 
-<xsl:template match="classsynopsis" mode="idl">
+<xsl:template match="d:classsynopsis" mode="idl">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
             xsl:use-attribute-sets="monospace.verbatim.properties">
     <xsl:text>interface </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="idl"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:apply-templates select="d:ooclass[1]" mode="idl"/>
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
-      <xsl:if test="oointerface|ooexception">
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="idl"/>
+      <xsl:if test="d:oointerface|d:ooexception">
        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="oointerface">
+    <xsl:if test="d:oointerface">
       <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="idl"/>
-      <xsl:if test="ooexception">
+      <xsl:apply-templates select="d:oointerface" mode="idl"/>
+      <xsl:if test="d:ooexception">
        <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="ooexception">
+    <xsl:if test="d:ooexception">
       <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="idl"/>
+      <xsl:apply-templates select="d:ooexception" mode="idl"/>
     </xsl:if>
     <xsl:text>&nbsp;{&RE;</xsl:text>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="idl"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="idl"/>
     <xsl:text>}</xsl:text>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="idl">
+<xsl:template match="d:classsynopsisinfo" mode="idl">
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="idl">
   <xsl:if test="preceding-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="idl">
+<xsl:template match="d:modifier|d:package" mode="idl">
   <xsl:apply-templates mode="idl"/>
     <xsl:if test="following-sibling::*">
       <xsl:text>&nbsp;</xsl:text>
     </xsl:if>
 </xsl:template>
 
-<xsl:template match="classname" mode="idl">
+<xsl:template match="d:classname" mode="idl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="idl">
+<xsl:template match="d:interfacename" mode="idl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="idl">
+<xsl:template match="d:exceptionname" mode="idl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="idl">
+<xsl:template match="d:fieldsynopsis" mode="idl">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="idl">
+<xsl:template match="d:type" mode="idl">
   <xsl:apply-templates mode="idl"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varname" mode="idl">
+<xsl:template match="d:varname" mode="idl">
   <xsl:apply-templates mode="idl"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="initializer" mode="idl">
+<xsl:template match="d:initializer" mode="idl">
   <xsl:text>=&nbsp;</xsl:text>
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="void" mode="idl">
+<xsl:template match="d:void" mode="idl">
   <xsl:text>void&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="methodname" mode="idl">
+<xsl:template match="d:methodname" mode="idl">
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="idl">
-  <xsl:if test="preceding-sibling::methodparam">
+<xsl:template match="d:methodparam" mode="idl">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="parameter" mode="idl">
+<xsl:template match="d:parameter" mode="idl">
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
 <xsl:template mode="idl"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
 
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
       <xsl:apply-templates select="$notmod[1]" mode="idl"/>
     </xsl:if>
 
-    <xsl:apply-templates select="methodname" mode="idl"/>
+    <xsl:apply-templates select="d:methodname" mode="idl"/>
     <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="idl"/>
+    <xsl:apply-templates select="d:methodparam" mode="idl"/>
     <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
+    <xsl:if test="d:exceptionname">
       <xsl:text>&RE;&nbsp;&nbsp;&nbsp;&nbsp;raises(</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="idl"/>
+      <xsl:apply-templates select="d:exceptionname" mode="idl"/>
       <xsl:text>)</xsl:text>
     </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
+    <xsl:if test="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
       <xsl:text> </xsl:text>
       <xsl:apply-templates select="$end-modifiers" mode="idl"/>
     </xsl:if>
 
 <!-- ===== Perl ======================================================== -->
 
-<xsl:template match="classsynopsis" mode="perl">
+<xsl:template match="d:classsynopsis" mode="perl">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
             xsl:use-attribute-sets="monospace.verbatim.properties">
     <xsl:text>package </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="perl"/>
+    <xsl:apply-templates select="d:ooclass[1]" mode="perl"/>
     <xsl:text>;&RE;</xsl:text>
 
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text>@ISA = (</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="perl"/>
       <xsl:text>);&RE;</xsl:text>
     </xsl:if>
 
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="perl"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="perl"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="perl">
+<xsl:template match="d:classsynopsisinfo" mode="perl">
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="perl">
   <xsl:if test="preceding-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="perl">
+<xsl:template match="d:modifier|d:package" mode="perl">
   <xsl:apply-templates mode="perl"/>
     <xsl:if test="following-sibling::*">
       <xsl:text>&nbsp;</xsl:text>
     </xsl:if>
 </xsl:template>
 
-<xsl:template match="classname" mode="perl">
+<xsl:template match="d:classname" mode="perl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="perl">
+<xsl:template match="d:interfacename" mode="perl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="perl">
+<xsl:template match="d:exceptionname" mode="perl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="perl">
+<xsl:template match="d:fieldsynopsis" mode="perl">
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             linefeed-treatment="preserve"
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="perl">
+<xsl:template match="d:type" mode="perl">
   <xsl:apply-templates mode="perl"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varname" mode="perl">
+<xsl:template match="d:varname" mode="perl">
   <xsl:apply-templates mode="perl"/>
   <xsl:text>&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="initializer" mode="perl">
+<xsl:template match="d:initializer" mode="perl">
   <xsl:text>=&nbsp;</xsl:text>
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="void" mode="perl">
+<xsl:template match="d:void" mode="perl">
   <xsl:text>void&nbsp;</xsl:text>
 </xsl:template>
 
-<xsl:template match="methodname" mode="perl">
+<xsl:template match="d:methodname" mode="perl">
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="perl">
-  <xsl:if test="preceding-sibling::methodparam">
+<xsl:template match="d:methodparam" mode="perl">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="parameter" mode="perl">
+<xsl:template match="d:parameter" mode="perl">
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
 <xsl:template mode="perl"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
 
   <fo:block wrap-option='no-wrap'
             white-space-collapse='false'
             xsl:use-attribute-sets="monospace.verbatim.properties">
     <xsl:text>sub </xsl:text>
 
-    <xsl:apply-templates select="methodname" mode="perl"/>
+    <xsl:apply-templates select="d:methodname" mode="perl"/>
     <xsl:text> { ... };</xsl:text>
     <xsl:call-template name="synop-break"/>
   </fo:block>
 </xsl:template>
 
 <!-- Used when not occurring as a child of classsynopsis -->
-<xsl:template match="ooclass|oointerface|ooexception">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- * per-mode matches for those linking elements in order for them -->
 <!-- * to be processed as expected. -->
 
-<xsl:template match="link|olink|xref" mode="java">
+<xsl:template match="d:link|d:olink|d:xref" mode="java">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="cpp">
+<xsl:template match="d:link|d:olink|d:xref" mode="cpp">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="idl">
+<xsl:template match="d:link|d:olink|d:xref" mode="idl">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="perl">
+<xsl:template match="d:link|d:olink|d:xref" mode="perl">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
index 68a66548d53f4c28d3c50b3e844117f678c60c70..fb820bb9c4a7bec45f4b95750fcfa3e8de14bbd9 100644 (file)
@@ -1,13 +1,14 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:rx="http://www.renderx.com/XSL/Extensions"
                 xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
                 xmlns:xtbl="com.nwalsh.xalan.Table"
                 xmlns:lxslt="http://xml.apache.org/xslt"
                 xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
-                exclude-result-prefixes="doc stbl xtbl lxslt ptbl"
+                exclude-result-prefixes="doc stbl xtbl lxslt ptbl d"
                 version='1.0'>
 
 <xsl:include href="../common/table.xsl"/>
@@ -46,7 +47,7 @@
 
 <xsl:template name="make.table.content">
   <xsl:choose>
-    <xsl:when test="tgroup|mediaobject|graphic">
+    <xsl:when test="d:tgroup|d:mediaobject|d:graphic">
       <xsl:call-template name="calsTable"/>
     </xsl:when>
     <xsl:otherwise>
@@ -63,7 +64,7 @@
     <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 
-  <xsl:for-each select="tgroup">
+  <xsl:for-each select="d:tgroup">
 
     <fo:table xsl:use-attribute-sets="table.table.properties">
       <xsl:if test="$keep.together != ''">
@@ -72,7 +73,7 @@
         </xsl:attribute>
       </xsl:if>
       <xsl:call-template name="table.frame"/>
-      <xsl:if test="following-sibling::tgroup">
+      <xsl:if test="following-sibling::d:tgroup">
         <xsl:attribute name="border-bottom-width">0pt</xsl:attribute>
         <xsl:attribute name="border-bottom-style">none</xsl:attribute>
         <xsl:attribute name="padding-bottom">0pt</xsl:attribute>
@@ -82,7 +83,7 @@
         <xsl:attribute name="space-after.optimum">0pt</xsl:attribute>
         <xsl:attribute name="space-after.maximum">0pt</xsl:attribute>
       </xsl:if>
-      <xsl:if test="preceding-sibling::tgroup">
+      <xsl:if test="preceding-sibling::d:tgroup">
         <xsl:attribute name="border-top-width">0pt</xsl:attribute>
         <xsl:attribute name="border-top-style">none</xsl:attribute>
         <xsl:attribute name="padding-top">0pt</xsl:attribute>
       <xsl:apply-templates select="."/>
     </fo:table>
 
-    <xsl:for-each select="mediaobject|graphic">
+    <xsl:for-each select="d:mediaobject|d:graphic">
       <xsl:apply-templates select="."/>
     </xsl:for-each>
 
   </xsl:for-each>
 
-  <xsl:apply-templates select="caption"/>
+  <xsl:apply-templates select="d:caption"/>
 
 </xsl:template>
 
   </xsl:variable>
 
   <xsl:choose>
-    <xsl:when test="self::table">
+    <xsl:when test="self::d:table">
       <fo:block id="{$id}"
                 xsl:use-attribute-sets="table.properties">
         <xsl:if test="$keep.together != ''">
 
 <!-- Output a table's footnotes in a block -->
 <xsl:template name="table.footnote.block">
-  <xsl:if test=".//footnote">
+  <xsl:if test=".//d:footnote">
     <fo:block keep-with-previous.within-column="always">
-      <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
+      <xsl:apply-templates select=".//d:footnote" mode="table.footnote.mode"/>
     </fo:block>
   </xsl:if>
 </xsl:template>
     <xsl:choose>
       <!-- If this is the last row, rowsep never applies (except when 
            the ancestor tgroup has a following sibling tgroup) -->
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
-                          or ancestor-or-self::thead/following-sibling::tbody
-                          or ancestor-or-self::tbody/preceding-sibling::tfoot)
-                          and not(ancestor::tgroup/following-sibling::tgroup)">
+      <xsl:when test="not(ancestor-or-self::d:row[1]/following-sibling::d:row
+                          or ancestor-or-self::d:thead/following-sibling::d:tbody
+                          or ancestor-or-self::d:tbody/preceding-sibling::d:tfoot)
+                          and not(ancestor::d:tgroup/following-sibling::d:tgroup)">
         <xsl:value-of select="0"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="inherited.table.attribute">
           <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="row" select="ancestor-or-self::d:row[1]"/>
           <xsl:with-param name="colnum" select="$colnum"/>
           <xsl:with-param name="attribute" select="'rowsep'"/>
         </xsl:call-template>
   <xsl:variable name="colsep">
     <xsl:choose>
       <!-- If this is the last column, colsep never applies. -->
-      <xsl:when test="number($colnum) &gt;= ancestor::tgroup/@cols">0</xsl:when>
+      <xsl:when test="number($colnum) &gt;= ancestor::d:tgroup/@cols">0</xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="inherited.table.attribute">
           <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="row" select="ancestor-or-self::d:row[1]"/>
           <xsl:with-param name="colnum" select="$colnum"/>
           <xsl:with-param name="attribute" select="'colsep'"/>
         </xsl:call-template>
       </xsl:call-template>
     </xsl:if>
 
-    <xsl:if test="$colsep &gt; 0 and number($colnum) &lt; ancestor::tgroup/@cols">
+    <xsl:if test="$colsep &gt; 0 and number($colnum) &lt; ancestor::d:tgroup/@cols">
       <xsl:call-template name="border">
         <xsl:with-param name="side" select="'end'"/>
       </xsl:call-template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="tgroup" name="tgroup">
+<xsl:template match="d:tgroup" name="tgroup">
   <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'">
     <xsl:message terminate="yes">
       <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
   </xsl:variable>
 
   <xsl:variable name="prop-columns"
-                select=".//colspec[contains(@colwidth, '*')]"/>
+                select=".//d:colspec[contains(@colwidth, '*')]"/>
   <xsl:if test="count($prop-columns) != 0 or
                 $fop.extensions != 0 or
                 $fop1.extensions != 0">
     </xsl:otherwise>
   </xsl:choose>
 
-  <xsl:apply-templates select="thead"/>
-  <xsl:apply-templates select="tfoot"/>
-  <xsl:apply-templates select="tbody"/>
+  <xsl:apply-templates select="d:thead"/>
+  <xsl:apply-templates select="d:tfoot"/>
+  <xsl:apply-templates select="d:tbody"/>
 </xsl:template>
 
-<xsl:template match="colspec"></xsl:template>
+<xsl:template match="d:colspec"></xsl:template>
 
 <xsl:template name="table.width">
 
   <xsl:variable name="numcols">
     <xsl:call-template name="widest-html-row">
-      <xsl:with-param name="rows" select=".//tr"/>
+      <xsl:with-param name="rows" select=".//d:tr"/>
     </xsl:call-template>
   </xsl:variable>
 
   <xsl:variable name="explicit.table.width">
     <xsl:choose>
-      <xsl:when test="self::entrytbl">
+      <xsl:when test="self::d:entrytbl">
         <xsl:call-template name="pi.dbfo_table-width"/>
       </xsl:when>
-      <xsl:when test="self::table or self::informaltable">
+      <xsl:when test="self::d:table or self::d:informaltable">
         <xsl:call-template name="pi.dbfo_table-width"/>
       </xsl:when>
       <xsl:otherwise>
   <xsl:variable name="column.sum">
     <xsl:choose>
       <!-- CALS table -->
-      <xsl:when test="tgroup/@cols">
+      <xsl:when test="d:tgroup/@cols">
         <!-- change context to the first tgroup -->
-        <xsl:for-each select="tgroup[1]">
-          <xsl:if test="count(colspec) = @cols">
-            <xsl:for-each select="colspec">
+        <xsl:for-each select="d:tgroup[1]">
+          <xsl:if test="count(d:colspec) = @cols">
+            <xsl:for-each select="d:colspec">
               <xsl:if test="position() != 1">
                 <xsl:text> + </xsl:text>
               </xsl:if>
       </xsl:when>
       <xsl:otherwise>
         <!-- HTML table -->
-        <xsl:if test="count(col|colgroup/col) = $numcols">
-          <xsl:for-each select="col|colgroup/col">
+        <xsl:if test="count(d:col|d:colgroup/d:col) = $numcols">
+          <xsl:for-each select="d:col|d:colgroup/d:col">
             <xsl:if test="position() != 1">
               <xsl:text> + </xsl:text>
             </xsl:if>
   </xsl:variable>
 
   <xsl:variable name="prop-columns"
-                select=".//colspec[contains(@colwidth, '*')]"/>
+                select=".//d:colspec[contains(@colwidth, '*')]"/>
 
   <xsl:variable name="table.width">
     <xsl:choose>
 
 </xsl:template>
 
-<xsl:template match="spanspec"></xsl:template>
+<xsl:template match="d:spanspec"></xsl:template>
 
-<xsl:template match="thead">
+<xsl:template match="d:thead">
   <xsl:variable name="tgroup" select="parent::*"/>
 
   <fo:table-header start-indent="0pt" end-indent="0pt">
     <xsl:choose>
       <!-- Use recursion if @morerows is used -->
-      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
-        <xsl:apply-templates select="row[1]">
+      <xsl:when test="d:row/d:entry/@morerows|d:row/d:entrytbl/@morerows">
+        <xsl:apply-templates select="d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
         </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="row">
+        <xsl:apply-templates select="d:row">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
   </fo:table-header>
 </xsl:template>
 
-<xsl:template match="tfoot">
+<xsl:template match="d:tfoot">
   <xsl:variable name="tgroup" select="parent::*"/>
 
   <fo:table-footer start-indent="0pt" end-indent="0pt">
     <xsl:choose>
       <!-- Use recursion if @morerows is used -->
-      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
-        <xsl:apply-templates select="row[1]">
+      <xsl:when test="d:row/d:entry/@morerows|d:row/d:entrytbl/@morerows">
+        <xsl:apply-templates select="d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
         </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="row">
+        <xsl:apply-templates select="d:row">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
   </fo:table-footer>
 </xsl:template>
 
-<xsl:template match="tbody">
+<xsl:template match="d:tbody">
   <xsl:variable name="tgroup" select="parent::*"/>
 
   <fo:table-body start-indent="0pt" end-indent="0pt">
     <xsl:choose>
       <!-- Use recursion if @morerows is used -->
-      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
-        <xsl:apply-templates select="row[1]">
+      <xsl:when test="d:row/d:entry/@morerows|d:row/d:entrytbl/@morerows">
+        <xsl:apply-templates select="d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
         </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="row">
+        <xsl:apply-templates select="d:row">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
   </fo:table-body>
 </xsl:template>
 
-<xsl:template match="row">
+<xsl:template match="d:row">
   <xsl:param name="spans"/>
   <xsl:param name="browserows"/>
 
       </fo:table-row>
 
       <xsl:if test="$browserows = 'recurse'">
-        <xsl:apply-templates select="following-sibling::row[1]">
+        <xsl:apply-templates select="following-sibling::d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="consume-row">
               <xsl:with-param name="spans" select="$spans"/>
     <xsl:call-template name="table.row.properties"/>
     <xsl:call-template name="anchor"/>
 
-    <xsl:apply-templates select="(entry|entrytbl)[1]">
+    <xsl:apply-templates select="(d:entry|d:entrytbl)[1]">
       <xsl:with-param name="spans" select="$spans"/>
     </xsl:apply-templates>
   </fo:table-row>
 
   <xsl:if test="$browserows = 'recurse'">
-    <xsl:if test="following-sibling::row">
+    <xsl:if test="following-sibling::d:row">
       <xsl:variable name="nextspans">
-        <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
+        <xsl:apply-templates select="(d:entry|d:entrytbl)[1]" mode="span">
           <xsl:with-param name="spans" select="$spans"/>
         </xsl:apply-templates>
       </xsl:variable>
   
-      <xsl:apply-templates select="following-sibling::row[1]">
+      <xsl:apply-templates select="following-sibling::d:row[1]">
         <xsl:with-param name="spans" select="$nextspans"/>
         <xsl:with-param name="browserows" select="$browserows"/>
       </xsl:apply-templates>
   </xsl:if>
 
   <!-- Keep header row with next row -->
-  <xsl:if test="ancestor::thead">
+  <xsl:if test="ancestor::d:thead">
     <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
   </xsl:if>
 
 </xsl:template>
 
-<xsl:template match="entry|entrytbl" name="entry">
+<xsl:template match="d:entry|d:entrytbl" name="entry">
   <xsl:param name="col" select="1"/>
   <xsl:param name="spans"/>
 
-  <xsl:variable name="row" select="parent::row"/>
+  <xsl:variable name="row" select="parent::d:row"/>
   <xsl:variable name="group" select="$row/parent::*[1]"/>
-  <xsl:variable name="frame" select="ancestor::tgroup/parent::*/@frame"/>
+  <xsl:variable name="frame" select="ancestor::d:tgroup/parent::*/@frame"/>
 
   <xsl:variable name="empty.cell" select="count(node()) = 0"/>
 
     <xsl:choose>
       <!-- If this is the last row, rowsep never applies (except when 
            the ancestor tgroup has a following sibling tgroup) -->
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
-                          or ancestor-or-self::thead/following-sibling::tbody
-                          or ancestor-or-self::tbody/preceding-sibling::tfoot)
-                          and not(ancestor::tgroup/following-sibling::tgroup)">
+      <xsl:when test="not(ancestor-or-self::d:row[1]/following-sibling::d:row
+                          or ancestor-or-self::d:thead/following-sibling::d:tbody
+                          or ancestor-or-self::d:tbody/preceding-sibling::d:tfoot)
+                          and not(ancestor::d:tgroup/following-sibling::d:tgroup)">
         <xsl:value-of select="0"/>
       </xsl:when>
       <!-- Check for morerows too -->
-      <xsl:when test="(@morerows and count(ancestor-or-self::row[1]/
-                       following-sibling::row) = @morerows )
-                      and not (ancestor-or-self::thead/following-sibling::tbody
-                       or ancestor-or-self::tbody/preceding-sibling::tfoot)
-                       and not(ancestor::tgroup/following-sibling::tgroup)">
+      <xsl:when test="(@morerows and count(ancestor-or-self::d:row[1]/
+                       following-sibling::d:row) = @morerows )
+                      and not (ancestor-or-self::d:thead/following-sibling::d:tbody
+                       or ancestor-or-self::d:tbody/preceding-sibling::d:tfoot)
+                       and not(ancestor::d:tgroup/following-sibling::d:tgroup)">
         <xsl:value-of select="0"/>
       </xsl:when>
 
           <xsl:call-template name="table.cell.block.properties"/>
 
           <!-- are we missing any indexterms? -->
-          <xsl:if test="not(preceding-sibling::entry)
-                        and not(parent::row/preceding-sibling::row)">
+          <xsl:if test="not(preceding-sibling::d:entry)
+                        and not(parent::d:row/preceding-sibling::d:row)">
             <!-- this is the first entry of the first row -->
-            <xsl:if test="ancestor::thead or
-                          (ancestor::tbody
-                           and not(ancestor::tbody/preceding-sibling::thead
-                                   or ancestor::tbody/preceding-sibling::tbody))">
+            <xsl:if test="ancestor::d:thead or
+                          (ancestor::d:tbody
+                           and not(ancestor::d:tbody/preceding-sibling::d:thead
+                                   or ancestor::d:tbody/preceding-sibling::d:tbody))">
               <!-- of the thead or the first tbody -->
-              <xsl:apply-templates select="ancestor::tgroup/preceding-sibling::indexterm"/>
+              <xsl:apply-templates select="ancestor::d:tgroup/preceding-sibling::d:indexterm"/>
             </xsl:if>
           </xsl:if>
 
             <xsl:when test="$empty.cell">
               <xsl:text>&#160;</xsl:text>
             </xsl:when>
-            <xsl:when test="self::entrytbl">
+            <xsl:when test="self::d:entrytbl">
               <xsl:variable name="prop-columns"
-                            select=".//colspec[contains(@colwidth, '*')]"/>
+                            select=".//d:colspec[contains(@colwidth, '*')]"/>
               <fo:table xsl:use-attribute-sets="table.table.properties">
                 <xsl:if test="count($prop-columns) != 0">
                   <xsl:attribute name="table-layout">fixed</xsl:attribute>
 
       <xsl:variable name="cell-orientation">
         <xsl:call-template name="pi.dbfo_orientation">
-          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
+          <xsl:with-param name="node" select="ancestor-or-self::d:entry"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="row-orientation">
         <xsl:call-template name="pi.dbfo_orientation">
-          <xsl:with-param name="node" select="ancestor-or-self::row"/>
+          <xsl:with-param name="node" select="ancestor-or-self::d:row"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="cell-width">
         <xsl:call-template name="pi.dbfo_rotated-width">
-          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
+          <xsl:with-param name="node" select="ancestor-or-self::d:entry"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="row-width">
         <xsl:call-template name="pi.dbfo_rotated-width">
-          <xsl:with-param name="node" select="ancestor-or-self::row"/>
+          <xsl:with-param name="node" select="ancestor-or-self::d:row"/>
         </xsl:call-template>
       </xsl:variable>
 
 
       <xsl:variable name="bgcolor">
         <xsl:call-template name="pi.dbfo_bgcolor">
-          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
+          <xsl:with-param name="node" select="ancestor-or-self::d:entry"/>
         </xsl:call-template>
       </xsl:variable>
 
       </fo:table-cell>
 
       <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry
-                                       |following-sibling::entrytbl)[1]">
+        <xsl:when test="following-sibling::d:entry|following-sibling::d:entrytbl">
+          <xsl:apply-templates select="(following-sibling::d:entry
+                                       |following-sibling::d:entrytbl)[1]">
             <xsl:with-param name="col" select="$col+$entry.colspan"/>
             <xsl:with-param name="spans" select="$following.spans"/>
           </xsl:apply-templates>
   <xsl:param name="char.inherit" select="''"/>
 
   <xsl:choose>
-    <xsl:when test="ancestor::tgroup">
+    <xsl:when test="ancestor::d:tgroup">
       <xsl:if test="$bgcolor.pi != ''">
         <xsl:attribute name="background-color">
           <xsl:value-of select="$bgcolor.pi"/>
       </xsl:if>
 
       <xsl:if test="$colsep.inherit &gt; 0 and 
-                      $col &lt; (ancestor::tgroup/@cols|ancestor::entrytbl/@cols)[last()]">
+                      $col &lt; (ancestor::d:tgroup/@cols|ancestor::d:entrytbl/@cols)[last()]">
         <xsl:call-template name="border">
           <xsl:with-param name="side" select="'end'"/>
         </xsl:call-template>
 <xsl:template name="table.cell.block.properties">
   <!-- highlight this entry? -->
   <xsl:choose>
-    <xsl:when test="ancestor::thead or ancestor::tfoot">
+    <xsl:when test="ancestor::d:thead or ancestor::d:tfoot">
       <xsl:attribute name="font-weight">bold</xsl:attribute>
     </xsl:when>
     <!-- Make row headers bold too -->
-    <xsl:when test="ancestor::tbody and 
-                    (ancestor::table[@rowheader = 'firstcol'] or
-                    ancestor::informaltable[@rowheader = 'firstcol']) and
-                    ancestor-or-self::entry[1][count(preceding-sibling::entry) = 0]">
+    <xsl:when test="ancestor::d:tbody and
+                    (ancestor::d:table[@rowheader = 'firstcol'] or
+                    ancestor::d:informaltable[@rowheader = 'firstcol']) and
+                    ancestor-or-self::d:entry[1][count(preceding-sibling::d:entry) = 0]">
       <xsl:attribute name="font-weight">bold</xsl:attribute>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="entry|entrytbl" name="sentry" mode="span">
+<xsl:template match="d:entry|d:entrytbl" name="sentry" mode="span">
   <xsl:param name="col" select="1"/>
   <xsl:param name="spans"/>
 
       </xsl:call-template>
 
       <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry
-                                       |following-sibling::entrytbl)[1]"
+        <xsl:when test="following-sibling::d:entry|following-sibling::d:entrytbl">
+          <xsl:apply-templates select="(following-sibling::d:entry
+                                       |following-sibling::d:entrytbl)[1]"
                                mode="span">
             <xsl:with-param name="col" select="$col+$entry.colspan"/>
             <xsl:with-param name="spans" select="$following.spans"/>
 <xsl:template name="generate.col.raw">
   <!-- generate the table-column for column countcol -->
   <xsl:param name="countcol">1</xsl:param>
-  <xsl:param name="colspecs" select="./colspec"/>
+  <xsl:param name="colspecs" select="./d:colspec"/>
   <xsl:param name="count">1</xsl:param>
   <xsl:param name="colnum">1</xsl:param>
 
 <xsl:template name="generate.col">
   <!-- generate the table-column for column countcol -->
   <xsl:param name="countcol">1</xsl:param>
-  <xsl:param name="colspecs" select="./colspec"/>
+  <xsl:param name="colspecs" select="./d:colspec"/>
   <xsl:param name="count">1</xsl:param>
   <xsl:param name="colnum">1</xsl:param>
 
@@ -1680,7 +1681,7 @@ proportional-column-width() function.</para>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="table/caption">
+<xsl:template match="d:table/d:caption">
   <fo:block xsl:use-attribute-sets="table.caption.properties">
     <xsl:apply-templates/>
   </fo:block>
index 74db14f499cb3c757c4aa977c5ce91c3c26ed5cc..c3bfe1f522cf00e28719ba86edb42b3333d1b3c5 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
 
 <!-- ********************************************************************
@@ -13,7 +15,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="task">
+<xsl:template match="d:task">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -35,8 +37,8 @@
   </xsl:variable>
 
   <xsl:variable name="preamble"
-                select="*[not(self::title
-                              or self::titleabbrev)]"/>
+                select="*[not(self::d:title
+                              or self::d:titleabbrev)]"/>
 
   <xsl:variable name="keep.together">
     <xsl:call-template name="pi.dbfo_keep-together"/>
 
     <xsl:call-template name="anchor"/>
 
-    <xsl:if test="title and $placement = 'before'">
+    <xsl:if test="d:title and $placement = 'before'">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
     <xsl:apply-templates select="$preamble"/>
 
-    <xsl:if test="title and $placement != 'before'">
+    <xsl:if test="d:title and $placement != 'before'">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="task/title">
+<xsl:template match="d:task/d:title">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="tasksummary">
+<xsl:template match="d:tasksummary">
   <xsl:call-template name="semiformal.object"/>
 </xsl:template>
 
-<xsl:template match="tasksummary/title"/>
+<xsl:template match="d:tasksummary/d:title"/>
 
-<xsl:template match="taskprerequisites">
+<xsl:template match="d:taskprerequisites">
   <xsl:call-template name="semiformal.object"/>
 </xsl:template>
 
-<xsl:template match="taskprerequisites/title"/>
+<xsl:template match="d:taskprerequisites/d:title"/>
 
-<xsl:template match="taskrelated">
+<xsl:template match="d:taskrelated">
   <xsl:call-template name="semiformal.object"/>
 </xsl:template>
 
-<xsl:template match="taskrelated/title"/>
+<xsl:template match="d:taskrelated/d:title"/>
 
 </xsl:stylesheet>
index c7c65ba0748319207f33dd6f60fef57a8419ff71..2b67b429930dc0fd8a29e057ee040ca56395540e 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="abbrev" mode="titlepage.mode">
+<xsl:template match="d:abbrev" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="abstract" mode="titlepage.mode">
+<xsl:template match="d:abstract" mode="titlepage.mode">
   <fo:block xsl:use-attribute-sets="abstract.properties">
     <fo:block xsl:use-attribute-sets="abstract.title.properties">
       <xsl:choose>
-       <xsl:when test="title|info/title">
-         <xsl:apply-templates select="title|info/title"/>
+       <xsl:when test="d:title|d:info/d:title">
+         <xsl:apply-templates select="d:title|d:info/d:title"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:call-template name="gentext">
        </xsl:otherwise>
       </xsl:choose>
     </fo:block>
-    <xsl:apply-templates select="*[not(self::title)]" mode="titlepage.mode"/>
+    <xsl:apply-templates select="*[not(self::d:title)]" mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="abstract/title" mode="titlepage.mode"/>
+<xsl:template match="d:abstract/d:title" mode="titlepage.mode"/>
 
-<xsl:template match="abstract/title" mode="titlepage.abstract.title.mode">
+<xsl:template match="d:abstract/d:title" mode="titlepage.abstract.title.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="address" mode="titlepage.mode">
+<xsl:template match="d:address" mode="titlepage.mode">
   <!-- use the normal address handling code -->
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="affiliation" mode="titlepage.mode">
+<xsl:template match="d:affiliation" mode="titlepage.mode">
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="artpagenums" mode="titlepage.mode">
+<xsl:template match="d:artpagenums" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="author" mode="titlepage.mode">
+<xsl:template match="d:author" mode="titlepage.mode">
   <fo:block>
     <xsl:call-template name="anchor"/>
     <xsl:choose>
-      <xsl:when test="orgname">
+      <xsl:when test="d:orgname">
         <xsl:apply-templates/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name"/>
-        <xsl:if test="affiliation/orgname">
+        <xsl:if test="d:affiliation/d:orgname">
           <xsl:text>, </xsl:text>
-          <xsl:apply-templates select="affiliation/orgname" mode="titlepage.mode"/>
+          <xsl:apply-templates select="d:affiliation/d:orgname" mode="titlepage.mode"/>
         </xsl:if>
-        <xsl:if test="email|affiliation/address/email">
+        <xsl:if test="d:email|d:affiliation/d:address/d:email">
           <xsl:text> </xsl:text>
-          <xsl:apply-templates select="(email|affiliation/address/email)[1]"/>
+          <xsl:apply-templates select="(d:email|d:affiliation/d:address/d:email)[1]"/>
         </xsl:if>
       </xsl:otherwise>
     </xsl:choose>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="authorblurb" mode="titlepage.mode">
+<xsl:template match="d:authorblurb" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="titlepage.mode">
+<xsl:template match="d:authorgroup" mode="titlepage.mode">
   <fo:wrapper>
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:wrapper>
 </xsl:template>
 
-<xsl:template match="authorinitials" mode="titlepage.mode">
+<xsl:template match="d:authorinitials" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="bibliomisc" mode="titlepage.mode">
+<xsl:template match="d:bibliomisc" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="bibliomset" mode="titlepage.mode">
+<xsl:template match="d:bibliomset" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="collab" mode="titlepage.mode">
+<xsl:template match="d:collab" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="collabname" mode="titlepage.mode">
+<xsl:template match="d:collabname" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="confgroup" mode="titlepage.mode">
+<xsl:template match="d:confgroup" mode="titlepage.mode">
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="confdates" mode="titlepage.mode">
+<xsl:template match="d:confdates" mode="titlepage.mode">
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="conftitle" mode="titlepage.mode">
+<xsl:template match="d:conftitle" mode="titlepage.mode">
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="confnum" mode="titlepage.mode">
+<xsl:template match="d:confnum" mode="titlepage.mode">
   <!-- suppress -->
 </xsl:template>
 
-<xsl:template match="contractnum" mode="titlepage.mode">
+<xsl:template match="d:contractnum" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="contractsponsor" mode="titlepage.mode">
+<xsl:template match="d:contractsponsor" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="contrib" mode="titlepage.mode">
+<xsl:template match="d:contrib" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="copyright" mode="titlepage.mode">
+<xsl:template match="d:copyright" mode="titlepage.mode">
   <xsl:call-template name="gentext">
     <xsl:with-param name="key" select="'Copyright'"/>
   </xsl:call-template>
   </xsl:call-template>
   <xsl:call-template name="gentext.space"/>
   <xsl:call-template name="copyright.years">
-    <xsl:with-param name="years" select="year"/>
+    <xsl:with-param name="years" select="d:year"/>
     <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
     <xsl:with-param name="single.year.ranges"
                     select="$make.single.year.ranges"/>
   </xsl:call-template>
   <xsl:call-template name="gentext.space"/>
-  <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+  <xsl:apply-templates select="d:holder" mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="year" mode="titlepage.mode">
+<xsl:template match="d:year" mode="titlepage.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="holder" mode="titlepage.mode">
+<xsl:template match="d:holder" mode="titlepage.mode">
   <xsl:apply-templates/>
   <xsl:if test="position() &lt; last()">
     <xsl:text>, </xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="titlepage.mode">
+<xsl:template match="d:corpauthor" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="titlepage.mode">
+<xsl:template match="d:corpcredit" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="corpname" mode="titlepage.mode">
+<xsl:template match="d:corpname" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="date" mode="titlepage.mode">
+<xsl:template match="d:date" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="edition" mode="titlepage.mode">
+<xsl:template match="d:edition" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
   <xsl:call-template name="gentext.space"/>
   <xsl:call-template name="gentext">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="editor" mode="titlepage.mode">
+<xsl:template match="d:editor" mode="titlepage.mode">
   <!-- The first editor is dealt with in the following template,
        which in turn displays all editors of the same mode. -->
 </xsl:template>
 
-<xsl:template match="editor[1]" priority="2" mode="titlepage.mode">
+<xsl:template match="d:editor[1]" priority="2" mode="titlepage.mode">
   <xsl:call-template name="gentext.edited.by"/>
   <xsl:call-template name="gentext.space"/>
   <xsl:call-template name="person.name.list">
-    <xsl:with-param name="person.list" select="../editor"/>
+    <xsl:with-param name="person.list" select="../d:editor"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="firstname" mode="titlepage.mode">
+<xsl:template match="d:firstname" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="graphic" mode="titlepage.mode">
+<xsl:template match="d:graphic" mode="titlepage.mode">
   <!-- use the normal graphic handling code -->
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="honorific" mode="titlepage.mode">
+<xsl:template match="d:honorific" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="isbn" mode="titlepage.mode">
+<xsl:template match="d:isbn" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="issn" mode="titlepage.mode">
+<xsl:template match="d:issn" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="biblioid" mode="titlepage.mode">
+<xsl:template match="d:biblioid" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="itermset" mode="titlepage.mode">
-  <xsl:apply-templates select="indexterm"/>
+<xsl:template match="d:itermset" mode="titlepage.mode">
+  <xsl:apply-templates select="d:indexterm"/>
 </xsl:template>
 
-<xsl:template match="invpartnumber" mode="titlepage.mode">
+<xsl:template match="d:invpartnumber" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="issuenum" mode="titlepage.mode">
+<xsl:template match="d:issuenum" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="jobtitle" mode="titlepage.mode">
+<xsl:template match="d:jobtitle" mode="titlepage.mode">
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="keywordset" mode="titlepage.mode">
+<xsl:template match="d:keywordset" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="titlepage.mode">
+<xsl:template match="d:legalnotice" mode="titlepage.mode">
 
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <fo:block id="{$id}">
-    <xsl:if test="title"> <!-- FIXME: add param for using default title? -->
+    <xsl:if test="d:title"> <!-- FIXME: add param for using default title? -->
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="legalnotice/title" mode="titlepage.mode">
+<xsl:template match="d:legalnotice/d:title" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="lineage" mode="titlepage.mode">
+<xsl:template match="d:lineage" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="modespec" mode="titlepage.mode">
+<xsl:template match="d:modespec" mode="titlepage.mode">
   <!-- discard -->
 </xsl:template>
 
-<xsl:template match="orgdiv" mode="titlepage.mode">
-  <xsl:if test="preceding-sibling::*[1][self::orgname]">
+<xsl:template match="d:orgdiv" mode="titlepage.mode">
+  <xsl:if test="preceding-sibling::*[1][self::d:orgname]">
     <xsl:text> </xsl:text>
   </xsl:if>
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="orgname" mode="titlepage.mode">
+<xsl:template match="d:orgname" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="titlepage.mode">
-  <xsl:variable name="contrib" select="string(contrib)"/>
+<xsl:template match="d:othercredit" mode="titlepage.mode">
+  <xsl:variable name="contrib" select="string(d:contrib)"/>
   <xsl:choose>
-    <xsl:when test="contrib">
-      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
+    <xsl:when test="d:contrib">
+      <xsl:if test="not(preceding-sibling::d:othercredit[string(d:contrib)=$contrib])">
         <fo:block>
-          <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+          <xsl:apply-templates mode="titlepage.mode" select="d:contrib"/>
           <xsl:text>: </xsl:text>
           <xsl:call-template name="person.name"/>
-          <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-          <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
+          <xsl:apply-templates mode="titlepage.mode" select="d:affiliation"/>
+          <xsl:apply-templates select="following-sibling::d:othercredit[string(d:contrib)=$contrib]" mode="titlepage.othercredits"/>
         </fo:block>
       </xsl:if>
     </xsl:when>
     <xsl:otherwise>
       <fo:block><xsl:call-template name="person.name"/></fo:block>
-      <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+      <xsl:apply-templates mode="titlepage.mode" select="./d:affiliation"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="titlepage.othercredits">
+<xsl:template match="d:othercredit" mode="titlepage.othercredits">
   <xsl:text>, </xsl:text>
   <xsl:call-template name="person.name"/>
 </xsl:template>
 
-<xsl:template match="othername" mode="titlepage.mode">
+<xsl:template match="d:othername" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="titlepage.mode">
+<xsl:template match="d:pagenums" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="printhistory" mode="titlepage.mode">
+<xsl:template match="d:printhistory" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="productname" mode="titlepage.mode">
+<xsl:template match="d:productname" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="productnumber" mode="titlepage.mode">
+<xsl:template match="d:productnumber" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="titlepage.mode">
+<xsl:template match="d:pubdate" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="publisher" mode="titlepage.mode">
+<xsl:template match="d:publisher" mode="titlepage.mode">
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="publishername" mode="titlepage.mode">
+<xsl:template match="d:publishername" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="pubsnumber" mode="titlepage.mode">
+<xsl:template match="d:pubsnumber" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="titlepage.mode">
+<xsl:template match="d:releaseinfo" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="titlepage.mode">
+<xsl:template match="d:revhistory" mode="titlepage.mode">
 
   <xsl:variable name="explicit.table.width">
     <xsl:call-template name="pi.dbfo_table-width"/>
         <fo:table-cell number-columns-spanned="3" xsl:use-attribute-sets="revhistory.table.cell.properties">
           <fo:block xsl:use-attribute-sets="revhistory.title.properties">
            <xsl:choose>
-             <xsl:when test="title|info/title">
-               <xsl:apply-templates select="title|info/title" mode="titlepage.mode"/>
+             <xsl:when test="d:title|d:info/d:title">
+               <xsl:apply-templates select="d:title|d:info/d:title" mode="titlepage.mode"/>
              </xsl:when>
              <xsl:otherwise>
                <xsl:call-template name="gentext">
          </fo:block>
         </fo:table-cell>
       </fo:table-row>
-      <xsl:apply-templates select="*[not(self::title)]" mode="titlepage.mode"/>
+      <xsl:apply-templates select="*[not(self::d:title)]" mode="titlepage.mode"/>
     </fo:table-body>
   </fo:table>
 
 </xsl:template>
 
 
-<xsl:template match="revhistory/revision" mode="titlepage.mode">
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate"   select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
+<xsl:template match="d:revhistory/d:revision" mode="titlepage.mode">
+  <xsl:variable name="revnumber" select="d:revnumber"/>
+  <xsl:variable name="revdate"   select="d:date"/>
+  <xsl:variable name="revauthor" select="d:authorinitials|d:author"/>
+  <xsl:variable name="revremark" select="d:revremark|d:revdescription"/>
   <fo:table-row>
     <fo:table-cell xsl:use-attribute-sets="revhistory.table.cell.properties">
       <fo:block>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="revision/revnumber" mode="titlepage.mode">
+<xsl:template match="d:revision/d:revnumber" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/date" mode="titlepage.mode">
+<xsl:template match="d:revision/d:date" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/authorinitials" mode="titlepage.mode">
+<xsl:template match="d:revision/d:authorinitials" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/author" mode="titlepage.mode">
+<xsl:template match="d:revision/d:author" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/revremark" mode="titlepage.mode">
+<xsl:template match="d:revision/d:revremark" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/revdescription" mode="titlepage.mode">
+<xsl:template match="d:revision/d:revdescription" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="seriesvolnums" mode="titlepage.mode">
+<xsl:template match="d:seriesvolnums" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="shortaffil" mode="titlepage.mode">
+<xsl:template match="d:shortaffil" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subjectset" mode="titlepage.mode">
+<xsl:template match="d:subjectset" mode="titlepage.mode">
   <!-- discard -->
 </xsl:template>
 
-<xsl:template match="subtitle" mode="titlepage.mode">
+<xsl:template match="d:subtitle" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="surname" mode="titlepage.mode">
+<xsl:template match="d:surname" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="titlepage.mode">
+<xsl:template match="d:title" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="titlepage.mode">
+<xsl:template match="d:titleabbrev" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="volumenum" mode="titlepage.mode">
+<xsl:template match="d:volumenum" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
 
 <!-- book recto -->
 
-<xsl:template match="bookinfo/authorgroup|book/info/authorgroup"
+<xsl:template match="d:bookinfo/d:authorgroup|d:book/d:info/d:authorgroup"
               mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:call-template name="anchor"/>
   <fo:block>
     <xsl:apply-templates mode="titlepage.mode"/>
 
-    <xsl:if test="following-sibling::subtitle
-                  |following-sibling::info/subtitle
-                  |following-sibling::bookinfo/subtitle">
+    <xsl:if test="following-sibling::d:subtitle
+                  |following-sibling::d:info/d:subtitle
+                  |following-sibling::d:bookinfo/d:subtitle">
       <xsl:text>: </xsl:text>
 
-      <xsl:apply-templates select="(following-sibling::subtitle
-                                   |following-sibling::info/subtitle
-                                   |following-sibling::bookinfo/subtitle)[1]"
+      <xsl:apply-templates select="(following-sibling::d:subtitle
+                                   |following-sibling::d:info/d:subtitle
+                                   |following-sibling::d:bookinfo/d:subtitle)[1]"
                            mode="book.verso.subtitle.mode"/>
     </xsl:if>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="book.verso.subtitle.mode">
+<xsl:template match="d:subtitle" mode="book.verso.subtitle.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
-  <xsl:if test="following-sibling::subtitle">
+  <xsl:if test="following-sibling::d:subtitle">
     <xsl:text>: </xsl:text>
-    <xsl:apply-templates select="following-sibling::subtitle[1]"
+    <xsl:apply-templates select="following-sibling::d:subtitle[1]"
                          mode="book.verso.subtitle.mode"/>
   </xsl:if>
 </xsl:template>
     </xsl:call-template>
     <xsl:text> </xsl:text>
     <xsl:call-template name="person.name.list">
-      <xsl:with-param name="person.list" select="author|corpauthor|editor"/>
+      <xsl:with-param name="person.list" select="d:author|d:corpauthor|d:editor"/>
     </xsl:call-template>
   </fo:block>
-  <xsl:apply-templates select="othercredit" mode="titlepage.mode"/>
+  <xsl:apply-templates select="d:othercredit" mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="bookinfo/author|book/info/author"
+<xsl:template match="d:bookinfo/d:author|d:book/d:info/d:author"
               mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:call-template name="person.name"/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="bookinfo/corpauthor|book/info/corpauthor"
+<xsl:template match="d:bookinfo/d:corpauthor|d:book/d:info/d:corpauthor"
               mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="bookinfo/pubdate|book/info/pubdate"
+<xsl:template match="d:bookinfo/d:pubdate|d:book/d:info/d:pubdate"
               mode="titlepage.mode" priority="2">
   <fo:block>
     <xsl:call-template name="gentext">
index 92b09ebd55b767806b959d4b0b5698d8fc35bb8a..1912172e59d7412776f8e8d88b1f5e1c1dadda93 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -15,7 +17,7 @@
 
 <!-- only set, book and part puts toc in its own page sequence -->
 
-<xsl:template match="set/toc | book/toc | part/toc">
+<xsl:template match="d:set/d:toc | d:book/d:toc | d:part/d:toc">
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
       <xsl:with-param name="node" select="parent::*"/>
           <!-- trick to switch context node to parent element -->
           <xsl:for-each select="parent::*">
             <xsl:choose>
-              <xsl:when test="self::set">
+              <xsl:when test="self::d:set">
                 <xsl:call-template name="set.toc">
                   <xsl:with-param name="toc.title.p" 
                                   select="contains($toc.params, 'title')"/>
                 </xsl:call-template>
               </xsl:when>
-              <xsl:when test="self::book">
+              <xsl:when test="self::d:book">
                 <xsl:call-template name="division.toc">
                   <xsl:with-param name="toc.title.p" 
                                   select="contains($toc.params, 'title')"/>
                 </xsl:call-template>
               </xsl:when>
-              <xsl:when test="self::part">
+              <xsl:when test="self::d:part">
                 <xsl:call-template name="division.toc">
                   <xsl:with-param name="toc.title.p" 
                                   select="contains($toc.params, 'title')"/>
@@ -80,7 +82,7 @@
   </xsl:if>
 </xsl:template>
   
-<xsl:template match="chapter/toc | appendix/toc | preface/toc | article/toc">
+<xsl:template match="d:chapter/d:toc | d:appendix/d:toc | d:preface/d:toc | d:article/d:toc">
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
       <xsl:with-param name="node" select="parent::*"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="section/toc
-                    |sect1/toc
-                    |sect2/toc
-                    |sect3/toc
-                    |sect4/toc
-                    |sect5/toc">
+<xsl:template match="d:section/d:toc
+                    |d:sect1/d:toc
+                    |d:sect2/d:toc
+                    |d:sect3/d:toc
+                    |d:sect4/d:toc
+                    |d:sect5/d:toc">
 
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="tocpart|tocchap
-                     |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
-  <xsl:apply-templates select="tocentry"/>
-  <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+<xsl:template match="d:tocpart|d:tocchap
+                     |d:toclevel1|d:toclevel2|d:toclevel3|d:toclevel4|d:toclevel5">
+  <xsl:apply-templates select="d:tocentry"/>
+  <xsl:if test="d:tocchap|d:toclevel1|d:toclevel2|d:toclevel3|d:toclevel4|d:toclevel5">
     <fo:block start-indent="{count(ancestor::*)*2}pc">
-      <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
+      <xsl:apply-templates select="d:tocchap|d:toclevel1|d:toclevel2|d:toclevel3|d:toclevel4|d:toclevel5"/>
     </fo:block>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="tocentry|lotentry|tocdiv|tocfront|tocback">
+<xsl:template match="d:tocentry|d:lotentry|d:tocdiv|d:tocfront|d:tocback">
   <fo:block end-indent="2pc"
             last-line-end-indent="-2pc">
     <xsl:if test="@linkend or @pagenum">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="toc/title | tocdiv/title">
+<xsl:template match="d:toc/d:title | d:tocdiv/d:title">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="toc/subtitle | tocdiv/subtitle">
+<xsl:template match="d:toc/d:subtitle | d:tocdiv/d:subtitle">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="toc/titleabbrev |tocdiv/titleabbrev">
+<xsl:template match="d:toc/d:titleabbrev |d:tocdiv/d:titleabbrev">
 </xsl:template>
 
 <!-- ==================================================================== -->
 
 <!-- A lot element must have content, because there is no attribute
      to select what kind of list should be generated -->
-<xsl:template match="book/lot | part/lot">
+<xsl:template match="d:book/d:lot | d:part/d:lot">
   <!-- Don't generate a page sequence unless there is content -->
   <xsl:variable name="content">
     <xsl:choose>
   </xsl:if>
 </xsl:template>
   
-<xsl:template match="chapter/lot | appendix/lot | preface/lot | article/lot">
+<xsl:template match="d:chapter/d:lot | d:appendix/d:lot | d:preface/d:lot | d:article/d:lot">
   <xsl:choose>
     <xsl:when test="* and $process.source.toc != 0">
       <fo:block>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="section/lot
-                    |sect1/lot
-                    |sect2/lot
-                    |sect3/lot
-                    |sect4/lot
-                    |sect5/lot">
+<xsl:template match="d:section/d:lot
+                    |d:sect1/d:lot
+                    |d:sect2/d:lot
+                    |d:sect3/d:lot
+                    |d:sect4/d:lot
+                    |d:sect5/d:lot">
   <xsl:choose>
     <xsl:when test="* and $process.source.toc != 0">
       <fo:block>
   </xsl:message>
 </xsl:template>
 
-<xsl:template match="lot/title">
+<xsl:template match="d:lot/d:title">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="lot/subtitle">
+<xsl:template match="d:lot/d:subtitle">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="lot/titleabbrev">
+<xsl:template match="d:lot/d:titleabbrev">
 </xsl:template>
 
 </xsl:stylesheet>
index cad71354fb5411b27877450b2d5113c786c2fd43..2ea5369242d13fa986a80cd348ba07e874032db4 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
                 xmlns:xverb="com.nwalsh.xalan.Verbatim"
                 xmlns:lxslt="http://xml.apache.org/xslt"
                 xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="sverb xverb lxslt exsl"
+                exclude-result-prefixes="sverb xverb lxslt exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -25,7 +26,7 @@
 <lxslt:component prefix="xverb"
                  functions="numberLines"/>
 
-<xsl:template match="programlisting|screen|synopsis">
+<xsl:template match="d:programlisting|d:screen|d:synopsis">
   <xsl:param name="suppress-numbers" select="'0'"/>
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:choose>
     <!-- Need a block-container for these features -->
     <xsl:when test="@width != '' or
-                    (self::programlisting and
+                    (self::d:programlisting and
                     starts-with($writing.mode, 'rl'))">
       <fo:block-container start-indent="0pt" end-indent="0pt">
         <xsl:if test="@width != ''">
           </xsl:attribute>
         </xsl:if>
         <!-- All known program code is left-to-right -->
-        <xsl:if test="self::programlisting and
+        <xsl:if test="self::d:programlisting and
                       starts-with($writing.mode, 'rl')">
           <xsl:attribute name="writing-mode">lr-tb</xsl:attribute>
         </xsl:if>
 
 </xsl:template>
 
-<xsl:template match="literallayout">
+<xsl:template match="d:literallayout">
   <xsl:param name="suppress-numbers" select="'0'"/>
 
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="address">
+<xsl:template match="d:address">
   <xsl:param name="suppress-numbers" select="'0'"/>
 
   <xsl:variable name="content">
       <xsl:when test="$pi.context/@continuation='continues'">
         <xsl:variable name="lastLine">
           <xsl:choose>
-            <xsl:when test="$pi.context/self::programlisting">
+            <xsl:when test="$pi.context/self::d:programlisting">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::programlisting[@linenumbering='numbered']"/>
+                     select="preceding::d:programlisting[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::screen">
+            <xsl:when test="$pi.context/self::d:screen">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::screen[@linenumbering='numbered']"/>
+                     select="preceding::d:screen[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::literallayout">
+            <xsl:when test="$pi.context/self::d:literallayout">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::literallayout[@linenumbering='numbered']"/>
+                     select="preceding::d:literallayout[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::address">
+            <xsl:when test="$pi.context/self::d:address">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::address[@linenumbering='numbered']"/>
+                     select="preceding::d:address[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::synopsis">
+            <xsl:when test="$pi.context/self::d:synopsis">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::synopsis[@linenumbering='numbered']"/>
+                     select="preceding::d:synopsis[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
index c6f7ab789a114fd490ff464ee1ef5ede5de318a4..960f45aa1b0e4c7ef6b4a54d3b71ea43fa707ed7 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:rx="http://www.renderx.com/XSL/Extensions"
                 version='1.0'>
 
 <xsl:template name="xep-document-information">
   <rx:meta-info>
     <xsl:variable name="authors" 
-                  select="(//author|//editor|//corpauthor|//authorgroup)[1]"/>
+                  select="(//d:author|//d:editor|//d:corpauthor|//d:authorgroup)[1]"/>
     <xsl:if test="$authors">
       <xsl:variable name="author">
         <xsl:choose>
-          <xsl:when test="$authors[self::authorgroup]">
+          <xsl:when test="$authors[self::d:authorgroup]">
             <xsl:call-template name="person.name.list">
               <xsl:with-param name="person.list" 
-                        select="$authors/*[self::author|self::corpauthor|
-                               self::othercredit|self::editor]"/>
+                        select="$authors/*[self::d:author|self::d:corpauthor|
+                               self::d:othercredit|self::d:editor]"/>
             </xsl:call-template>
           </xsl:when>
-          <xsl:when test="$authors[self::corpauthor]">
+          <xsl:when test="$authors[self::d:corpauthor]">
             <xsl:value-of select="$authors"/>
           </xsl:when>
-          <xsl:when test="$authors[orgname]">
-            <xsl:value-of select="$authors/orgname"/>
+          <xsl:when test="$authors[d:orgname]">
+            <xsl:value-of select="$authors/d:orgname"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:call-template name="person.name">
       </xsl:attribute>
     </xsl:element>
 
-    <xsl:if test="//keyword">
+    <xsl:if test="//d:keyword">
       <xsl:element name="rx:meta-field">
         <xsl:attribute name="name">keywords</xsl:attribute>
         <xsl:attribute name="value">
-          <xsl:for-each select="//keyword">
+          <xsl:for-each select="//d:keyword">
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:if test="position() != last()">
               <xsl:text>, </xsl:text>
       </xsl:element>
     </xsl:if>
 
-    <xsl:if test="//subjectterm">
+    <xsl:if test="//d:subjectterm">
       <xsl:element name="rx:meta-field">
         <xsl:attribute name="name">subject</xsl:attribute>
         <xsl:attribute name="value">
-          <xsl:for-each select="//subjectterm">
+          <xsl:for-each select="//d:subjectterm">
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:if test="position() != last()">
               <xsl:text>, </xsl:text>
   <xsl:apply-templates select="*" mode="xep.outline"/>
 </xsl:template>
 
-<xsl:template match="set|book|part|reference|preface|chapter|appendix|article
-                     |glossary|bibliography|index|setindex|topic
-                     |refentry|refsynopsisdiv
-                     |refsect1|refsect2|refsect3|refsection
-                     |sect1|sect2|sect3|sect4|sect5|section"
+<xsl:template match="d:set|d:book|d:part|d:reference|d:preface|d:chapter|d:appendix|d:article
+                     |d:glossary|d:bibliography|d:index|d:setindex|d:topic
+                     |d:refentry|d:refsynopsisdiv
+                     |d:refsect1|d:refsect2|d:refsect3|d:refsection
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section"
               mode="xep.outline">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   <!-- Put the root element bookmark at the same level as its children -->
   <!-- If the object is a set or book, generate a bookmark for the toc -->
   <xsl:choose>
-    <xsl:when test="self::index and $generate.index = 0"/>     
+    <xsl:when test="self::d:index and $generate.index = 0"/>
     <xsl:when test="parent::*">
       <rx:bookmark internal-destination="{$id}">
         <xsl:attribute name="starting-state">
         </xsl:call-template>
       </xsl:variable>
       <xsl:if test="contains($toc.params, 'toc')
-                    and set|book|part|reference|section|sect1|refentry
-                        |article|topic|bibliography|glossary|chapter
-                        |appendix">
+                    and d:set|d:book|d:part|d:reference|d:section|d:sect1|d:refentry
+                        |d:article|d:topic|d:bibliography|d:glossary|d:chapter
+                        |d:appendix">
         <rx:bookmark internal-destination="toc...{$id}">
           <rx:bookmark-label>
             <xsl:call-template name="gentext">
index ba6e70477c690633d2ab82fc15e33badc01cd014..ad77fecc733fe07b8e2411b8e8fc6a4c04b35d69 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="exsl xlink"
+                exclude-result-prefixes="exsl xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -20,7 +21,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="anchor">
+<xsl:template match="d:anchor">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
@@ -38,7 +39,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="xref" name="xref">
+<xsl:template match="d:xref" name="xref">
   <xsl:param name="xhref" select="@xlink:href"/>
   <!-- is the @xlink:href a local idref link? -->
   <xsl:param name="xlink.idref">
@@ -90,7 +91,7 @@
         </xsl:when>
   
         <xsl:when test="$target">
-          <xsl:if test="not(parent::citation)">
+          <xsl:if test="not(parent::d:citation)">
             <xsl:apply-templates select="$target" mode="xref-to-prefix">
               <xsl:with-param name="referrer" select="."/>
               <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
             <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
           </xsl:apply-templates>
   
-          <xsl:if test="not(parent::citation)">
+          <xsl:if test="not(parent::d:citation)">
             <xsl:apply-templates select="$target" mode="xref-to-suffix">
               <xsl:with-param name="referrer" select="."/>
               <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
 
 <!-- Handled largely like an xref -->
 <!-- To be done: add support for begin, end, and units attributes -->
-<xsl:template match="biblioref" name="biblioref">
+<xsl:template match="d:biblioref" name="biblioref">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="target" select="$targets[1]"/>
   <xsl:variable name="referrer" select="."/>
     </xsl:when>
 
     <xsl:otherwise>
-      <xsl:if test="not(parent::citation)">
+      <xsl:if test="not(parent::d:citation)">
         <xsl:apply-templates select="$target" mode="xref-to-prefix">
           <xsl:with-param name="referrer" select="."/>
           <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
         </xsl:apply-templates>
       </fo:basic-link>
 
-      <xsl:if test="not(parent::citation)">
+      <xsl:if test="not(parent::d:citation)">
         <xsl:apply-templates select="$target" mode="xref-to-suffix">
           <xsl:with-param name="referrer" select="."/>
           <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="title" mode="xref-to">
+<xsl:template match="d:title" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="abstract|article|authorblurb|bibliodiv|bibliomset
-                     |biblioset|blockquote|calloutlist|caution|colophon
-                     |constraintdef|formalpara|glossdiv|important|indexdiv
-                     |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
-                     |msgrel|msgset|msgsub|note|orderedlist|partintro
-                     |productionset|qandadiv|refsynopsisdiv|screenshot|segmentedlist
-                     |set|setindex|sidebar|tip|toc|variablelist|warning"
+<xsl:template match="d:abstract|d:article|d:authorblurb|d:bibliodiv|d:bibliomset
+                     |d:biblioset|d:blockquote|d:calloutlist|d:caution|d:colophon
+                     |d:constraintdef|d:formalpara|d:glossdiv|d:important|d:indexdiv
+                     |d:itemizedlist|d:legalnotice|d:lot|d:msg|d:msgexplan|d:msgmain
+                     |d:msgrel|d:msgset|d:msgsub|d:note|d:orderedlist|d:partintro
+                     |d:productionset|d:qandadiv|d:refsynopsisdiv|d:screenshot|d:segmentedlist
+                     |d:set|d:setindex|d:sidebar|d:tip|d:toc|d:variablelist|d:warning"
               mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
+<xsl:template match="d:author|d:editor|d:othercredit|d:personname" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:call-template name="person.name"/>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="xref-to">
+<xsl:template match="d:authorgroup" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:call-template name="person.name.list"/>
 </xsl:template>
 
-<xsl:template match="figure|example|table|equation" mode="xref-to">
+<xsl:template match="d:figure|d:example|d:table|d:equation" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="procedure" mode="xref-to">
+<xsl:template match="d:procedure" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="task" mode="xref-to">
+<xsl:template match="d:task" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis" mode="xref-to">
+<xsl:template match="d:cmdsynopsis" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+  <xsl:apply-templates select="(.//d:command)[1]" mode="xref"/>
 </xsl:template>
 
-<xsl:template match="funcsynopsis" mode="xref-to">
+<xsl:template match="d:funcsynopsis" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+  <xsl:apply-templates select="(.//d:function)[1]" mode="xref"/>
 </xsl:template>
 
-<xsl:template match="dedication|acknowledgements|preface|chapter|appendix" mode="xref-to">
+<xsl:template match="d:dedication|d:acknowledgements|d:preface|d:chapter|d:appendix" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="bibliography" mode="xref-to">
+<xsl:template match="d:bibliography" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-to-prefix">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:text>[</xsl:text>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-to-suffix">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:text>]</xsl:text>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
       <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
-      <xsl:variable name="entry" select="$bib/bibliography/
+      <xsl:variable name="entry" select="$bib/d:bibliography/
                                          *[@id=$id or @xml:id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
           <xsl:choose>
             <xsl:when test="$bibliography.numbered != 0">
-              <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+              <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
                           level="any" format="1"/>
             </xsl:when>
             <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
     <xsl:otherwise>
       <xsl:choose>
         <xsl:when test="$bibliography.numbered != 0">
-          <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+          <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
                       level="any" format="1"/>
         </xsl:when>
         <xsl:when test="local-name(*[1]) = 'abbrev'">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossary" mode="xref-to">
+<xsl:template match="d:glossary" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="glossentry" mode="xref-to">
+<xsl:template match="d:glossentry" mode="xref-to">
   <xsl:choose>
     <xsl:when test="$glossentry.show.acronym = 'primary'">
       <xsl:choose>
-        <xsl:when test="acronym|abbrev">
-          <xsl:apply-templates select="(acronym|abbrev)[1]"/>
+        <xsl:when test="d:acronym|d:abbrev">
+          <xsl:apply-templates select="(d:acronym|d:abbrev)[1]"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+          <xsl:apply-templates select="d:glossterm[1]" mode="xref-to"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+      <xsl:apply-templates select="d:glossterm[1]" mode="xref-to"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossterm|firstterm" mode="xref-to">
+<xsl:template match="d:glossterm|d:firstterm" mode="xref-to">
   <xsl:apply-templates mode="no.anchor.mode"/>
 </xsl:template>
 
-<xsl:template match="index" mode="xref-to">
+<xsl:template match="d:index" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="listitem" mode="xref-to">
+<xsl:template match="d:listitem" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="section|simplesect
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3|refsection" mode="xref-to">
+<xsl:template match="d:section|d:simplesect
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
+                     |d:refsect1|d:refsect2|d:refsect3|d:refsection" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <!-- What about "in Chapter X"? -->
 </xsl:template>
 
-<xsl:template match="topic" mode="xref-to">
+<xsl:template match="d:topic" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="bridgehead" mode="xref-to">
+<xsl:template match="d:bridgehead" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <!-- What about "in Chapter X"? -->
 </xsl:template>
 
-<xsl:template match="qandaset" mode="xref-to">
+<xsl:template match="d:qandaset" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="xref-to">
+<xsl:template match="d:qandadiv" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="xref-to">
+<xsl:template match="d:qandaentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="question[1]" mode="xref-to">
+  <xsl:apply-templates select="d:question[1]" mode="xref-to">
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="question|answer" mode="xref-to">
+<xsl:template match="d:question|d:answer" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
   <xsl:choose>
-    <xsl:when test="string-length(label) != 0">
+    <xsl:when test="string-length(d:label) != 0">
       <xsl:apply-templates select="." mode="label.markup"/>
     </xsl:when>
     <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="part|reference" mode="xref-to">
+<xsl:template match="d:part|d:reference" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="refentry" mode="xref-to">
+<xsl:template match="d:refentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
   <xsl:choose>
-    <xsl:when test="refmeta/refentrytitle">
-      <xsl:apply-templates select="refmeta/refentrytitle"/>
+    <xsl:when test="d:refmeta/d:refentrytitle">
+      <xsl:apply-templates select="d:refmeta/d:refentrytitle"/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates select="refnamediv/refname[1]"/>
+      <xsl:apply-templates select="d:refnamediv/d:refname[1]"/>
     </xsl:otherwise>
   </xsl:choose>
-  <xsl:apply-templates select="refmeta/manvolnum"/>
+  <xsl:apply-templates select="d:refmeta/d:manvolnum"/>
 </xsl:template>
 
-<xsl:template match="refnamediv" mode="xref-to">
+<xsl:template match="d:refnamediv" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="refname[1]" mode="xref-to">
+  <xsl:apply-templates select="d:refname[1]" mode="xref-to">
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="refname" mode="xref-to">
+<xsl:template match="d:refname" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="step" mode="xref-to">
+<xsl:template match="d:step" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:apply-templates select="." mode="number"/>
 </xsl:template>
 
-<xsl:template match="varlistentry" mode="xref-to">
+<xsl:template match="d:varlistentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="term[1]" mode="xref-to">
+  <xsl:apply-templates select="d:term[1]" mode="xref-to">
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="varlistentry/term" mode="xref-to">
+<xsl:template match="d:varlistentry/d:term" mode="xref-to">
   <xsl:param name="verbose" select="1"/>
   <!-- avoids the comma that will be generated if there are several terms -->
   <!-- Use no.anchor.mode to turn off nested xrefs and indexterms
   <xsl:apply-templates mode="no.anchor.mode"/>
 </xsl:template>
 
-<xsl:template match="co" mode="xref-to">
+<xsl:template match="d:co" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:apply-templates select="." mode="callout-bug"/>
 </xsl:template>
 
-<xsl:template match="area|areaset" mode="xref-to">
+<xsl:template match="d:area|d:areaset" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="book" mode="xref-to">
+<xsl:template match="d:book" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 <!-- These are elements for which no link text exists, so an xref to one
      uses the xrefstyle attribute if specified, or if not it falls back
      to the container element's link text -->
-<xsl:template match="para|phrase|simpara|anchor|quote" mode="xref-to">
+<xsl:template match="d:para|d:phrase|d:simpara|d:anchor|d:quote" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose"/>
 
-  <xsl:variable name="context" select="(ancestor::simplesect
-                                       |ancestor::section
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::topic
-                                       |ancestor::refsection
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::partintro
-                                       |ancestor::dedication
-                                       |ancestor::acknowledgements
-                                       |ancestor::colophon
-                                       |ancestor::bibliography
-                                       |ancestor::index
-                                       |ancestor::glossary
-                                       |ancestor::glossentry
-                                       |ancestor::listitem
-                                       |ancestor::varlistentry)[last()]"/>
+  <xsl:variable name="context" select="(ancestor::d:simplesect
+                                       |ancestor::d:section
+                                       |ancestor::d:sect1
+                                       |ancestor::d:sect2
+                                       |ancestor::d:sect3
+                                       |ancestor::d:sect4
+                                       |ancestor::d:sect5
+                                       |ancestor::d:topic
+                                       |ancestor::d:refsection
+                                       |ancestor::d:refsect1
+                                       |ancestor::d:refsect2
+                                       |ancestor::d:refsect3
+                                       |ancestor::d:chapter
+                                       |ancestor::d:appendix
+                                       |ancestor::d:preface
+                                       |ancestor::d:partintro
+                                       |ancestor::d:dedication
+                                       |ancestor::d:acknowledgements
+                                       |ancestor::d:colophon
+                                       |ancestor::d:bibliography
+                                       |ancestor::d:index
+                                       |ancestor::d:glossary
+                                       |ancestor::d:glossentry
+                                       |ancestor::d:listitem
+                                       |ancestor::d:varlistentry)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="$xrefstyle != ''">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="xref-to">
-  <xsl:value-of select="primary"/>
+<xsl:template match="d:indexterm" mode="xref-to">
+  <xsl:value-of select="d:primary"/>
 </xsl:template>
 
-<xsl:template match="primary|secondary|tertiary" mode="xref-to">
+<xsl:template match="d:primary|d:secondary|d:tertiary" mode="xref-to">
   <xsl:value-of select="."/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="link" name="link">
+<xsl:template match="d:link" name="link">
   <xsl:param name="referrer" select="."/>
   <xsl:param name="linkend" select="@linkend"/>
   <xsl:param name="targets" select="key('id',$linkend)"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="ulink" name="ulink">
+<xsl:template match="d:ulink" name="ulink">
   <xsl:param name="url" select="@url"/>
 
   <xsl:variable name ="ulink.url">
     <!-- * and the value of its content is not a URL that is the same as -->
     <!-- * URL it links to, and if ulink.show is non-zero. -->
     <xsl:choose>
-      <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote) and not(ancestor::*[@floatstyle='before'])">
+      <xsl:when test="$ulink.footnotes != 0 and not(ancestor::d:footnote) and not(ancestor::*[@floatstyle='before'])">
         <!-- * ulink.show and ulink.footnote are both non-zero; that -->
         <!-- * means we display the URL as a footnote (instead of inline) -->
         <fo:footnote>
       <!-- *   an xlink:type attribute whose value is 'simple' -->
       <!-- FIXME: list in @from is probably not complete -->
       <xsl:number level="any" 
-                  from="chapter|appendix|preface|article|refentry|bibliography[not(parent::article)]"
-                  count="footnote[not(@label)][not(ancestor::tgroup)]
-                  |ulink[node()][@url != .][not(ancestor::footnote)]
+                  from="d:chapter|d:appendix|d:preface|d:article|d:refentry|d:bibliography[not(parent::d:article)]"
+                  count="d:footnote[not(@label)][not(ancestor::d:tgroup)]
+                  |d:ulink[node()][@url != .][not(ancestor::d:footnote)]
                   |*[node()][@xlink:href][not(@xlink:href = .)][not(starts-with(@xlink:href,'#'))]
                     [not(contains(@xlink:href,'#') and @xlink:role = $xolink.role)]
                     [not(@xlink:type) or @xlink:type='simple']
-                    [not(ancestor::footnote)]"
+                    [not(ancestor::d:footnote)]"
                   format="1"/>
     </xsl:variable>
     <xsl:choose>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="olink" name="olink">
+<xsl:template match="d:olink" name="olink">
   <!-- olink content may be passed in from xlink olink -->
   <xsl:param name="content" select="NOTANELEMENT"/>
 
 </xsl:template>
 
 <!-- This prevents error message when processing olinks with xrefstyle -->
-<xsl:template match="olink" mode="object.xref.template"/>
+<xsl:template match="d:olink" mode="object.xref.template"/>
 
 
 <xsl:template name="olink.as.linkend">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="title" mode="xref">
+<xsl:template match="d:title" mode="xref">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="command" mode="xref">
+<xsl:template match="d:command" mode="xref">
   <xsl:call-template name="inline.boldseq"/>
 </xsl:template>
 
-<xsl:template match="function" mode="xref">
+<xsl:template match="d:function" mode="xref">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="chapter|appendix" mode="insert.title.markup">
+<xsl:template match="d:chapter|d:appendix" mode="insert.title.markup">
   <xsl:param name="purpose"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="title"/>
   <xsl:copy-of select="$direction"/>
 </xsl:template>
 
-<xsl:template match="olink" mode="pagenumber.markup">
+<xsl:template match="d:olink" mode="pagenumber.markup">
   <!-- Local olinks can use page-citation -->
   <xsl:variable name="targetdoc.att" select="@targetdoc"/>
   <xsl:variable name="targetptr.att" select="@targetptr"/>
index 78a44eb197c8a71283ccfff87679f127a0632a4b..2dde010e1d0f94b3142b6b23c15fe07d49c7f73a 100644 (file)
-<?xml version='1.0'?>\r
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-\r
-               xmlns:s6hl="http://net.sf.xslthl/ConnectorSaxon6" \r
-               xmlns:sbhl="http://net.sf.xslthl/ConnectorSaxonB" \r
-               xmlns:xhl="http://net.sf.xslthl/ConnectorXalan"\r
-               xmlns:saxon6="http://icl.com/saxon" \r
-               xmlns:saxonb="http://saxon.sf.net/" \r
-               xmlns:xalan="http://xml.apache.org/xalan"\r
-               \r
-               xmlns:exsl="http://exslt.org/common"\r
-               xmlns:xslthl="http://xslthl.sf.net"\r
-               exclude-result-prefixes="exsl xslthl s6hl sbhl xhl"\r
-               version='1.0'>\r
-\r
-<!-- ********************************************************************\r
-\r
-     This file is part of the XSL DocBook Stylesheet distribution.\r
-     See ../README or http://cdn.docbook.org/release/xsl/current/ for\r
-     and other information.\r
-\r
-     ******************************************************************** -->\r
-\r
-<!-- this construction is needed to have the saxon and xalan connectors working alongside each other -->\r
-<xalan:component prefix="xhl" functions="highlight"> \r
-  <xalan:script lang="javaclass" src="xalan://net.sf.xslthl.ConnectorXalan" /> \r
-</xalan:component> \r
-\r
-<!-- for saxon 6 -->\r
-<saxon6:script implements-prefix="s6hl" language="java" src="java:net.sf.xslthl.ConnectorSaxon6" />\r
-\r
-<!-- for saxon 8.5 and later -->\r
-<saxonb:script implements-prefix="sbhl" language="java" src="java:net.sf.xslthl.ConnectorSaxonB" />\r
-\r
-\r
-<!-- You can override this template to do more complex mapping of\r
-     language attribute to highlighter language ID (see xslthl-config.xml) -->\r
-<xsl:template name="language.to.xslthl">\r
-  <xsl:param name="context"/>\r
-\r
-  <xsl:choose>\r
-    <xsl:when test="$context/@language != ''">\r
-      <xsl:value-of select="$context/@language"/>\r
-    </xsl:when>\r
-    <xsl:when test="$highlight.default.language != ''">\r
-      <xsl:value-of select="$highlight.default.language"/>\r
-    </xsl:when>\r
-  </xsl:choose>\r
-</xsl:template>\r
-\r
-<xsl:template name="apply-highlighting">\r
-  <xsl:choose>\r
-    <!-- Do we want syntax highlighting -->\r
-    <xsl:when test="$highlight.source != 0">\r
-      <xsl:variable name="language">\r
-       <xsl:call-template name="language.to.xslthl">\r
-         <xsl:with-param name="context" select="."/>\r
-       </xsl:call-template>\r
-      </xsl:variable>\r
-      <xsl:choose>\r
-       <xsl:when test="$language != ''">\r
-         <xsl:variable name="content">\r
-           <xsl:apply-templates/>\r
-         </xsl:variable>\r
-         <xsl:choose>\r
-           <xsl:when test="function-available('s6hl:highlight')">\r
-             <xsl:apply-templates select="s6hl:highlight($language, exsl:node-set($content), $highlight.xslthl.config)"\r
-                                  mode="xslthl"/>\r
-           </xsl:when>\r
-           <xsl:when test="function-available('sbhl:highlight')">\r
-             <xsl:apply-templates select="sbhl:highlight($language, exsl:node-set($content), $highlight.xslthl.config)"\r
-                                  mode="xslthl"/>\r
-           </xsl:when>\r
-           <xsl:when test="function-available('xhl:highlight')">\r
-             <xsl:apply-templates select="xhl:highlight($language, exsl:node-set($content), $highlight.xslthl.config)"\r
-                                  mode="xslthl"/>\r
-           </xsl:when>\r
-           <xsl:otherwise>\r
-             <xsl:copy-of select="$content"/>\r
-           </xsl:otherwise>\r
-         </xsl:choose>\r
-       </xsl:when>\r
-       <xsl:otherwise>\r
-         <xsl:apply-templates/>\r
-       </xsl:otherwise>\r
-      </xsl:choose>\r
-    </xsl:when>\r
-    <!-- No syntax highlighting -->\r
-    <xsl:otherwise>\r
-      <xsl:apply-templates/>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-</xsl:template>\r
-\r
-<!-- A fallback when the specific style isn't recognized -->\r
-<xsl:template match="xslthl:*" mode="xslthl">\r
-  <xsl:message>\r
-    <xsl:text>unprocessed xslthl style: </xsl:text>\r
-    <xsl:value-of select="local-name(.)" />\r
-  </xsl:message>\r
-  <xsl:apply-templates mode="xslthl"/>\r
-</xsl:template>\r
-\r
-<!-- Copy over already produced markup (FO/HTML) -->\r
-<xsl:template match="node()" mode="xslthl" priority="-1">\r
-  <xsl:copy>\r
-    <xsl:apply-templates select="node()" mode="xslthl"/>\r
-  </xsl:copy>\r
-</xsl:template>\r
-\r
-<xsl:template match="*" mode="xslthl">\r
-  <xsl:copy>\r
-    <xsl:copy-of select="@*"/>\r
-    <xsl:apply-templates select="node()" mode="xslthl"/>\r
-  </xsl:copy>\r
-</xsl:template>\r
-\r
-</xsl:stylesheet>\r
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:s6hl="http://net.sf.xslthl/ConnectorSaxon6" 
+               xmlns:sbhl="http://net.sf.xslthl/ConnectorSaxonB" 
+               xmlns:xhl="http://net.sf.xslthl/ConnectorXalan"
+               xmlns:saxon6="http://icl.com/saxon" 
+               xmlns:saxonb="http://saxon.sf.net/" 
+               xmlns:xalan="http://xml.apache.org/xalan"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns:xslthl="http://xslthl.sf.net"
+               exclude-result-prefixes="exsl xslthl s6hl sbhl xhl d"
+               version='1.0'>
+
+<!-- ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://cdn.docbook.org/release/xsl/current/ for
+     and other information.
+
+     ******************************************************************** -->
+
+<!-- this construction is needed to have the saxon and xalan connectors working alongside each other -->
+<xalan:component prefix="xhl" functions="highlight"> 
+  <xalan:script lang="javaclass" src="xalan://net.sf.xslthl.ConnectorXalan" /> 
+</xalan:component> 
+
+<!-- for saxon 6 -->
+<saxon6:script implements-prefix="s6hl" language="java" src="java:net.sf.xslthl.ConnectorSaxon6" />
+
+<!-- for saxon 8.5 and later -->
+<saxonb:script implements-prefix="sbhl" language="java" src="java:net.sf.xslthl.ConnectorSaxonB" />
+
+
+<!-- You can override this template to do more complex mapping of
+     language attribute to highlighter language ID (see xslthl-config.xml) -->
+<xsl:template name="language.to.xslthl">
+  <xsl:param name="context"/>
+
+  <xsl:choose>
+    <xsl:when test="$context/@language != ''">
+      <xsl:value-of select="$context/@language"/>
+    </xsl:when>
+    <xsl:when test="$highlight.default.language != ''">
+      <xsl:value-of select="$highlight.default.language"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="apply-highlighting">
+  <xsl:choose>
+    <!-- Do we want syntax highlighting -->
+    <xsl:when test="$highlight.source != 0">
+      <xsl:variable name="language">
+       <xsl:call-template name="language.to.xslthl">
+         <xsl:with-param name="context" select="."/>
+       </xsl:call-template>
+      </xsl:variable>
+      <xsl:choose>
+       <xsl:when test="$language != ''">
+         <xsl:variable name="content">
+           <xsl:apply-templates/>
+         </xsl:variable>
+         <xsl:choose>
+           <xsl:when test="function-available('s6hl:highlight')">
+             <xsl:apply-templates select="s6hl:highlight($language, exsl:node-set($content), $highlight.xslthl.config)"
+                                  mode="xslthl"/>
+           </xsl:when>
+           <xsl:when test="function-available('sbhl:highlight')">
+             <xsl:apply-templates select="sbhl:highlight($language, exsl:node-set($content), $highlight.xslthl.config)"
+                                  mode="xslthl"/>
+           </xsl:when>
+           <xsl:when test="function-available('xhl:highlight')">
+             <xsl:apply-templates select="xhl:highlight($language, exsl:node-set($content), $highlight.xslthl.config)"
+                                  mode="xslthl"/>
+           </xsl:when>
+           <xsl:otherwise>
+             <xsl:copy-of select="$content"/>
+           </xsl:otherwise>
+         </xsl:choose>
+       </xsl:when>
+       <xsl:otherwise>
+         <xsl:apply-templates/>
+       </xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+    <!-- No syntax highlighting -->
+    <xsl:otherwise>
+      <xsl:apply-templates/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- A fallback when the specific style isn't recognized -->
+<xsl:template match="xslthl:*" mode="xslthl">
+  <xsl:message>
+    <xsl:text>unprocessed xslthl style: </xsl:text>
+    <xsl:value-of select="local-name(.)" />
+  </xsl:message>
+  <xsl:apply-templates mode="xslthl"/>
+</xsl:template>
+
+<!-- Copy over already produced markup (FO/HTML) -->
+<xsl:template match="node()" mode="xslthl" priority="-1">
+  <xsl:copy>
+    <xsl:apply-templates select="node()" mode="xslthl"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*" mode="xslthl">
+  <xsl:copy>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates select="node()" mode="xslthl"/>
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
index 7738a642dd77de6a70f3d60317e5dc49f11d1bb4..a4ff11e065b8b538d3b5db8c64973becef7bb463 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -15,7 +17,7 @@
   <xsl:text>25</xsl:text>
 </xsl:template>
 
-<xsl:template match="note|important|warning|caution|tip">
+<xsl:template match="d:note|d:important|d:warning|d:caution|d:tip">
   <xsl:choose>
     <xsl:when test="$admon.graphics != 0">
       <xsl:call-template name="graphical.admonition"/>
@@ -72,9 +74,9 @@
       <xsl:if test="$div.element != 'section'">
         <xsl:attribute name="summary">
           <xsl:value-of select="$admon.type"/>
-          <xsl:if test="title|info/title">
+          <xsl:if test="d:title|d:info/d:title">
             <xsl:text>: </xsl:text>
-            <xsl:value-of select="(title|info/title)[1]"/>
+            <xsl:value-of select="(d:title|d:info/d:title)[1]"/>
           </xsl:if>
         </xsl:attribute>
       </xsl:if>
@@ -91,7 +93,7 @@
         </td>
         <th align="{$direction.align.start}">
           <xsl:call-template name="anchor"/>
-          <xsl:if test="$admon.textlabel != 0 or title or info/title">
+          <xsl:if test="$admon.textlabel != 0 or d:title or d:info/d:title">
             <xsl:apply-templates select="." mode="object.title.markup"/>
           </xsl:if>
         </th>
       </xsl:attribute>
     </xsl:if>
 
-    <xsl:if test="$admon.textlabel != 0 or title or info/title">
+    <xsl:if test="$admon.textlabel != 0 or d:title or d:info/d:title">
       <h3 class="title">
         <xsl:call-template name="anchor"/>
         <xsl:apply-templates select="." mode="object.title.markup"/>
   </div>
 </xsl:template>
 
-<xsl:template match="note/title"></xsl:template>
-<xsl:template match="important/title"></xsl:template>
-<xsl:template match="warning/title"></xsl:template>
-<xsl:template match="caution/title"></xsl:template>
-<xsl:template match="tip/title"></xsl:template>
+<xsl:template match="d:note/d:title"></xsl:template>
+<xsl:template match="d:important/d:title"></xsl:template>
+<xsl:template match="d:warning/d:title"></xsl:template>
+<xsl:template match="d:caution/d:title"></xsl:template>
+<xsl:template match="d:tip/d:title"></xsl:template>
 
 </xsl:stylesheet>
index f0106320ae3161a69eaf585637ebfc6680fd4aa1..9b8d3a7da5af8219929784c22df2eda6736fde77 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <xsl:template name="add.annotation.links">
   <xsl:param name="scripts" select="normalize-space($annotation.js)"/>
@@ -17,7 +19,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="annotation"/>
+<xsl:template match="d:annotation"/>
 
 <xsl:template name="apply-annotations">
   <xsl:if test="$annotation.support != 0">
@@ -25,7 +27,7 @@
   <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
 
   <xsl:variable name="aids">
-    <xsl:for-each select="//annotation">
+    <xsl:for-each select="//d:annotation">
       <xsl:if test="@annotates=$id
                     or starts-with(@annotates, concat($id, ' '))
                     or contains(@annotates, concat(' ', $id, ' '))
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="annotation" mode="annotation-inline">
+<xsl:template match="d:annotation" mode="annotation-inline">
   <xsl:variable name="title">
     <xsl:choose>
-      <xsl:when test="title">
-        <xsl:value-of select="title"/>
+      <xsl:when test="d:title">
+        <xsl:value-of select="d:title"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:text>[Annotation #</xsl:text>
-        <xsl:number count="annotation" level="any" format="1"/>
+        <xsl:number count="d:annotation" level="any" format="1"/>
         <xsl:text>]</xsl:text>
       </xsl:otherwise>
     </xsl:choose>
   </a>
 </xsl:template>
 
-<xsl:template match="annotation" mode="annotation-popup">
+<xsl:template match="d:annotation" mode="annotation-popup">
   <div class="annotation-nocss">
     <p>
       <a name="annot-{generate-id(.)}"/>
       <xsl:text>Annotation #</xsl:text>
-      <xsl:number count="annotation" level="any" format="1"/>
+      <xsl:number count="d:annotation" level="any" format="1"/>
       <xsl:text>:</xsl:text>
     </p>
   </div>
 <xsl:template name="annotation-title">
   <div class="annotation-title">
     <xsl:choose>
-      <xsl:when test="title">
-        <xsl:apply-templates select="title/node()"/>
+      <xsl:when test="d:title">
+        <xsl:apply-templates select="d:title/node()"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:text>Annotation</xsl:text>
index 2fee8d89582ccdfda0238cbe2e136d865e362a5b..525e8ebcba420290f70507d486976442558f1cf4 100644 (file)
@@ -9,8 +9,9 @@
 
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:k="http://www.isogen.com/functions/com.isogen.saxoni18n.Saxoni18nService"
-                exclude-result-prefixes="k"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:k="http://www.isogen.com/functions/com.isogen.saxoni18n.Saxoni18nService"
+                exclude-result-prefixes="k d"
                 version="1.0">
 
 <!-- ********************************************************************
@@ -80,7 +81,7 @@
   </xsl:variable>
 
   <xsl:variable name="terms"
-                select="//indexterm[count(.|key('k-group', k:getIndexGroupKey(&lang;, &primary;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/>
+                select="//d:indexterm[count(.|key('k-group', k:getIndexGroupKey(&lang;, &primary;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/>
 
   <xsl:variable name="alphabetical"
                 select="$terms[not(starts-with(
 
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-kimber">
+<xsl:template match="d:indexterm" mode="index-div-kimber">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
index cef0ca784d4481502ed933545a09313c658ab3bf..8f989ccff547820cd848d1e1adc69a533b9112f3 100644 (file)
@@ -4,13 +4,14 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:i="urn:cz-kosek:functions:index"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:i="urn:cz-kosek:functions:index"
                 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
                 xmlns:func="http://exslt.org/functions"
                 xmlns:k="http://www.isogen.com/functions/com.isogen.saxoni18n.Saxoni18nService"
                 xmlns:exslt="http://exslt.org/common"
                 extension-element-prefixes="func exslt"
-                exclude-result-prefixes="func exslt i l k"
+                exclude-result-prefixes="func exslt i l k d"
                 version="1.0">
 
 <!-- ********************************************************************
@@ -27,7 +28,7 @@
 <xsl:include href="../common/autoidx-kosek.xsl"/>
 
 <xsl:template name="generate-kosek-index">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+  <xsl:param name="scope" select="(ancestor::d:book|/)[last()]"/>
 
   <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
   <xsl:if test="contains($vendor, 'libxslt')">
@@ -73,7 +74,7 @@
   </xsl:variable>
 
   <xsl:variable name="terms"
-                select="//indexterm[count(.|key('group-code', i:group-index(&primary;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/>
+                select="//d:indexterm[count(.|key('group-code', i:group-index(&primary;))[&scope;][1]) = 1 and not(@class = 'endofrange')]"/>
 
   <div class="index">
     <xsl:apply-templates select="$terms" mode="index-div-kosek">
@@ -85,7 +86,7 @@
   </div>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-kosek">
+<xsl:template match="d:indexterm" mode="index-div-kosek">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
index d5aee48e449076b6c94aa123ba061ab6ffca9b22..1561ef954b9aa18b5e0c333716436255546357b0 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <!-- ********************************************************************
 
index db607e1ded8ea2aeb477c482100d5c0980863c38..62fca6176c001d5a80cc08859384a07d71c9b224 100644 (file)
@@ -4,10 +4,11 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exslt="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exslt="http://exslt.org/common"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
                 extension-element-prefixes="exslt"
-                exclude-result-prefixes="exslt"
+                exclude-result-prefixes="exslt d"
                 version="1.0">
 
 <!-- ********************************************************************
 <xsl:variable name="kosek.imported" select="0"/>
 
 <xsl:key name="letter"
-         match="indexterm"
+         match="d:indexterm"
          use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
 
 <xsl:key name="primary"
-         match="indexterm"
+         match="d:indexterm"
          use="&primary;"/>
 
 <xsl:key name="secondary"
-         match="indexterm"
+         match="d:indexterm"
          use="concat(&primary;, &sep;, &secondary;)"/>
 
 <xsl:key name="tertiary"
-         match="indexterm"
+         match="d:indexterm"
          use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
 
 <!-- this key used for automatic links from see and seealso to primary -->
 <xsl:key name="primaryonly"
-         match="indexterm"
-         use="normalize-space(primary)"/>
+         match="d:indexterm"
+         use="normalize-space(d:primary)"/>
 
 <xsl:key name="endofrange"
-         match="indexterm[@class='endofrange']"
+         match="d:indexterm[@class='endofrange']"
          use="@startref"/>
 
 <xsl:key name="primary-section"
-         match="indexterm[not(secondary) and not(see)]"
+         match="d:indexterm[not(d:secondary) and not(d:see)]"
          use="concat(&primary;, &sep;, &section.id;)"/>
 
 <xsl:key name="secondary-section"
-         match="indexterm[not(tertiary) and not(see)]"
+         match="d:indexterm[not(d:tertiary) and not(d:see)]"
          use="concat(&primary;, &sep;, &secondary;, &sep;, &section.id;)"/>
 
 <xsl:key name="tertiary-section"
-         match="indexterm[not(see)]"
+         match="d:indexterm[not(d:see)]"
          use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, &section.id;)"/>
 
 <xsl:key name="see-also"
-         match="indexterm[seealso]"
-         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/>
+         match="d:indexterm[d:seealso]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:seealso)"/>
 
 <xsl:key name="see"
-         match="indexterm[see]"
-         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/>
+         match="d:indexterm[d:see]"
+         use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:see)"/>
 
 <xsl:key name="sections" match="*[@id or @xml:id]" use="@id|@xml:id"/>
 
 
 <xsl:template name="generate-index">
-  <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+  <xsl:param name="scope" select="(ancestor::d:book|/)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="$index.method = 'kosek'">
   </xsl:variable>
 
   <xsl:variable name="terms"
-                select="//indexterm
+                select="//d:indexterm
                         [count(.|key('letter',
                           translate(substring(&primary;, 1, 1),
                              &lowercase;,
 
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-div-basic">
+<xsl:template match="d:indexterm" mode="index-div-basic">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-symbol-div">
+<xsl:template match="d:indexterm" mode="index-symbol-div">
   <xsl:param name="scope" select="/"/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-primary">
+<xsl:template match="d:indexterm" mode="index-primary">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
         <xsl:value-of select="concat('ientry-', generate-id())"/>
       </xsl:attribute>
     </xsl:if>
-    <xsl:for-each select="$refs/primary">
+    <xsl:for-each select="$refs/d:primary">
       <xsl:if test="@id or @xml:id">
         <xsl:choose>
           <xsl:when test="$generate.id.attributes = 0">
         </xsl:choose>
       </xsl:if>
     </xsl:for-each>
-    <xsl:value-of select="primary"/>
+    <xsl:value-of select="d:primary"/>
     <xsl:choose>
       <xsl:when test="$index.links.to.section = 1">
         <xsl:for-each select="$refs[@zone != '' or generate-id() = generate-id(key('primary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
         </xsl:for-each>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:for-each select="$refs[not(see) 
-                              and not(secondary)][&scope;]">
+        <xsl:for-each select="$refs[not(d:see)
+                              and not(d:secondary)][&scope;]">
           <xsl:apply-templates select="." mode="reference">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="$refs[not(secondary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+    <xsl:if test="$refs[not(d:secondary)]/*[self::d:see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, d:see))[&scope;][1])]"
                            mode="index-see">
         <xsl:with-param name="position" select="position()"/>
         <xsl:with-param name="scope" select="$scope"/>
         <xsl:with-param name="role" select="$role"/>
         <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+        <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </xsl:if>
   </dt>
   <xsl:choose>
-    <xsl:when test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
+    <xsl:when test="$refs/d:secondary or $refs[not(d:secondary)]/*[self::d:seealso]">
       <dd>
         <dl>
-          <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+          <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, d:seealso))[&scope;][1])]"
                                mode="index-seealso">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
             <xsl:with-param name="role" select="$role"/>
             <xsl:with-param name="type" select="$type"/>
-            <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+            <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
           </xsl:apply-templates>
-          <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" 
+          <xsl:apply-templates select="$refs[d:secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
                                mode="index-secondary">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-secondary">
+<xsl:template match="d:indexterm" mode="index-secondary">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
   <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
   <dt>
-    <xsl:for-each select="$refs/secondary">
+    <xsl:for-each select="$refs/d:secondary">
       <xsl:if test="@id or @xml:id">
         <xsl:choose>
           <xsl:when test="$generate.id.attributes = 0">
         </xsl:choose>
       </xsl:if>
     </xsl:for-each>
-    <xsl:value-of select="secondary"/>
+    <xsl:value-of select="d:secondary"/>
     <xsl:choose>
       <xsl:when test="$index.links.to.section = 1">
         <xsl:for-each select="$refs[@zone != '' or generate-id() = generate-id(key('secondary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
         </xsl:for-each>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:for-each select="$refs[not(see) 
-                                and not(tertiary)][&scope;]">
+        <xsl:for-each select="$refs[not(d:see)
+                                and not(d:tertiary)][&scope;]">
           <xsl:apply-templates select="." mode="reference">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="$refs[not(tertiary)]/*[self::see]">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+    <xsl:if test="$refs[not(d:tertiary)]/*[self::d:see]">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, d:see))[&scope;][1])]"
                            mode="index-see">
         <xsl:with-param name="position" select="position()"/>
         <xsl:with-param name="scope" select="$scope"/>
         <xsl:with-param name="role" select="$role"/>
         <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+        <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </xsl:if>
   </dt>
   <xsl:choose>
-    <xsl:when test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
+    <xsl:when test="$refs/d:tertiary or $refs[not(d:tertiary)]/*[self::d:seealso]">
       <dd>
         <dl>
-          <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+          <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, d:seealso))[&scope;][1])]"
                                mode="index-seealso">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
             <xsl:with-param name="role" select="$role"/>
             <xsl:with-param name="type" select="$type"/>
-            <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+            <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
           </xsl:apply-templates>
-          <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]" 
+          <xsl:apply-templates select="$refs[d:tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]"
                                mode="index-tertiary">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-tertiary">
+<xsl:template match="d:indexterm" mode="index-tertiary">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
   <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
   <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
   <dt>
-    <xsl:for-each select="$refs/tertiary">
+    <xsl:for-each select="$refs/d:tertiary">
       <xsl:if test="@id or @xml:id">
         <xsl:choose>
           <xsl:when test="$generate.id.attributes = 0">
         </xsl:choose>
       </xsl:if>
     </xsl:for-each>
-    <xsl:value-of select="tertiary"/>
+    <xsl:value-of select="d:tertiary"/>
     <xsl:choose>
       <xsl:when test="$index.links.to.section = 1">
         <xsl:for-each select="$refs[@zone != '' or generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
         </xsl:for-each>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:for-each select="$refs[not(see)][&scope;]">
+        <xsl:for-each select="$refs[not(d:see)][&scope;]">
           <xsl:apply-templates select="." mode="reference">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="$refs/see">
-      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+    <xsl:if test="$refs/d:see">
+      <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:see))[&scope;][1])]"
                            mode="index-see">
         <xsl:with-param name="position" select="position()"/>
         <xsl:with-param name="scope" select="$scope"/>
         <xsl:with-param name="role" select="$role"/>
         <xsl:with-param name="type" select="$type"/>
-        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+        <xsl:sort select="translate(d:see, &lowercase;, &uppercase;)"/>
       </xsl:apply-templates>
     </xsl:if>
   </dt>
   <xsl:choose>
-    <xsl:when test="$refs/seealso">
+    <xsl:when test="$refs/d:seealso">
       <dd>
         <dl>
-          <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+          <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, d:seealso))[&scope;][1])]"
                                mode="index-seealso">
             <xsl:with-param name="position" select="position()"/>
             <xsl:with-param name="scope" select="$scope"/>
             <xsl:with-param name="role" select="$role"/>
             <xsl:with-param name="type" select="$type"/>
-            <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+            <xsl:sort select="translate(d:seealso, &lowercase;, &uppercase;)"/>
           </xsl:apply-templates>
         </dl>
       </dd>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="reference">
+<xsl:template match="d:indexterm" mode="reference">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
               <xsl:call-template name="href.target">
                 <xsl:with-param name="object" select="&section;"/>
                 <xsl:with-param name="context" 
-                                select="(//index[&scope;] | //setindex[&scope;])[1]"/>
+                                select="(//d:index[&scope;] | //d:setindex[&scope;])[1]"/>
               </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
               <xsl:call-template name="href.target">
                 <xsl:with-param name="object" select="."/>
                 <xsl:with-param name="context" 
-                                select="(//index[&scope;] | //setindex[&scope;])[1]"/>
+                                select="(//d:index[&scope;] | //d:setindex[&scope;])[1]"/>
               </xsl:call-template>
             </xsl:otherwise>
           </xsl:choose>
         <xsl:attribute name="href">
           <xsl:call-template name="href.target">
             <xsl:with-param name="object" select="$target[1]"/>
-            <xsl:with-param name="context" select="//index[&scope;][1]"/>
+            <xsl:with-param name="context" select="//d:index[&scope;][1]"/>
           </xsl:call-template>
         </xsl:attribute>
         <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
         <xsl:attribute name="href">
           <xsl:call-template name="href.target">
             <xsl:with-param name="object" select="$target[1]"/>
-            <xsl:with-param name="context" select="//index[&scope;][1]"/>
+            <xsl:with-param name="context" select="//d:index[&scope;][1]"/>
           </xsl:call-template>
         </xsl:attribute>
         <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-see">
+<xsl:template match="d:indexterm" mode="index-see">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
 
-  <xsl:variable name="see" select="normalize-space(see)"/>
+  <xsl:variable name="see" select="normalize-space(d:see)"/>
 
   <!-- can only link to primary, which should appear before comma
   in see "primary, secondary" entry -->
   <xsl:text> </xsl:text>
   <xsl:choose>
     <!-- manual links have precedence -->
-    <xsl:when test="see/@linkend or see/@xlink:href">
+    <xsl:when test="d:see/@linkend or d:see/@xlink:href">
       <xsl:call-template name="simple.xlink">
-        <xsl:with-param name="node" select="see"/>
+        <xsl:with-param name="node" select="d:see"/>
         <xsl:with-param name="content" select="$see"/>
       </xsl:call-template>
     </xsl:when>
   <xsl:text>)</xsl:text>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="index-seealso">
+<xsl:template match="d:indexterm" mode="index-seealso">
   <xsl:param name="scope" select="."/>
   <xsl:param name="role" select="''"/>
   <xsl:param name="type" select="''"/>
 
-  <xsl:for-each select="seealso">
+  <xsl:for-each select="d:seealso">
     <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
 
     <xsl:variable name="seealso" select="normalize-space(.)"/>
index 2487ff799bb21a2608276a189e2fa45fc6a61084..61fc38cb68c1224e425455b9f9826f27e7c5460e 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -30,7 +32,7 @@
   <xsl:param name="toc.title.p" select="true()"/>
   <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
 
-  <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
+  <xsl:variable name="nodes.plus" select="$nodes | d:qandaset"/>
 
   <xsl:variable name="toc.title">
     <xsl:if test="$toc.title.p">
@@ -61,7 +63,7 @@
         <xsl:call-template name="object.id"/>
       </xsl:variable>
       <xsl:variable name="toc" select="document($manual.toc, .)"/>
-      <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/>
+      <xsl:variable name="tocentry" select="$toc//d:tocentry[@linkend=$id]"/>
       <xsl:if test="$tocentry and $tocentry/*">
         <div class="toc">
           <xsl:copy-of select="$toc.title"/>
   <xsl:if test="contains($toc.params, 'figure')">
     <xsl:call-template name="list.of.titles">
       <xsl:with-param name="titles" select="'figure'"/>
-      <xsl:with-param name="nodes" select=".//figure"/>
+      <xsl:with-param name="nodes" select=".//d:figure"/>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params, 'table')">
     <xsl:call-template name="list.of.titles">
       <xsl:with-param name="titles" select="'table'"/>
-      <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
+      <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params, 'example')">
     <xsl:call-template name="list.of.titles">
       <xsl:with-param name="titles" select="'example'"/>
-      <xsl:with-param name="nodes" select=".//example"/>
+      <xsl:with-param name="nodes" select=".//d:example"/>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params, 'equation')">
     <xsl:call-template name="list.of.titles">
       <xsl:with-param name="titles" select="'equation'"/>
-      <xsl:with-param name="nodes" select=".//equation[title or info/title]"/>
+      <xsl:with-param name="nodes" select=".//d:equation[d:title or d:info/d:title]"/>
     </xsl:call-template>
   </xsl:if>
 
   <xsl:if test="contains($toc.params, 'procedure')">
     <xsl:call-template name="list.of.titles">
       <xsl:with-param name="titles" select="'procedure'"/>
-      <xsl:with-param name="nodes" select=".//procedure[title]"/>
+      <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
     </xsl:call-template>
   </xsl:if>
 </xsl:template>
   <xsl:call-template name="make.toc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
     <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="book|setindex|set|article"/>
+    <xsl:with-param name="nodes" select="d:book|d:setindex|d:set|d:article"/>
   </xsl:call-template>
 </xsl:template>
 
   <xsl:call-template name="make.toc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
     <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="part|reference
-                                         |preface|chapter|appendix
-                                         |article
-                                         |topic
-                                         |bibliography|glossary|index
-                                         |refentry
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:part|d:reference
+                                         |d:preface|d:chapter|d:appendix
+                                         |d:article
+                                         |d:topic
+                                         |d:bibliography|d:glossary|d:index
+                                         |d:refentry
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
 
   </xsl:call-template>
 </xsl:template>
   <xsl:call-template name="make.toc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
     <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
-    <xsl:with-param name="nodes" select="section|sect1
-                                         |simplesect[$simplesect.in.toc != 0]
-                                         |topic
-                                         |refentry
-                                         |article|bibliography|glossary
-                                         |appendix|index
-                                         |bridgehead[not(@renderas)
+    <xsl:with-param name="nodes" select="d:section|d:sect1
+                                         |d:simplesect[$simplesect.in.toc != 0]
+                                         |d:topic
+                                         |d:refentry
+                                         |d:article|d:bibliography|d:glossary
+                                         |d:appendix|d:index
+                                         |d:bridgehead[not(@renderas)
                                                      and $bridgehead.in.toc != 0]
-                                         |.//bridgehead[@renderas='sect1'
+                                         |.//d:bridgehead[@renderas='sect1'
                                                         and $bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
     <xsl:with-param name="toc-context" select="$toc-context"/>
     <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
     <xsl:with-param name="nodes"
-                    select="section|sect1|sect2|sect3|sect4|sect5|refentry
-                           |bridgehead[$bridgehead.in.toc != 0]"/>
+                    select="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry
+                           |d:bridgehead[$bridgehead.in.toc != 0]"/>
 
   </xsl:call-template>
 </xsl:template>
   <xsl:param name="toc-context" select="."/>
   <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
 
-  <xsl:variable name="nodes.plus" select="$nodes | qandaset"/>
+  <xsl:variable name="nodes.plus" select="$nodes | d:qandaset"/>
 
   <xsl:variable name="subtoc">
     <xsl:element name="{$toc.list.type}">
   <xsl:variable name="depth">
     <xsl:choose>
       <xsl:when test="local-name(.) = 'section'">
-        <xsl:value-of select="count(ancestor::section) + 1"/>
+        <xsl:value-of select="count(ancestor::d:section) + 1"/>
       </xsl:when>
       <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
       <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
         <!-- sigh... -->
         <xsl:choose>
           <xsl:when test="local-name(..) = 'section'">
-            <xsl:value-of select="count(ancestor::section)"/>
+            <xsl:value-of select="count(ancestor::d:section)"/>
           </xsl:when>
           <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
           <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
       <xsl:with-param name="toc-context" select="$toc-context"/>
     </xsl:call-template>
     <xsl:if test="$toc.listitem.type = 'li' and
-                  ( (self::set or self::book or self::part) or 
+                  ( (self::d:set or self::d:book or self::d:part) or
                         $toc.section.depth > $depth) and 
                   ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or
                     ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )
     </xsl:if>
   </xsl:element>
   <xsl:if test="$toc.listitem.type != 'li' and
-                  ( (self::set or self::book or self::part) or 
+                  ( (self::d:set or self::d:book or self::d:part) or
                         $toc.section.depth > $depth) and 
                 ( ($qanda.in.toc = 0 and count($nodes)&gt;0) or
                   ($qanda.in.toc != 0 and count($nodes.plus)&gt;0) )
   </span>
 </xsl:template>
 
-<xsl:template match="set" mode="toc">
+<xsl:template match="d:set" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="set|book|setindex|article"/>
+    <xsl:with-param name="nodes" select="d:set|d:book|d:setindex|d:article"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="book" mode="toc">
+<xsl:template match="d:book" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="part|reference
-                                         |preface|chapter|appendix
-                                         |article
-                                         |topic
-                                         |bibliography|glossary|index
-                                         |refentry
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:part|d:reference
+                                         |d:preface|d:chapter|d:appendix
+                                         |d:article
+                                         |d:topic
+                                         |d:bibliography|d:glossary|d:index
+                                         |d:refentry
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="setindex" mode="toc">
+<xsl:template match="d:setindex" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <!-- If the setindex tag is not empty, it should be it in the TOC -->
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="part|reference" mode="toc">
+<xsl:template match="d:part|d:reference" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="appendix|chapter|article|topic
-                                         |index|glossary|bibliography
-                                         |preface|reference|refentry
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:appendix|d:chapter|d:article|d:topic
+                                         |d:index|d:glossary|d:bibliography
+                                         |d:preface|d:reference|d:refentry
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="preface|chapter|appendix|article|topic" mode="toc">
+<xsl:template match="d:preface|d:chapter|d:appendix|d:article|d:topic" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="section|sect1
-                                         |simplesect[$simplesect.in.toc != 0]
-                                         |topic
-                                         |refentry
-                                         |glossary|bibliography|index
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:section|d:sect1
+                                         |d:simplesect[$simplesect.in.toc != 0]
+                                         |d:topic
+                                         |d:refentry
+                                         |d:glossary|d:bibliography|d:index
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="sect1" mode="toc">
+<xsl:template match="d:sect1" mode="toc">
   <xsl:param name="toc-context" select="."/>
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect2
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:sect2
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="sect2" mode="toc">
+<xsl:template match="d:sect2" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect3
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:sect3
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="sect3" mode="toc">
+<xsl:template match="d:sect3" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect4
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:sect4
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="sect4" mode="toc">
+<xsl:template match="d:sect4" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="sect5
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:sect5
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="sect5" mode="toc">
+<xsl:template match="d:sect5" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="simplesect" mode="toc">
+<xsl:template match="d:simplesect" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="section" mode="toc">
+<xsl:template match="d:section" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="section|refentry
-                                         |simplesect[$simplesect.in.toc != 0]
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:section|d:refentry
+                                         |d:simplesect[$simplesect.in.toc != 0]
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="topic" mode="toc">
+<xsl:template match="d:topic" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="section|refentry
-                                         |simplesect[$simplesect.in.toc != 0]
-                                         |bridgehead[$bridgehead.in.toc != 0]"/>
+    <xsl:with-param name="nodes" select="d:section|d:refentry
+                                         |d:simplesect[$simplesect.in.toc != 0]
+                                         |d:bridgehead[$bridgehead.in.toc != 0]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="bridgehead" mode="toc">
+<xsl:template match="d:bridgehead" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:if test="$bridgehead.in.toc != 0">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="bibliography|glossary" mode="toc">
+<xsl:template match="d:bibliography|d:glossary" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="index" mode="toc">
+<xsl:template match="d:index" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <!-- If the index tag is not empty, it should be it in the TOC -->
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refentry" mode="toc">
+<xsl:template match="d:refentry" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
-  <xsl:variable name="refmeta" select=".//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select=".//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
+  <xsl:variable name="refmeta" select=".//d:refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//d:refentrytitle"/>
+  <xsl:variable name="refnamediv" select=".//d:refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//d:refname"/>
+  <xsl:variable name="refdesc" select="$refnamediv//d:refdescriptor"/>
   <xsl:variable name="title">
     <xsl:choose>
       <xsl:when test="$refentrytitle">
         <!-- * DocBook 5 says inlinemediaobject (among other things) -->
         <!-- * is allowed in refpurpose; so we need to run -->
         <!-- * apply-templates on refpurpose here, instead of value-of  -->
-        <xsl:apply-templates select="refnamediv/refpurpose" mode="no.anchor.mode"/>
+        <xsl:apply-templates select="d:refnamediv/d:refpurpose" mode="no.anchor.mode"/>
       </xsl:if>
     </span>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="title" mode="toc">
+<xsl:template match="d:title" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <a>
 <xsl:template name="list.of.titles">
   <xsl:param name="toc-context" select="."/>
   <xsl:param name="titles" select="'table'"/>
-  <xsl:param name="nodes" select=".//table"/>
+  <xsl:param name="nodes" select=".//d:table"/>
 
   <xsl:if test="$nodes">
     <div class="list-of-{$titles}s">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="figure|table|example|equation|procedure" mode="toc">
+<xsl:template match="d:figure|d:table|d:example|d:equation|d:procedure" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:element name="{$toc.listitem.type}">
 </xsl:template>
 
 <!-- Used only if qanda.in.toc parameter is non-zero -->
-<xsl:template match="qandaset" mode="toc">
+<xsl:template match="d:qandaset" mode="toc">
   <xsl:param name="toc-context" select="."/>
   <xsl:call-template name="subtoc">
     <xsl:with-param name="toc-context" select="$toc-context"/>
-    <xsl:with-param name="nodes" select="qandadiv | qandaentry"/>
+    <xsl:with-param name="nodes" select="d:qandadiv | d:qandaentry"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="qandadiv|qandaentry" mode="toc">
+<xsl:template match="d:qandadiv|d:qandaentry" mode="toc">
   <xsl:apply-templates select="." mode="qandatoc.mode"/>
 </xsl:template>
 
index 517cb3d42373a57a7586b7d034cf881b8505b825..f59814eebb0c933a555b2ca2c792266f1b5f75df 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 
 <!-- ********************************************************************
     </xsl:when>
 
     <!-- SERIALS -->
-    <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn">
+    <xsl:when test="./@role='serial' or ./d:biblioid/@class='issn' or ./d:issn">
       <xsl:call-template name="iso690.serial"/>
     </xsl:when>
 
     <!-- PARTS OF MONOGRAPHS -->
-    <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])">
+    <xsl:when test="./@role='part' or (./d:bibliomisc[@role='secnum']|./d:bibliomisc[@role='sectitle'])">
       <xsl:call-template name="iso690.monogr.part"/>
     </xsl:when>
 
     <!-- CONTRIBUTIONS TO MONOGRAPHS -->
-    <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')">
+    <xsl:when test="./@role='contribution' or (./d:biblioset/@relation='part' and ./d:biblioset/@relation='book')">
       <xsl:call-template name="iso690.paper.mon"/>
     </xsl:when>
 
     <!-- ARTICLES, ETC., IN SERIALS -->
-    <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')">
+    <xsl:when test="./@role='article' or (./d:biblioset/@relation='journal' and ./d:biblioset/@relation='article')">
       <xsl:call-template name="iso690.article"/>
     </xsl:when>
 
     <!-- PATENT DOCUMENTS -->
-    <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])">
+    <xsl:when test="./@role='patent' or (./d:bibliomisc[@role='patenttype'] and ./d:bibliomisc[@role='patentnum'])">
       <xsl:call-template name="iso690.patent"/>
     </xsl:when>
 
   <!-- Title and Type of medium -->
   <xsl:call-template name="iso690.title"/>
   <!-- Responsibility [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
+  <xsl:if test="not(./d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
   <!-- Edition -->
   <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/>
+    <xsl:with-param name="after" select="./d:bibliomisc[@role='issuing']"/>
   </xsl:call-template>
   <!-- Issue designation (date and/or num) [nonEL] -->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
+  <xsl:if test="not(./d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.issuing"/>
   </xsl:if>
   <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
   <!-- Title and Type of medium of host document -->
   <xsl:call-template name="iso690.title"/>
   <!-- Subordinate responsibility of host document [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
   <!-- Edition -->
   <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./volumenum"/>
+    <xsl:with-param name="after" select="./d:volumenum"/>
   </xsl:call-template>
   <!-- Numeration of the part [nonEL]-->
-  <xsl:if test="not(./bibliomisc[@role='medium'])">
+  <xsl:if test="not(./d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.partnr"/>
   <!-- Subordinate responsibility [nonEL] -->
     <xsl:call-template name="iso690.secondary"/>
   <xsl:call-template name="iso690.pub"/>
   <!-- Location within host -->
   <xsl:call-template name="iso690.part.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
   <!-- Numeration within host document [EL] -->
   <!-- Notes [EL] -->
     <xsl:call-template name="iso690.notice"/>
 <!-- CONTRIBUTIONS TO MONOGRAPHS -->
 <xsl:template name="iso690.paper.mon">
 <!-- Contribution -->
-  <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/>
+  <xsl:apply-templates mode="iso690.paper.part" select="./d:biblioset[@relation='part']"/>
 <!-- In -->
   <xsl:text>In </xsl:text>
 <!-- Host -->
-  <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/>
+  <xsl:apply-templates mode="iso690.paper.book" select="./d:biblioset[@relation='book']"/>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.paper.part">
+<xsl:template match="d:biblioset" mode="iso690.paper.part">
 <!-- Contribution -->
   <!-- Primary responsibility -->
   <xsl:call-template name="iso690.primary"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.paper.book">
+<xsl:template match="d:biblioset" mode="iso690.paper.book">
 <!-- Host -->
   <!-- Primary responsibility -->
   <xsl:call-template name="iso690.primary"/>
   <!-- Title and Type of medium -->
   <xsl:call-template name="iso690.title"/>
   <!-- Subordinate responsibility [EL] -->
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
   <!-- Edition -->
   <!-- Numeration within host document [EL] -->
   <!-- Location within host -->
   <xsl:call-template name="iso690.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
   <!-- Notes [EL] -->
     <xsl:call-template name="iso690.notice"/>
   <!-- Avaibility and access [EL] -->
 <!-- ARTICLES, ETC., IN SERIALS -->
 <xsl:template name="iso690.article">
 <!-- Article -->
-  <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/>
+  <xsl:apply-templates mode="iso690.article.art" select="./d:biblioset[@relation='article']"/>
 <!-- Serial -->
-  <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/>
+  <xsl:apply-templates mode="iso690.article.jour" select="./d:biblioset[@relation='journal']"/>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.article.art">
+<xsl:template match="d:biblioset" mode="iso690.article.art">
 <!-- Article -->
   <!-- Primary responsibility -->
   <xsl:call-template name="iso690.primary"/>
     <xsl:with-param name="italic" select="0"/>
   </xsl:call-template>
   <!-- Subordinate responsibility [nonEL] -->
-  <xsl:if test="not(../*/bibliomisc[@role='medium'])">
+  <xsl:if test="not(../*/d:bibliomisc[@role='medium'])">
     <xsl:call-template name="iso690.secondary"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="biblioset" mode="iso690.article.jour">
+<xsl:template match="d:biblioset" mode="iso690.article.jour">
 <!-- Serial -->
   <!-- Title and Type of medium -->
   <xsl:call-template name="iso690.title"/>
   <!-- Edition -->
   <xsl:call-template name="iso690.edition">
-    <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/>
+    <xsl:with-param name="after" select="./d:pubdate[not(@role='issuing')]|./d:volumenum|./d:issuenum|./d:pagenums"/>
   </xsl:call-template>
   <!-- Number designation [EL] -->
   <!-- Location within host -->
   <xsl:call-template name="iso690.article.location"/>
-  <xsl:if test="./bibliomisc[@role='medium']">
+  <xsl:if test="./d:bibliomisc[@role='medium']">
   <!-- Notes [EL] -->
     <xsl:call-template name="iso690.notice"/>
   <!-- Avaibility and access [EL] -->
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./authorgroup/author|./author">
+    <xsl:when test="./d:authorgroup/d:author|./d:author">
       <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/>
+        <xsl:with-param name="person.list" select=".//d:authorgroup/d:author|.//d:author"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="./authorgroup/editor|./editor">
+    <xsl:when test="./d:authorgroup/d:editor|./d:editor">
       <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/>
+        <xsl:with-param name="person.list" select=".//d:authorgroup/d:editor|.//d:editor"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="./authorgroup/corpauthor|./corpauthor">
+    <xsl:when test="./d:authorgroup/d:corpauthor|./d:corpauthor">
       <xsl:call-template name="iso690.author.list">
-        <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/>
+        <xsl:with-param name="person.list" select=".//d:authorgroup/d:corpauthor|.//d:corpauthor"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:if test="(./firstname)and(./surname)">
+      <xsl:if test="(./d:firstname)and(./d:surname)">
         <xsl:call-template name="iso690.author"/>
         <xsl:call-template name="iso690.endsep">
-          <xsl:with-param name="text" select="string(./firstname[1])"/>
+          <xsl:with-param name="text" select="string(./d:firstname[1])"/>
           <xsl:with-param name="sep" select="$primary.sep"/>
         </xsl:call-template>
       </xsl:if>
 
 <xsl:template name="iso690.author.list">
   <xsl:param name="person.list"
-             select="author|corpauthor|editor"/>
+             select="d:author|d:corpauthor|d:editor"/>
   <xsl:param name="person.count" select="count($person.list)"/>
   <xsl:param name="count" select="1"/>
-  <xsl:param name="group" select="./authorgroup[@role='many']"/>
+  <xsl:param name="group" select="./d:authorgroup[@role='many']"/>
   <xsl:param name="many" select="0"/>
 
   <xsl:param name="primary.many">
                 </xsl:when>
                 <xsl:otherwise>
                   <xsl:call-template name="iso690.endsep">
-                    <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/>
+                    <xsl:with-param name="text" select="string($person.list[position()=$count]//d:firstname[1])"/>
                     <xsl:with-param name="sep" select="$primary.sep"/>
                   </xsl:call-template>
                 </xsl:otherwise>
   <xsl:choose>
     <xsl:when test="name($node)!='corpauthor'">
       <span style="text-transform:uppercase">
-        <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/>
+        <xsl:apply-templates mode="iso690.mode" select="$node//d:surname[1]"/>
       </span>
-      <xsl:if test="$node//surname and $node//firstname">
+      <xsl:if test="$node//d:surname and $node//d:firstname">
         <xsl:value-of select="$lastfirst.sep"/>
       </xsl:if>
-      <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/>
+      <xsl:apply-templates mode="iso690.mode" select="$node//d:firstname[1]"/>
     </xsl:when>
     <xsl:otherwise>
       <span style="text-transform:uppercase">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="corpauthor|firstname|surname" mode="iso690.mode">
+<xsl:template match="d:corpauthor|d:firstname|d:surname" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
 <!-- Title and Type of medium -->
 <xsl:template name="iso690.title">
-  <xsl:param name="medium" select="./bibliomisc[@role='medium']"/>
+  <xsl:param name="medium" select="./d:bibliomisc[@role='medium']"/>
   <xsl:param name="italic" select="1"/>
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
   </xsl:param>
 
-  <xsl:apply-templates mode="iso690.mode" select="./title">
+  <xsl:apply-templates mode="iso690.mode" select="./d:title">
     <xsl:with-param name="medium" select="$medium"/>
     <xsl:with-param name="italic" select="$italic"/>
     <xsl:with-param name="sep" select="$sep"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="title" mode="iso690.mode">
+<xsl:template match="d:title" mode="iso690.mode">
   <xsl:param name="medium"/>
   <xsl:param name="italic" select="1"/>
   <xsl:param name="sep">
     <xsl:value-of select="$medium2"/>
   </xsl:if>
   <xsl:call-template name="iso690.endsep">
-    <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/>
+    <xsl:with-param name="text" select="concat(string(.),string(../d:subtitle))"/>
     <xsl:with-param name="sep" select="$sep"/>
   </xsl:call-template>
 </xsl:template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:apply-templates mode="iso690.mode"/>
-  <xsl:if test="../subtitle|../info/subtitle">
+  <xsl:if test="../d:subtitle|../d:info/d:subtitle">
     <xsl:value-of select="$submaintitle.sep"/>
-    <xsl:apply-templates mode="iso690.mode" select="../subtitle|../info/subtitle"/>
+    <xsl:apply-templates mode="iso690.mode" select="../d:subtitle|../d:info/d:subtitle"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="iso690.mode">
+<xsl:template match="d:subtitle" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
-<xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='medium']" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
   <xsl:param name="secondary.person.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:for-each select="./bibliomisc[@role='secondary']">
+  <xsl:for-each select="./d:bibliomisc[@role='secondary']">
     <xsl:apply-templates mode="iso690.mode" select="."/>
     <xsl:choose>
-      <xsl:when test="position()=count(../bibliomisc[@role='secondary'])">
+      <xsl:when test="position()=count(../d:bibliomisc[@role='secondary'])">
         <xsl:call-template name="iso690.endsep">
           <xsl:with-param name="text" select="string(.)"/>
           <xsl:with-param name="sep" select="$secondary.sep"/>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='secondary']" mode="iso690.mode">
   <xsl:apply-templates mode="iso690.mode"/>
 </xsl:template>
 
   </xsl:param>
   <xsl:choose>
     <xsl:when test="string($after)!=''">
-      <xsl:apply-templates mode="iso690.mode" select="./edition">
+      <xsl:apply-templates mode="iso690.mode" select="./d:edition">
         <xsl:with-param name="sep" select="$edition.serial.sep"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./edition"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:edition"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="edition" mode="iso690.mode">
+<xsl:template match="d:edition" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template>
   </xsl:param>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]">
+    <xsl:when test="./d:pubdate[@role='issuing'] and ./d:volumenum[2] and ./d:issuenum[2]">
       <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[1]">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum[1]">
         <xsl:with-param name="sep" select="$issuing.range"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[2]">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum[2]">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]">
+    <xsl:when test="./d:pubdate[@role='issuing'] and ./d:volumenum[2]">
       <xsl:call-template name="iso690.issuedate"/>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[1]">
         <xsl:with-param name="sep" select="$issuing.range"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum[2]">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
+    <xsl:when test="./d:pubdate[@role='issuing'] and ./d:volumenum and ./d:issuenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing']">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pubdate[@role='issuing']">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
+    <xsl:when test="./d:pubdate[@role='issuing']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing']">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./volumenum">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+    <xsl:when test="./d:volumenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./issuenum">
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+    <xsl:when test="./d:issuenum">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
         <xsl:with-param name="sep" select="$issuing.sep"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./pubdate[@role='issuing'][2]">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]">
+    <xsl:when test="./d:pubdate[@role='issuing'][2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing'][1]">
         <xsl:with-param name="sep" select="$issuing.range"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing'][2]">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[@role='issuing']">
         <xsl:with-param name="sep" select="$issuing.div"/>
       </xsl:apply-templates>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="pubdate[@role='issuing']" mode="iso690.mode">
+<xsl:template match="d:pubdate[@role='issuing']" mode="iso690.mode">
   <xsl:param name="sep"/>
   <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
   <xsl:apply-templates mode="iso690.mode"/>
   <xsl:param name="partnr.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+  <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
     <xsl:with-param name="sep" select="$partnr.sep"/>
   </xsl:apply-templates>
 </xsl:template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
+    <xsl:when test="(./d:publisher/d:publishername|./d:publishername|./d:publisher/d:address/d:city)and($onlydate=0)and(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year|./d:date[@role='upd']|./d:date[@role='upd'])">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:address/d:city">
         <xsl:with-param name="sep" select="$placesep"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:publishername|./d:publishername">
         <xsl:with-param name="sep" select="$pubsep"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]|./d:copyright/d:year">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:apply-templates>
-      <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
+      <xsl:if test="not(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year)">
         <xsl:call-template name="iso690.data">
           <xsl:with-param name="sep" select="$endsep"/>
         </xsl:call-template>
       </xsl:if>
     </xsl:when>
-    <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)">
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
+    <xsl:when test="(./d:publisher/d:publishername|./d:publishername)and(./d:publisher/d:address/d:city)and($onlydate=0)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:address/d:city">
         <xsl:with-param name="sep" select="$placesep"/>
       </xsl:apply-templates>
-      <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
+      <xsl:apply-templates mode="iso690.mode" select="./d:publisher/d:publishername|./d:publishername">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)">
-      <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
+    <xsl:when test="($onlydate=1)or(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]|./d:copyright/d:year">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:apply-templates>
       <xsl:if test="$onlydate=1">
         </xsl:call-template>
       </xsl:if>
     </xsl:when>
-    <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
+    <xsl:when test="not(./d:pubdate[not(@role='issuing')]|./d:copyright/d:year)">
       <xsl:call-template name="iso690.data">
         <xsl:with-param name="sep" select="$endsep"/>
       </xsl:call-template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./volumnum|./issuenum|./pagenums">
+    <xsl:when test="./d:volumnum|./d:issuenum|./d:pagenums">
       <xsl:call-template name="iso690.pub">
         <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/>
       </xsl:call-template>
   <xsl:param name="datecit2">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']">
+  <xsl:apply-templates mode="iso690.mode" select="./d:date[@role='upd']">
     <xsl:with-param name="sep"/>
   </xsl:apply-templates>
-  <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/>
+  <xsl:apply-templates mode="iso690.mode" select="./d:date[@role='cit']"/>
   <xsl:choose>
-    <xsl:when test="./date[@role='cit']">
+    <xsl:when test="./d:date[@role='cit']">
       <xsl:call-template name="iso690.endsep">
         <xsl:with-param name="text" select="$datecit2"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="./date[@role='upd']">
+    <xsl:when test="./d:date[@role='upd']">
       <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(./date[@role='upd'])"/>
+        <xsl:with-param name="text" select="string(./d:date[@role='upd'])"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="publisher/address/city|publishername" mode="iso690.mode">
+<xsl:template match="d:publisher/d:address/d:city|d:publishername" mode="iso690.mode">
   <xsl:param name="sep"/>
   <xsl:param name="upd" select="0"/>
   <xsl:apply-templates mode="iso690.mode"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="pubdate|copyright/year" mode="iso690.mode">
+<xsl:template match="d:pubdate|d:copyright/d:year" mode="iso690.mode">
   <xsl:param name="sep"/>
   <xsl:param name="upd" select="1"/>
   <xsl:param name="datecit2">
   <xsl:if test="$upd!=0">
     <xsl:choose>
       <xsl:when test="name(.)='pubdate'">
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../d:date[@role='upd']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../d:date[@role='cit']"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/>
-        <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../../d:date[@role='upd']"/>
+        <xsl:apply-templates mode="iso690.mode" select="../../d:date[@role='cit']"/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:if>
   <xsl:choose>
-    <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0">
+    <xsl:when test="../d:date[@role='cit']|../../d:date[@role='cit'] and $upd!=0">
       <xsl:call-template name="iso690.endsep">
         <xsl:with-param name="text" select="$datecit2"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
-    <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0">
+    <xsl:when test="../d:date[@role='upd']|../../d:date[@role='upd'] and $upd!=0">
       <xsl:call-template name="iso690.endsep">
-        <xsl:with-param name="text" select="string(../date[@role='upd'])"/>
+        <xsl:with-param name="text" select="string(../d:date[@role='upd'])"/>
         <xsl:with-param name="sep" select="$sep"/>
       </xsl:call-template>
     </xsl:when>
 </xsl:template>
 
 <!-- Date of update/revision -->
-<xsl:template match="date[@role='upd']" mode="iso690.mode">
+<xsl:template match="d:date[@role='upd']" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template>
   </xsl:param>
 </xsl:template>
 
 <!-- Date of citation -->
-<xsl:template match="date[@role='cit']" mode="iso690.mode">
+<xsl:template match="d:date[@role='cit']" mode="iso690.mode">
   <xsl:param name="datecit1">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template>
   </xsl:param>
   <xsl:param name="extent.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./pagenums">
+  <xsl:apply-templates mode="iso690.mode" select="./d:pagenums">
     <xsl:with-param name="sep" select="$extent.sep"/>
   </xsl:apply-templates>
 </xsl:template>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
+    <xsl:when test="./d:pagenums">
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='secnum']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='sectitle']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:pagenums"/>
     </xsl:when>
-    <xsl:when test="./bibliomisc[@role='sectitle']">
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']">
+    <xsl:when test="./d:bibliomisc[@role='sectitle']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='secnum']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='sectitle']">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='secnum']">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:otherwise>
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])">
+    <xsl:when test="not(./d:date[@role='upd']|./d:date[@role='cit'])">
       <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+        <xsl:when test="./d:volumenum|./d:issuenum|./d:pagenums">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="upd" select="0"/>
             <xsl:with-param name="sep" select="$locs.sep"/>
           </xsl:apply-templates>
           <xsl:call-template name="iso690.location"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="sep" select="$location.sep"/>
           </xsl:apply-templates>
         </xsl:otherwise>
     </xsl:when>
     <xsl:otherwise>
       <xsl:choose>
-        <xsl:when test="./volumenum|./issuenum|./pagenums">
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+        <xsl:when test="./d:volumenum|./d:issuenum|./d:pagenums">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="upd" select="0"/>
             <xsl:with-param name="sep" select="$locs.sep"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+          <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
             <xsl:with-param name="upd" select="0"/>
             <xsl:with-param name="sep" select="$location.sep"/>
           </xsl:apply-templates>
         </xsl:otherwise>
       </xsl:choose>
       <xsl:choose>
-        <xsl:when test="./issuenum">
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-          <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+        <xsl:when test="./d:issuenum">
+          <xsl:apply-templates mode="iso690.mode" select="./d:volumenum"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
             <xsl:with-param name="sep"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+          <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
             <xsl:with-param name="sep"/>
           </xsl:apply-templates>
         </xsl:otherwise>
       </xsl:choose>
       <xsl:choose>
-        <xsl:when test="./pagenums">
+        <xsl:when test="./d:pagenums">
           <xsl:call-template name="iso690.data">
             <xsl:with-param name="sep" select="$locs.sep"/>
           </xsl:call-template>
-          <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:pagenums"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:call-template name="iso690.data">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
   </xsl:param>
   <xsl:choose>
-    <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum">
+    <xsl:when test="./d:volumenum and not(./d:issuenum) and not(./d:pagenums)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./issuenum and not(./pagenums)">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum">
+    <xsl:when test="./d:issuenum and not(./d:pagenums)">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum">
         <xsl:with-param name="sep" select="$location.sep"/>
       </xsl:apply-templates>
     </xsl:when>
-    <xsl:when test="./pagenums">
-      <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./issuenum"/>
-      <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
+    <xsl:when test="./d:pagenums">
+      <xsl:apply-templates mode="iso690.mode" select="./d:volumenum"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:issuenum"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:pagenums"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='secnum']|d:bibliomisc[@role='sectitle']" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
   </xsl:param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="volumenum|issuenum" mode="iso690.mode">
+<xsl:template match="d:volumenum|d:issuenum" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
   </xsl:param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="iso690.mode">
+<xsl:template match="d:pagenums" mode="iso690.mode">
   <xsl:param name="sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
   </xsl:param>
 
 <!-- Series -->
 <xsl:template name="iso690.serie">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/>
+  <xsl:apply-templates mode="iso690.mode" select=".//d:bibliomisc[@role='serie']"/>
 </xsl:template>
 
 <!-- Notes -->
 <xsl:template name="iso690.notice">
-  <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/>
+  <xsl:apply-templates mode="iso690.mode" select=".//d:bibliomisc[not(@role)]"/>
 </xsl:template>
 
-<xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[not(@role)]|d:bibliomisc[@role='serie']" mode="iso690.mode">
   <xsl:param name="notice.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template>
   </xsl:param>
 
 <!-- Avaibility and access -->
 <xsl:template name="iso690.access">
-  <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']">
+  <xsl:for-each select="./d:biblioid[@class='uri']|./d:bibliomisc[@role='access']">
     <xsl:choose>
       <xsl:when test="position()=1">
         <xsl:apply-templates mode="iso690.mode" select="."/>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode">
+<xsl:template match="d:biblioid[@class='uri']/d:ulink|d:bibliomisc[@role='access']/d:ulink" mode="iso690.mode">
   <xsl:param name="link1">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template>
   </xsl:param>
   <xsl:value-of select="$link2"/>
 </xsl:template>
 
-<xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode">
+<xsl:template match="d:biblioid[@class='uri']|d:bibliomisc[@role='access']" mode="iso690.mode">
   <xsl:param name="firstacc" select="1"/>
   <xsl:param name="access">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
   <xsl:choose>
-    <xsl:when test="(./ulink)and(string(./ulink)=string(.))">
+    <xsl:when test="(./d:ulink)and(string(./d:ulink)=string(.))">
       <xsl:choose>
-        <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))">
+        <xsl:when test="(starts-with(./d:ulink/@url,'http://')or(starts-with(./d:ulink/@url,'https://')))">
           <xsl:value-of select="$onwww"/>
           <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:ulink"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="$oninet"/>
           <xsl:value-of select="$access.end"/>
-          <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
+          <xsl:apply-templates mode="iso690.mode" select="./d:ulink"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
-    <xsl:when test="(./ulink)and(string(./ulink)!=string(.))">
+    <xsl:when test="(./d:ulink)and(string(./d:ulink)!=string(.))">
       <xsl:value-of select="text()[1]"/>
       <xsl:call-template name="iso690.endsep">
         <xsl:with-param name="text" select="text()[1]"/>
         <xsl:with-param name="sep" select="$access.end"/>
       </xsl:call-template>
-      <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:ulink"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates mode="iso690.mode"/>
 <!-- Standard number - ISBN -->
 <xsl:template name="iso690.isbn">
   <xsl:choose>
-    <xsl:when test="./biblioid/@class='isbn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/>
+    <xsl:when test="./d:biblioid/@class='isbn'">
+      <xsl:apply-templates mode="iso690.mode" select="./d:biblioid[@class='isbn']"/>
     </xsl:when>
-    <xsl:when test="./isbn">
-      <xsl:apply-templates mode="iso690.mode" select="./isbn"/>
+    <xsl:when test="./d:isbn">
+      <xsl:apply-templates mode="iso690.mode" select="./d:isbn"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode">
+<xsl:template match="d:isbn|d:biblioid[@class='isbn']" mode="iso690.mode">
   <xsl:param name="isbn">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template>
   </xsl:param>
 <!-- Standard number - ISSN -->
 <xsl:template name="iso690.issn">
   <xsl:choose>
-    <xsl:when test="./biblioid/@class='issn'">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/>
+    <xsl:when test="./d:biblioid/@class='issn'">
+      <xsl:apply-templates mode="iso690.mode" select="./d:biblioid[@class='issn']"/>
     </xsl:when>
-    <xsl:when test="./issn">
-      <xsl:apply-templates mode="iso690.mode" select="./issn"/>
+    <xsl:when test="./d:issn">
+      <xsl:apply-templates mode="iso690.mode" select="./d:issn"/>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode">
+<xsl:template match="d:issn|d:biblioid[@class='issn']" mode="iso690.mode">
   <xsl:param name="issn">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template>
   </xsl:param>
   <xsl:param name="patdate.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template>
   </xsl:param>
-  <xsl:apply-templates mode="iso690.mode" select="./address/country"/>
-  <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/>
+  <xsl:apply-templates mode="iso690.mode" select="./d:address/d:country"/>
+  <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='patenttype']"/>
   <xsl:choose>
-    <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']">
-      <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/>
+    <xsl:when test="./d:biblioid[@class='other' and @otherclass='patentnum']">
+      <xsl:apply-templates mode="iso690.mode" select="./d:biblioid[@class='other' and @otherclass='patentnum']"/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/>
+      <xsl:apply-templates mode="iso690.mode" select="./d:bibliomisc[@role='patentnum']"/>
     </xsl:otherwise>
   </xsl:choose>
-  <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
+  <xsl:apply-templates mode="iso690.mode" select="./d:pubdate[not(@role='issuing')]">
     <xsl:with-param name="sep" select="$patdate.sep"/>
   </xsl:apply-templates>
 </xsl:template>
 
 <!-- Country or issuing office -->
-<xsl:template match="address/country" mode="iso690.mode">
+<xsl:template match="d:address/d:country" mode="iso690.mode">
   <xsl:param name="patcountry.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template>
   </xsl:param>
 </xsl:template>
 
 <!-- Kind of patent document -->
-<xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode">
+<xsl:template match="d:bibliomisc[@role='patenttype']" mode="iso690.mode">
   <xsl:param name="pattype.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template>
   </xsl:param>
 </xsl:template>
 
 <!-- Number -->
-<xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode">
+<xsl:template match="d:biblioid[@class='other' and @otherclass='patentnum']|d:bibliomisc[@role='patentnum']" mode="iso690.mode">
   <xsl:param name="patnum.sep">
     <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template>
   </xsl:param>
index 02c2e10a79de542b0c4c103cf6e44638ca7e7f44..9f084c36013c52dcef1e3357dace86f3782fbe7b 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bibliography">
+<xsl:template match="d:bibliography">
   <xsl:call-template name="id.warning"/>
 
   <div>
 
     <xsl:apply-templates/>
 
-    <xsl:if test="not(parent::article)">
+    <xsl:if test="not(parent::d:article)">
       <xsl:call-template name="process.footnotes"/>
     </xsl:if>
   </div>
 </xsl:template>
 
-<xsl:template match="bibliography/bibliographyinfo"></xsl:template>
-<xsl:template match="bibliography/info"></xsl:template>
-<xsl:template match="bibliography/title"></xsl:template>
-<xsl:template match="bibliography/subtitle"></xsl:template>
-<xsl:template match="bibliography/titleabbrev"></xsl:template>
+<xsl:template match="d:bibliography/d:bibliographyinfo"></xsl:template>
+<xsl:template match="d:bibliography/d:info"></xsl:template>
+<xsl:template match="d:bibliography/d:title"></xsl:template>
+<xsl:template match="d:bibliography/d:subtitle"></xsl:template>
+<xsl:template match="d:bibliography/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bibliodiv">
+<xsl:template match="d:bibliodiv">
   <xsl:call-template name="id.warning"/>
 
   <div>
@@ -55,7 +57,7 @@
   </div>
 </xsl:template>
 
-<xsl:template match="bibliodiv/title">
+<xsl:template match="d:bibliodiv/d:title">
   <h3>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="anchor">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bibliolist">
+<xsl:template match="d:bibliolist">
   <div>
     <xsl:call-template name="common.html.attributes">
       <xsl:with-param name="inherit" select="0"/>
     </xsl:call-template>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:if test="blockinfo/title|info/title|title">
+    <xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
-    <xsl:apply-templates select="*[not(self::blockinfo)
-                                   and not(self::info)
-                                   and not(self::title)
-                                   and not(self::titleabbrev)
-                                   and not(self::biblioentry)
-                                   and not(self::bibliomixed)]"/>
-    <xsl:apply-templates select="biblioentry|bibliomixed"/>
+    <xsl:apply-templates select="*[not(self::d:blockinfo)
+                                   and not(self::d:info)
+                                   and not(self::d:title)
+                                   and not(self::d:titleabbrev)
+                                   and not(self::d:biblioentry)
+                                   and not(self::d:bibliomixed)]"/>
+    <xsl:apply-templates select="d:biblioentry|d:bibliomixed"/>
   </div>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="biblioentry">
+<xsl:template match="d:biblioentry">
   <xsl:param name="label">
     <xsl:call-template name="biblioentry.label"/>
   </xsl:param>
   <xsl:choose>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography//
+      <xsl:variable name="entry" select="$bib/d:bibliography//
                                          *[@id=$id or @xml:id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="bibliomixed">
+<xsl:template match="d:bibliomixed">
   <xsl:param name="label">
     <xsl:call-template name="biblioentry.label"/>
   </xsl:param>
   <xsl:choose>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
-      <xsl:variable name="entry" select="$bib/bibliography//
+      <xsl:variable name="entry" select="$bib/d:bibliography//
                                          *[@id=$id or @xml:id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
   <xsl:choose>
     <xsl:when test="$bibliography.numbered != 0">
       <xsl:text>[</xsl:text>
-      <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+      <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
                   level="any" format="1"/>
       <xsl:text>] </xsl:text>
     </xsl:when>
     <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
       <xsl:text>[</xsl:text>
-      <xsl:apply-templates select="$node/abbrev[1]"/>
+      <xsl:apply-templates select="$node/d:abbrev[1]"/>
       <xsl:text>] </xsl:text>
     </xsl:when>
     <xsl:when test="$node/@xreflabel">
   <xsl:apply-templates select="."/><!-- try the default mode -->
 </xsl:template>
 
-<xsl:template match="abbrev" mode="bibliography.mode">
+<xsl:template match="d:abbrev" mode="bibliography.mode">
   <xsl:if test="preceding-sibling::*">
     <xsl:apply-templates mode="bibliography.mode"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="abstract" mode="bibliography.mode">
+<xsl:template match="d:abstract" mode="bibliography.mode">
   <!-- suppressed -->
 </xsl:template>
 
-<xsl:template match="address" mode="bibliography.mode">
+<xsl:template match="d:address" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="affiliation" mode="bibliography.mode">
+<xsl:template match="d:affiliation" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="shortaffil" mode="bibliography.mode">
+<xsl:template match="d:shortaffil" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="jobtitle" mode="bibliography.mode">
+<xsl:template match="d:jobtitle" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="artheader|articleinfo|info" mode="bibliography.mode">
+<xsl:template match="d:artheader|d:articleinfo|d:info" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="artpagenums" mode="bibliography.mode">
+<xsl:template match="d:artpagenums" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="author" mode="bibliography.mode">
+<xsl:template match="d:author" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:choose>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname" mode="bibliography.mode"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname" mode="bibliography.mode"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name"/>
   </span>
 </xsl:template>
 
-<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
+<xsl:template match="d:authorblurb|d:personblurb" mode="bibliography.mode">
   <!-- suppressed -->
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="bibliography.mode">
+<xsl:template match="d:authorgroup" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="authorinitials" mode="bibliography.mode">
+<xsl:template match="d:authorinitials" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliomisc" mode="bibliography.mode">
+<xsl:template match="d:bibliomisc" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliomset" mode="bibliography.mode">
+<xsl:template match="d:bibliomset" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
 
 <!-- ================================================== -->
 
-<xsl:template match="biblioset" mode="bibliography.mode">
+<xsl:template match="d:biblioset" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="biblioset/title|biblioset/citetitle" 
+<xsl:template match="d:biblioset/d:title|d:biblioset/d:citetitle"
               mode="bibliography.mode">
   <xsl:variable name="relation" select="../@relation"/>
   <xsl:choose>
 
 <!-- ================================================== -->
 
-<xsl:template match="citetitle" mode="bibliography.mode">
+<xsl:template match="d:citetitle" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="collab" mode="bibliography.mode">
+<xsl:template match="d:collab" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="collabname" mode="bibliography.mode">
+<xsl:template match="d:collabname" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confgroup" mode="bibliography.mode">
+<xsl:template match="d:confgroup" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confdates" mode="bibliography.mode">
+<xsl:template match="d:confdates" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="conftitle" mode="bibliography.mode">
+<xsl:template match="d:conftitle" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confnum" mode="bibliography.mode">
+<xsl:template match="d:confnum" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confsponsor" mode="bibliography.mode">
+<xsl:template match="d:confsponsor" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contractnum" mode="bibliography.mode">
+<xsl:template match="d:contractnum" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contractsponsor" mode="bibliography.mode">
+<xsl:template match="d:contractsponsor" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contrib" mode="bibliography.mode">
+<xsl:template match="d:contrib" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
 
 <!-- ================================================== -->
 
-<xsl:template match="copyright" mode="bibliography.mode">
+<xsl:template match="d:copyright" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
       <xsl:with-param name="dingbat">copyright</xsl:with-param>
     </xsl:call-template>
     <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="year" mode="bibliography.mode"/>
-    <xsl:if test="holder">
+    <xsl:apply-templates select="d:year" mode="bibliography.mode"/>
+    <xsl:if test="d:holder">
       <xsl:call-template name="gentext.space"/>
-      <xsl:apply-templates select="holder" mode="bibliography.mode"/>
+      <xsl:apply-templates select="d:holder" mode="bibliography.mode"/>
     </xsl:if>
     <xsl:copy-of select="$biblioentry.item.separator"/>
   </span>
 </xsl:template>
 
-<xsl:template match="year" mode="bibliography.mode">
+<xsl:template match="d:year" mode="bibliography.mode">
   <xsl:apply-templates/><xsl:text>, </xsl:text>
 </xsl:template>
 
-<xsl:template match="year[position()=last()]" mode="bibliography.mode">
+<xsl:template match="d:year[position()=last()]" mode="bibliography.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="holder" mode="bibliography.mode">
+<xsl:template match="d:holder" mode="bibliography.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ================================================== -->
 
-<xsl:template match="corpauthor" mode="bibliography.mode">
+<xsl:template match="d:corpauthor" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="bibliography.mode">
+<xsl:template match="d:corpcredit" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="corpname" mode="bibliography.mode">
+<xsl:template match="d:corpname" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="date" mode="bibliography.mode">
+<xsl:template match="d:date" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="edition" mode="bibliography.mode">
+<xsl:template match="d:edition" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="editor" mode="bibliography.mode">
+<xsl:template match="d:editor" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="firstname" mode="bibliography.mode">
+<xsl:template match="d:firstname" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="honorific" mode="bibliography.mode">
+<xsl:template match="d:honorific" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="bibliography.mode">
+<xsl:template match="d:indexterm" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="invpartnumber" mode="bibliography.mode">
+<xsl:template match="d:invpartnumber" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="isbn" mode="bibliography.mode">
+<xsl:template match="d:isbn" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="issn" mode="bibliography.mode">
+<xsl:template match="d:issn" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="issuenum" mode="bibliography.mode">
+<xsl:template match="d:issuenum" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="lineage" mode="bibliography.mode">
+<xsl:template match="d:lineage" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="orgname" mode="bibliography.mode">
+<xsl:template match="d:orgname" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="orgdiv" mode="bibliography.mode">
+<xsl:template match="d:orgdiv" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="bibliography.mode">
+<xsl:template match="d:othercredit" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="othername" mode="bibliography.mode">
+<xsl:template match="d:othername" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="bibliography.mode">
+<xsl:template match="d:pagenums" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="printhistory" mode="bibliography.mode">
+<xsl:template match="d:printhistory" mode="bibliography.mode">
   <!-- suppressed -->
 </xsl:template>
 
-<xsl:template match="productname" mode="bibliography.mode">
+<xsl:template match="d:productname" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="productnumber" mode="bibliography.mode">
+<xsl:template match="d:productnumber" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="bibliography.mode">
+<xsl:template match="d:pubdate" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="publisher" mode="bibliography.mode">
+<xsl:template match="d:publisher" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="publishername" mode="bibliography.mode">
+<xsl:template match="d:publishername" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pubsnumber" mode="bibliography.mode">
+<xsl:template match="d:pubsnumber" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="bibliography.mode">
+<xsl:template match="d:releaseinfo" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="bibliography.mode">
+<xsl:template match="d:revhistory" mode="bibliography.mode">
   <!-- suppressed; how could this be represented? -->
 </xsl:template>
 
-<xsl:template match="seriesinfo" mode="bibliography.mode">
+<xsl:template match="d:seriesinfo" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="seriesvolnums" mode="bibliography.mode">
+<xsl:template match="d:seriesvolnums" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="bibliography.mode">
+<xsl:template match="d:subtitle" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="surname" mode="bibliography.mode">
+<xsl:template match="d:surname" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="title" mode="bibliography.mode">
+<xsl:template match="d:title" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="bibliography.mode">
+<xsl:template match="d:titleabbrev" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="volumenum" mode="bibliography.mode">
+<xsl:template match="d:volumenum" mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+<xsl:template match="d:bibliocoverage|d:biblioid|d:bibliorelation|d:bibliosource"
               mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
 </xsl:template>
 
 <!-- See FR #1934434 and http://doi.org -->
-<xsl:template match="biblioid[@class='doi']"
+<xsl:template match="d:biblioid[@class='doi']"
               mode="bibliography.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
   <xsl:apply-templates select="."/><!-- try the default mode -->
 </xsl:template>
 
-<xsl:template match="abbrev" mode="bibliomixed.mode">
+<xsl:template match="d:abbrev" mode="bibliomixed.mode">
   <xsl:if test="preceding-sibling::*">
     <xsl:apply-templates mode="bibliomixed.mode"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="abstract" mode="bibliomixed.mode">
+<xsl:template match="d:abstract" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="address" mode="bibliomixed.mode">
+<xsl:template match="d:address" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="affiliation" mode="bibliomixed.mode">
+<xsl:template match="d:affiliation" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="shortaffil" mode="bibliomixed.mode">
+<xsl:template match="d:shortaffil" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="jobtitle" mode="bibliomixed.mode">
+<xsl:template match="d:jobtitle" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="artpagenums" mode="bibliomixed.mode">
+<xsl:template match="d:artpagenums" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="author" mode="bibliomixed.mode">
+<xsl:template match="d:author" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:choose>
-      <xsl:when test="orgname">
-        <xsl:apply-templates select="orgname" mode="bibliomixed.mode"/>
+      <xsl:when test="d:orgname">
+        <xsl:apply-templates select="d:orgname" mode="bibliomixed.mode"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="person.name"/>
   </span>
 </xsl:template>
 
-<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
+<xsl:template match="d:authorblurb|d:personblurb" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="bibliomixed.mode">
+<xsl:template match="d:authorgroup" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="authorinitials" mode="bibliomixed.mode">
+<xsl:template match="d:authorinitials" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliomisc" mode="bibliomixed.mode">
+<xsl:template match="d:bibliomisc" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
 
 <!-- ================================================== -->
 
-<xsl:template match="bibliomset" mode="bibliomixed.mode">
+<xsl:template match="d:bibliomset" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliomset/title|bibliomset/citetitle" 
+<xsl:template match="d:bibliomset/d:title|d:bibliomset/d:citetitle"
               mode="bibliomixed.mode">
   <xsl:variable name="relation" select="../@relation"/>
   <xsl:choose>
 
 <!-- ================================================== -->
 
-<xsl:template match="biblioset" mode="bibliomixed.mode">
+<xsl:template match="d:biblioset" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="citetitle" mode="bibliomixed.mode">
+<xsl:template match="d:citetitle" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
 </xsl:template>
 
 
-<xsl:template match="collab" mode="bibliomixed.mode">
+<xsl:template match="d:collab" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confgroup" mode="bibliomixed.mode">
+<xsl:template match="d:confgroup" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contractnum" mode="bibliomixed.mode">
+<xsl:template match="d:contractnum" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contractsponsor" mode="bibliomixed.mode">
+<xsl:template match="d:contractsponsor" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contrib" mode="bibliomixed.mode">
+<xsl:template match="d:contrib" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="copyright" mode="bibliomixed.mode">
+<xsl:template match="d:copyright" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="bibliomixed.mode">
+<xsl:template match="d:corpauthor" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="bibliomixed.mode">
+<xsl:template match="d:corpcredit" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="corpname" mode="bibliomixed.mode">
+<xsl:template match="d:corpname" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="date" mode="bibliomixed.mode">
+<xsl:template match="d:date" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="edition" mode="bibliomixed.mode">
+<xsl:template match="d:edition" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="editor" mode="bibliomixed.mode">
+<xsl:template match="d:editor" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="firstname" mode="bibliomixed.mode">
+<xsl:template match="d:firstname" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="honorific" mode="bibliomixed.mode">
+<xsl:template match="d:honorific" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="bibliomixed.mode">
+<xsl:template match="d:indexterm" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="invpartnumber" mode="bibliomixed.mode">
+<xsl:template match="d:invpartnumber" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="isbn" mode="bibliomixed.mode">
+<xsl:template match="d:isbn" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="issn" mode="bibliomixed.mode">
+<xsl:template match="d:issn" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="issuenum" mode="bibliomixed.mode">
+<xsl:template match="d:issuenum" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="lineage" mode="bibliomixed.mode">
+<xsl:template match="d:lineage" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="orgname" mode="bibliomixed.mode">
+<xsl:template match="d:orgname" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="bibliomixed.mode">
+<xsl:template match="d:othercredit" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="othername" mode="bibliomixed.mode">
+<xsl:template match="d:othername" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="bibliomixed.mode">
+<xsl:template match="d:pagenums" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="printhistory" mode="bibliomixed.mode">
+<xsl:template match="d:printhistory" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="productname" mode="bibliomixed.mode">
+<xsl:template match="d:productname" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="productnumber" mode="bibliomixed.mode">
+<xsl:template match="d:productnumber" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="bibliomixed.mode">
+<xsl:template match="d:pubdate" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="publisher" mode="bibliomixed.mode">
+<xsl:template match="d:publisher" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="publishername" mode="bibliomixed.mode">
+<xsl:template match="d:publishername" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pubsnumber" mode="bibliomixed.mode">
+<xsl:template match="d:pubsnumber" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="bibliomixed.mode">
+<xsl:template match="d:releaseinfo" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="bibliomixed.mode">
+<xsl:template match="d:revhistory" mode="bibliomixed.mode">
   <!-- suppressed; how could this be represented? -->
 </xsl:template>
 
-<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
+<xsl:template match="d:seriesvolnums" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="bibliomixed.mode">
+<xsl:template match="d:subtitle" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="surname" mode="bibliomixed.mode">
+<xsl:template match="d:surname" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="title" mode="bibliomixed.mode">
+<xsl:template match="d:title" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="bibliomixed.mode">
+<xsl:template match="d:titleabbrev" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="volumenum" mode="bibliomixed.mode">
+<xsl:template match="d:volumenum" mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+<xsl:template match="d:bibliocoverage|d:biblioid|d:bibliorelation|d:bibliosource"
               mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
 </xsl:template>
 
 <!-- See FR #1934434 and http://doi.org -->
-<xsl:template match="biblioid[@class='doi']"
+<xsl:template match="d:biblioid[@class='doi']"
               mode="bibliomixed.mode">
   <span>
     <xsl:call-template name="common.html.attributes"/>
index 5665724783cad7c7483bada1ab6b2002bd5e3d93..26ab84367b1b573982dfcd6b1fc5abe01faf3dcb 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -13,7 +15,7 @@
 <!-- ==================================================================== -->
 <!-- What should we do about styling blockinfo? -->
 
-<xsl:template match="blockinfo|info">
+<xsl:template match="d:blockinfo|d:info">
   <!-- suppress -->
 </xsl:template>
 
@@ -30,7 +32,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="para">
+<xsl:template match="d:para">
   <xsl:call-template name="paragraph">
     <xsl:with-param name="class">
       <xsl:if test="@role and $para.propagates.style != 0">
@@ -38,9 +40,9 @@
       </xsl:if>
     </xsl:with-param>
     <xsl:with-param name="content">
-      <xsl:if test="position() = 1 and parent::listitem">
+      <xsl:if test="position() = 1 and parent::d:listitem">
         <xsl:call-template name="anchor">
-          <xsl:with-param name="node" select="parent::listitem"/>
+          <xsl:with-param name="node" select="parent::d:listitem"/>
         </xsl:call-template>
       </xsl:if>
 
@@ -86,7 +88,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="simpara">
+<xsl:template match="d:simpara">
   <!-- see also listitem/simpara in lists.xsl -->
   <p>
     <xsl:call-template name="id.attribute"/>
   </p>
 </xsl:template>
 
-<xsl:template match="formalpara">
+<xsl:template match="d:formalpara">
   <xsl:call-template name="paragraph">
     <xsl:with-param name="class">
       <xsl:if test="@role and $para.propagates.style != 0">
 </xsl:template>
 
 <!-- Only use title from info -->
-<xsl:template match="formalpara/info">
-  <xsl:apply-templates select="title"/>
+<xsl:template match="d:formalpara/d:info">
+  <xsl:apply-templates select="d:title"/>
 </xsl:template>
 
-<xsl:template match="formalpara/title|formalpara/info/title">
+<xsl:template match="d:formalpara/d:title|d:formalpara/d:info/d:title">
   <xsl:variable name="titleStr">
       <xsl:apply-templates/>
   </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="formalpara/para">
+<xsl:template match="d:formalpara/d:para">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="blockquote">
+<xsl:template match="d:blockquote">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
 
     <xsl:choose>
-      <xsl:when test="attribution">
+      <xsl:when test="d:attribution">
         <table border="{$table.border.off}" class="blockquote">
           <xsl:if test="$css.decoration != 0">
             <xsl:attribute name="style">
             <td width="10%" valign="top">&#160;</td>
             <td colspan="2" align="{$direction.align.end}" valign="top">
               <xsl:text>--</xsl:text>
-              <xsl:apply-templates select="attribution"/>
+              <xsl:apply-templates select="d:attribution"/>
             </td>
           </tr>
         </table>
   </div>
 </xsl:template>
 
-<xsl:template match="blockquote/title|blockquote/info/title">
+<xsl:template match="d:blockquote/d:title|d:blockquote/d:info/d:title">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <div class="blockquote-title">
 </xsl:template>
 
 <!-- Use an em dash per Chicago Manual of Style and https://sourceforge.net/tracker/index.php?func=detail&aid=2793878&group_id=21935&atid=373747 -->
-<xsl:template match="epigraph">
+<xsl:template match="d:epigraph">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
-    <xsl:if test="attribution">
+    <xsl:if test="d:attribution">
       <div class="attribution">
-        <span>&#x2014;<xsl:apply-templates select="attribution"/></span>
+        <span>&#x2014;<xsl:apply-templates select="d:attribution"/></span>
       </div>
     </xsl:if>
   </div>
 </xsl:template>
 
-<xsl:template match="attribution">
+<xsl:template match="d:attribution">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="sidebar">
+<xsl:template match="d:sidebar">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="abstract/title|sidebar/title">
+<xsl:template match="d:abstract/d:title|d:sidebar/d:title">
 </xsl:template>
 
-<xsl:template match="sidebar/sidebarinfo|sidebar/info"/>
+<xsl:template match="d:sidebar/d:sidebarinfo|d:sidebar/d:info"/>
 
-<xsl:template match="abstract">
+<xsl:template match="d:abstract">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="anchor"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="msgset">
+<xsl:template match="d:msgset">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgentry">
+<xsl:template match="d:msgentry">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="simplemsgentry">
+<xsl:template match="d:simplemsgentry">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msg">
+<xsl:template match="d:msg">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msgmain">
+<xsl:template match="d:msgmain">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgmain/title">
+<xsl:template match="d:msgmain/d:title">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <span class="msgmain-title">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="msgsub">
+<xsl:template match="d:msgsub">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgsub/title">
+<xsl:template match="d:msgsub/d:title">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <span class="msgsub-title">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="msgrel">
+<xsl:template match="d:msgrel">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msgrel/title">
+<xsl:template match="d:msgrel/d:title">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <span class="msgrel-title">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="msgtext">
+<xsl:template match="d:msgtext">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="msginfo">
+<xsl:template match="d:msginfo">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msglevel">
+<xsl:template match="d:msglevel">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <div class="msglevel">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="msgorig">
+<xsl:template match="d:msgorig">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <div class="msgorig">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="msgaud">
+<xsl:template match="d:msgaud">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <div class="msgaud">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="msgexplan">
+<xsl:template match="d:msgexplan">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
-<xsl:template match="msgexplan/title">
+<xsl:template match="d:msgexplan/d:title">
   <xsl:choose>
     <xsl:when test="$make.clean.html != 0">
       <div class="msgexplan">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="revhistory">
+<xsl:template match="d:revhistory">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="revhistory/revision">
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate"   select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
+<xsl:template match="d:revhistory/d:revision">
+  <xsl:variable name="revnumber" select="d:revnumber"/>
+  <xsl:variable name="revdate"   select="d:date"/>
+  <xsl:variable name="revauthor" select="d:authorinitials|d:author"/>
+  <xsl:variable name="revremark" select="d:revremark|d:revdescription"/>
   <tr>
     <td align="{$direction.align.start}">
       <xsl:if test="$revnumber">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="revision/revnumber">
+<xsl:template match="d:revision/d:revnumber">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/date">
+<xsl:template match="d:revision/d:date">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/authorinitials">
+<xsl:template match="d:revision/d:authorinitials">
   <xsl:text>, </xsl:text>
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/authorinitials[1]" priority="2">
+<xsl:template match="d:revision/d:authorinitials[1]" priority="2">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/revremark">
+<xsl:template match="d:revision/d:revremark">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="revision/revdescription">
+<xsl:template match="d:revision/d:revdescription">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="ackno|acknowledgements[parent::article]">
+<xsl:template match="d:ackno|d:acknowledgements[parent::d:article]">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="highlights">
+<xsl:template match="d:highlights">
   <xsl:call-template name="block.object"/>
 </xsl:template>
 
index 5ecd36ce0194c080807d3b18ce503386fa9e0d31..635927dc0f32d3bb67e9f4a997d4912e5733e482 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
                 xmlns:xverb="xalan://com.nwalsh.xalan.Verbatim"
                 xmlns:lxslt="http://xml.apache.org/xslt"
-                exclude-result-prefixes="sverb xverb lxslt"
+                exclude-result-prefixes="sverb xverb lxslt d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -17,8 +18,8 @@
 <lxslt:component prefix="xverb"
                  functions="insertCallouts"/>
 
-<xsl:template match="programlistingco|screenco">
-  <xsl:variable name="verbatim" select="programlisting|screen"/>
+<xsl:template match="d:programlistingco|d:screenco">
+  <xsl:variable name="verbatim" select="d:programlisting|d:screen"/>
 
   <xsl:choose>
     <xsl:when test="$use.extensions != '0'
       <xsl:variable name="rtf-with-callouts">
         <xsl:choose>
           <xsl:when test="function-available('sverb:insertCallouts')">
-            <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
+            <xsl:copy-of select="sverb:insertCallouts(d:areaspec,$rtf)"/>
           </xsl:when>
           <xsl:when test="function-available('xverb:insertCallouts')">
-            <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
+            <xsl:copy-of select="xverb:insertCallouts(d:areaspec,$rtf)"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:message terminate="yes">
@@ -54,9 +55,9 @@
             <xsl:call-template name="number.rtf.lines">
               <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
               <xsl:with-param name="pi.context"
-                              select="programlisting|screen"/>
+                              select="d:programlisting|d:screen"/>
             </xsl:call-template>
-            <xsl:apply-templates select="calloutlist"/>
+            <xsl:apply-templates select="d:calloutlist"/>
           </div>
         </xsl:when>
         <xsl:otherwise>
@@ -64,7 +65,7 @@
             <xsl:call-template name="common.html.attributes"/>
             <xsl:call-template name="id.attribute"/>
             <xsl:copy-of select="$rtf-with-callouts"/>
-            <xsl:apply-templates select="calloutlist"/>
+            <xsl:apply-templates select="d:calloutlist"/>
           </div>
         </xsl:otherwise>
       </xsl:choose>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="areaspec|areaset|area">
+<xsl:template match="d:areaspec|d:areaset|d:area">
 </xsl:template>
 
-<xsl:template match="areaset" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
+<xsl:template match="d:areaset" mode="conumber">
+  <xsl:number count="d:area|d:areaset" format="1"/>
 </xsl:template>
 
-<xsl:template match="area" mode="conumber">
-  <xsl:number count="area|areaset" format="1"/>
+<xsl:template match="d:area" mode="conumber">
+  <xsl:number count="d:area|d:areaset" format="1"/>
 </xsl:template>
 
-<xsl:template match="co" name="co">
+<xsl:template match="d:co" name="co">
   <!-- Support a single linkend in HTML -->
   <xsl:variable name="targets" select="key('id', @linkends)"/>
   <xsl:variable name="target" select="$targets[1]"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="coref">
+<xsl:template match="d:coref">
   <!-- tricky; this relies on the fact that we can process the "co" that's -->
   <!-- "over there" as if it were "right here" -->
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="co" mode="callout-bug">
+<xsl:template match="d:co" mode="callout-bug">
   <xsl:call-template name="callout-bug">
     <xsl:with-param name="conum">
-      <xsl:number count="co"
+      <xsl:number count="d:co"
                   level="any"
-                  from="programlisting|screen|literallayout|synopsis"
+                  from="d:programlisting|d:screen|d:literallayout|d:synopsis"
                   format="1"/>
     </xsl:with-param>
   </xsl:call-template>
index ab2b30a7a7bf71d13e27502c51ff1b628a2a3435..ae2d95bff5bcb71aa9055ad7d0329f42d957ccf5 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <!-- ********************************************************************
 
index 3ea82498d4ca773d002926c5c56f4201eccac7d5..f6adfcff70fb2a50aa016e12bbb378112b88c9e1 100644 (file)
@@ -1,8 +1,9 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
                version="1.0"
-                exclude-result-prefixes="exsl cf">
+                exclude-result-prefixes="exsl cf d">
 
 <!-- ********************************************************************
 
index db5ab0f02793c176ef9fe6088165f7e782e2e27a..69f1e15543341ae93c7edaa22e1afb6a2d063111 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
-                exclude-result-prefixes="exsl cf"
+                exclude-result-prefixes="exsl cf d"
                 version="1.0">
 
 <!-- ********************************************************************
@@ -80,7 +81,7 @@
         <xsl:value-of select="$html.ext"/>
       </xsl:when>
       <!-- Special case -->
-      <xsl:when test="self::legalnotice and not($generate.legalnotice.link = 0)">
+      <xsl:when test="self::d:legalnotice and not($generate.legalnotice.link = 0)">
         <xsl:choose>
           <xsl:when test="(@id or @xml:id) and not($use.id.as.filename = 0)">
             <!-- * if this legalnotice has an ID, then go ahead and use -->
     </xsl:when>
 
     <!-- treat nested set separate from root -->
-    <xsl:when test="self::set and ancestor::set">
+    <xsl:when test="self::d:set and ancestor::d:set">
       <xsl:text>se</xsl:text>
       <xsl:number level="any" format="01"/>
       <xsl:if test="not($recursive)">
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::set">
+    <xsl:when test="self::d:set">
       <xsl:value-of select="$root.filename"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::book">
+    <xsl:when test="self::d:book">
       <xsl:text>bk</xsl:text>
       <xsl:number level="any" format="01"/>
       <xsl:if test="not($recursive)">
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::article">
-      <xsl:if test="/set">
+    <xsl:when test="self::d:article">
+      <xsl:if test="/d:set">
         <!-- in a set, make sure we inherit the right book info... -->
         <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
           <xsl:with-param name="recursive" select="true()"/>
       </xsl:if>
 
       <xsl:text>ar</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::preface">
-      <xsl:if test="/set">
+    <xsl:when test="self::d:preface">
+      <xsl:if test="/d:set">
         <!-- in a set, make sure we inherit the right book info... -->
         <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
           <xsl:with-param name="recursive" select="true()"/>
       </xsl:if>
 
       <xsl:text>pr</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::chapter">
-      <xsl:if test="/set">
+    <xsl:when test="self::d:chapter">
+      <xsl:if test="/d:set">
         <!-- in a set, make sure we inherit the right book info... -->
         <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
           <xsl:with-param name="recursive" select="true()"/>
       </xsl:if>
 
       <xsl:text>ch</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::appendix">
-      <xsl:if test="/set">
+    <xsl:when test="self::d:appendix">
+      <xsl:if test="/d:set">
         <!-- in a set, make sure we inherit the right book info... -->
         <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
           <xsl:with-param name="recursive" select="true()"/>
       </xsl:if>
 
       <xsl:text>ap</xsl:text>
-      <xsl:number level="any" format="a" from="book"/>
+      <xsl:number level="any" format="a" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::part">
+    <xsl:when test="self::d:part">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>pt</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::reference">
+    <xsl:when test="self::d:reference">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>rn</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::refentry">
+    <xsl:when test="self::d:refentry">
       <xsl:choose>
-        <xsl:when test="parent::reference">
+        <xsl:when test="parent::d:reference">
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:if test="/set">
+          <xsl:if test="/d:set">
             <!-- in a set, make sure we inherit the right book info... -->
             <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
               <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>re</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::colophon">
+    <xsl:when test="self::d:colophon">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>co</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::sect1
-                    or self::sect2
-                    or self::sect3
-                    or self::sect4
-                    or self::sect5
-                    or self::section">
+    <xsl:when test="self::d:sect1
+                    or self::d:sect2
+                    or self::d:sect3
+                    or self::d:sect4
+                    or self::d:sect5
+                    or self::d:section">
       <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
         <xsl:with-param name="recursive" select="true()"/>
       </xsl:apply-templates>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::bibliography">
+    <xsl:when test="self::d:bibliography">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>bi</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::glossary">
+    <xsl:when test="self::d:glossary">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>go</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::index">
+    <xsl:when test="self::d:index">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>ix</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::setindex">
+    <xsl:when test="self::d:setindex">
       <xsl:text>si</xsl:text>
-      <xsl:number level="any" format="01" from="set"/>
+      <xsl:number level="any" format="01" from="d:set"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     </xsl:when>
 
-    <xsl:when test="self::topic">
+    <xsl:when test="self::d:topic">
       <xsl:choose>
-        <xsl:when test="/set">
+        <xsl:when test="/d:set">
           <!-- in a set, make sure we inherit the right book info... -->
           <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
             <xsl:with-param name="recursive" select="true()"/>
       </xsl:choose>
 
       <xsl:text>to</xsl:text>
-      <xsl:number level="any" format="01" from="book"/>
+      <xsl:number level="any" format="01" from="d:book"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
     <xsl:otherwise>
       <xsl:text>chunk-filename-error-</xsl:text>
       <xsl:value-of select="name(.)"/>
-      <xsl:number level="any" format="01" from="set"/>
+      <xsl:number level="any" format="01" from="d:set"/>
       <xsl:if test="not($recursive)">
         <xsl:value-of select="$html.ext"/>
       </xsl:if>
 </xsl:template>
 
 <!-- Leave legalnotice chunk out of the list for Next and Prev -->
-<xsl:template match="legalnotice" mode="find.chunks"/>
+<xsl:template match="d:legalnotice" mode="find.chunks"/>
 
 <xsl:template match="/">
   <!-- * Get a title for current doc so that we let the user -->
   </xsl:variable>
   <xsl:choose>
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
 
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
 
 <!-- ====================================================================== -->
 
-<xsl:template match="set|book|part|preface|chapter|appendix
-                     |article
-                     |topic
-                     |reference|refentry
-                     |book/glossary|article/glossary|part/glossary
-                     |book/bibliography|article/bibliography|part/bibliography
-                     |colophon">
+<xsl:template match="d:set|d:book|d:part|d:preface|d:chapter|d:appendix
+                     |d:article
+                     |d:topic
+                     |d:reference|d:refentry
+                     |d:book/d:glossary|d:article/d:glossary|d:part/d:glossary
+                     |d:book/d:bibliography|d:article/d:bibliography|d:part/d:bibliography
+                     |d:colophon">
   <xsl:choose>
     <xsl:when test="$onechunk != 0 and parent::*">
       <xsl:apply-imports/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+<xsl:template match="d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section">
   <xsl:variable name="ischunk">
     <xsl:call-template name="chunk"/>
   </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="setindex
-                     |book/index
-                     |article/index
-                     |part/index">
+<xsl:template match="d:setindex
+                     |d:book/d:index
+                     |d:article/d:index
+                     |d:part/d:index">
   <!-- some implementations use completely empty index tags to indicate -->
   <!-- where an automatically generated index should be inserted. so -->
   <!-- if the index is completely empty, skip it. -->
 </xsl:template>
 
 <!-- ==================================================================== -->
-<xsl:template match="set|book|part|preface|chapter|appendix
-                     |article
-                     |topic
-                     |reference|refentry
-                     |sect1|sect2|sect3|sect4|sect5
-                     |section
-                     |book/glossary|article/glossary|part/glossary
-                     |book/bibliography|article/bibliography|part/bibliography
-                     |colophon"
+<xsl:template match="d:set|d:book|d:part|d:preface|d:chapter|d:appendix
+                     |d:article
+                     |d:topic
+                     |d:reference|d:refentry
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
+                     |d:section
+                     |d:book/d:glossary|d:article/d:glossary|d:part/d:glossary
+                     |d:book/d:bibliography|d:article/d:bibliography|d:part/d:bibliography
+                     |d:colophon"
               mode="enumerate-files">
   <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
   <xsl:if test="$ischunk='1'">
   <xsl:apply-templates select="*" mode="enumerate-files"/>
 </xsl:template>
 
-<xsl:template match="book/index|article/index|part/index"
+<xsl:template match="d:book/d:index|d:article/d:index|d:part/d:index"
               mode="enumerate-files">
   <xsl:if test="$htmlhelp.output != 1">
     <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="enumerate-files">
+<xsl:template match="d:legalnotice" mode="enumerate-files">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   <xsl:if test="$generate.legalnotice.link != 0">
     <xsl:call-template name="make-relative-filename">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="enumerate-files">
+<xsl:template match="d:revhistory" mode="enumerate-files">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
   <xsl:if test="$generate.revhistory.link != 0">
     <xsl:call-template name="make-relative-filename">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files">
+<xsl:template match="d:mediaobject[d:imageobject] | d:inlinemediaobject[d:imageobject]" mode="enumerate-files">
   <xsl:variable name="longdesc.uri">
     <xsl:call-template name="longdesc.uri">
       <xsl:with-param name="mediaobject"
   </xsl:variable>
   <xsl:variable name="mediaobject" select="."/>
 
-  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
+  <xsl:if test="$html.longdesc != 0 and $mediaobject/d:textobject[not(d:phrase)]">
     <xsl:call-template name="longdesc.uri">
       <xsl:with-param name="mediaobject" select="$mediaobject"/>
     </xsl:call-template>
index 32e0102d24102a54fec187dc24b5b1b11a91f510..e66722e5a825e0ce4a5f9f7354aac68e24e54d18 100644 (file)
@@ -1,8 +1,9 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
                 version="1.0"
-                exclude-result-prefixes="exsl cf">
+                exclude-result-prefixes="exsl cf d">
 
 <!-- ********************************************************************
 
     <xsl:choose>
       <!-- Do we need to fix namespace? -->
       <xsl:when test="$exsl.node.set.available != 0 and 
-                    namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                    namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
         <xsl:if test="$chunk.quietly = 0">
           <xsl:message>Computing chunks...</xsl:message>
         </xsl:if>
-        <xsl:apply-templates mode="find.chunks" select="exsl:node-set($no.namespace)"/>
+        <xsl:apply-templates mode="find.chunks" select="exsl:node-set($with.namespace)"/>
       </xsl:when>
       <xsl:when test="$exsl.node.set.available != 0">
         <xsl:if test="$chunk.quietly = 0">
        http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
 
   <xsl:variable name="prev-v1"
-     select="(ancestor::sect1[$chunk.section.depth &gt; 0 
+     select="(ancestor::d:sect1[$chunk.section.depth &gt; 0
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect1][1]
+                               and preceding-sibling::d:sect1][1]
 
-             |ancestor::sect2[$chunk.section.depth &gt; 1
+             |ancestor::d:sect2[$chunk.section.depth &gt; 1
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect2
-                               and parent::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect2
+                               and parent::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |ancestor::sect3[$chunk.section.depth &gt; 2
+             |ancestor::d:sect3[$chunk.section.depth &gt; 2
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect3
-                               and parent::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect3
+                               and parent::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |ancestor::sect4[$chunk.section.depth &gt; 3
+             |ancestor::d:sect4[$chunk.section.depth &gt; 3
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect4
-                               and parent::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect4
+                               and parent::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |ancestor::sect5[$chunk.section.depth &gt; 4
+             |ancestor::d:sect5[$chunk.section.depth &gt; 4
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect5
-                               and parent::sect4[preceding-sibling::sect4]
-                               and ancestor::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect5
+                               and parent::d:sect4[preceding-sibling::d:sect4]
+                               and ancestor::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)
+             |ancestor::d:section[$chunk.section.depth &gt; count(ancestor::d:section)
                                    and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                                and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+                                and not(ancestor::d:section[not(preceding-sibling::d:section)])][1])[last()]"/>
 
   <xsl:variable name="prev-v2"
-     select="(preceding::sect1[$chunk.section.depth &gt; 0
+     select="(preceding::d:sect1[$chunk.section.depth &gt; 0
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect1][1]
+                               and preceding-sibling::d:sect1][1]
 
-             |preceding::sect2[$chunk.section.depth &gt; 1
+             |preceding::d:sect2[$chunk.section.depth &gt; 1
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect2
-                               and parent::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect2
+                               and parent::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |preceding::sect3[$chunk.section.depth &gt; 2
+             |preceding::d:sect3[$chunk.section.depth &gt; 2
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect3
-                               and parent::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect3
+                               and parent::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |preceding::sect4[$chunk.section.depth &gt; 3
+             |preceding::d:sect4[$chunk.section.depth &gt; 3
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect4
-                               and parent::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect4
+                               and parent::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |preceding::sect5[$chunk.section.depth &gt; 4
+             |preceding::d:sect5[$chunk.section.depth &gt; 4
                                and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect5
-                               and parent::sect4[preceding-sibling::sect4]
-                               and ancestor::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect5
+                               and parent::d:sect4[preceding-sibling::d:sect4]
+                               and ancestor::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |preceding::section[$chunk.section.depth &gt; count(ancestor::section)
+             |preceding::d:section[$chunk.section.depth &gt; count(ancestor::d:section)
                                     and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                                 and preceding-sibling::section
-                                 and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+                                 and preceding-sibling::d:section
+                                 and not(ancestor::d:section[not(preceding-sibling::d:section)])][1])[last()]"/>
 
   <xsl:variable name="prev"
-    select="(preceding::book[1]
-             |preceding::preface[1]
-             |preceding::chapter[1]
-             |preceding::appendix[1]
-             |preceding::part[1]
-             |preceding::reference[1]
-             |preceding::refentry[1]
-             |preceding::colophon[1]
-             |preceding::article[1]
-             |preceding::topic[1]
-             |preceding::bibliography[parent::article or parent::book or parent::part][1]
-             |preceding::glossary[parent::article or parent::book or parent::part][1]
-             |preceding::index[$generate.index != 0]
-                               [parent::article or parent::book or parent::part][1]
-             |preceding::setindex[$generate.index != 0][1]
-             |ancestor::set
-             |ancestor::book[1]
-             |ancestor::preface[1]
-             |ancestor::chapter[1]
-             |ancestor::appendix[1]
-             |ancestor::part[1]
-             |ancestor::reference[1]
-             |ancestor::article[1]
-             |ancestor::topic[1]
+    select="(preceding::d:book[1]
+             |preceding::d:preface[1]
+             |preceding::d:chapter[1]
+             |preceding::d:appendix[1]
+             |preceding::d:part[1]
+             |preceding::d:reference[1]
+             |preceding::d:refentry[1]
+             |preceding::d:colophon[1]
+             |preceding::d:article[1]
+             |preceding::d:topic[1]
+             |preceding::d:bibliography[parent::d:article or parent::d:book or parent::d:part][1]
+             |preceding::d:glossary[parent::d:article or parent::d:book or parent::d:part][1]
+             |preceding::d:index[$generate.index != 0]
+                               [parent::d:article or parent::d:book or parent::d:part][1]
+             |preceding::d:setindex[$generate.index != 0][1]
+             |ancestor::d:set
+             |ancestor::d:book[1]
+             |ancestor::d:preface[1]
+             |ancestor::d:chapter[1]
+             |ancestor::d:appendix[1]
+             |ancestor::d:part[1]
+             |ancestor::d:reference[1]
+             |ancestor::d:article[1]
+             |ancestor::d:topic[1]
              |$prev-v1
              |$prev-v2)[last()]"/>
 
   <xsl:variable name="next-v1"
-    select="(following::sect1[$chunk.section.depth &gt; 0
+    select="(following::d:sect1[$chunk.section.depth &gt; 0
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect1][1]
+                               and preceding-sibling::d:sect1][1]
 
-             |following::sect2[$chunk.section.depth &gt; 1
+             |following::d:sect2[$chunk.section.depth &gt; 1
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect2
-                               and parent::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect2
+                               and parent::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |following::sect3[$chunk.section.depth &gt; 2
+             |following::d:sect3[$chunk.section.depth &gt; 2
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect3
-                               and parent::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect3
+                               and parent::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |following::sect4[$chunk.section.depth &gt; 3
+             |following::d:sect4[$chunk.section.depth &gt; 3
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect4
-                               and parent::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect4
+                               and parent::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |following::sect5[$chunk.section.depth &gt; 4
+             |following::d:sect5[$chunk.section.depth &gt; 4
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect5
-                               and parent::sect4[preceding-sibling::sect4]
-                               and ancestor::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect5
+                               and parent::d:sect4[preceding-sibling::d:sect4]
+                               and ancestor::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |following::section[$chunk.section.depth &gt; count(ancestor::section)
+             |following::d:section[$chunk.section.depth &gt; count(ancestor::d:section)
                                     and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                                 and preceding-sibling::section 
-                                 and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
+                                 and preceding-sibling::d:section
+                                 and not(ancestor::d:section[not(preceding-sibling::d:section)])][1])[1]"/>
 
   <xsl:variable name="next-v2"
-    select="(descendant::sect1[$chunk.section.depth &gt; 0
+    select="(descendant::d:sect1[$chunk.section.depth &gt; 0
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect1][1]
+                               and preceding-sibling::d:sect1][1]
 
-             |descendant::sect2[$chunk.section.depth &gt; 1
+             |descendant::d:sect2[$chunk.section.depth &gt; 1
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect2
-                               and parent::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect2
+                               and parent::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |descendant::sect3[$chunk.section.depth &gt; 2
+             |descendant::d:sect3[$chunk.section.depth &gt; 2
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect3
-                               and parent::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect3
+                               and parent::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |descendant::sect4[$chunk.section.depth &gt; 3
+             |descendant::d:sect4[$chunk.section.depth &gt; 3
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect4
-                               and parent::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect4
+                               and parent::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |descendant::sect5[$chunk.section.depth &gt; 4
+             |descendant::d:sect5[$chunk.section.depth &gt; 4
                                   and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                               and preceding-sibling::sect5
-                               and parent::sect4[preceding-sibling::sect4]
-                               and ancestor::sect3[preceding-sibling::sect3]
-                               and ancestor::sect2[preceding-sibling::sect2]
-                               and ancestor::sect1[preceding-sibling::sect1]][1]
+                               and preceding-sibling::d:sect5
+                               and parent::d:sect4[preceding-sibling::d:sect4]
+                               and ancestor::d:sect3[preceding-sibling::d:sect3]
+                               and ancestor::d:sect2[preceding-sibling::d:sect2]
+                               and ancestor::d:sect1[preceding-sibling::d:sect1]][1]
 
-             |descendant::section[$chunk.section.depth &gt; count(ancestor::section)
+             |descendant::d:section[$chunk.section.depth &gt; count(ancestor::d:section)
                                     and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])
-                                 and preceding-sibling::section
-                                 and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
+                                 and preceding-sibling::d:section
+                                 and not(ancestor::d:section[not(preceding-sibling::d:section)])])[1]"/>
 
   <xsl:variable name="next"
-    select="(following::book[1]
-             |following::preface[1]
-             |following::chapter[1]
-             |following::appendix[1]
-             |following::part[1]
-             |following::reference[1]
-             |following::refentry[1]
-             |following::colophon[1]
-             |following::bibliography[parent::article or parent::book or parent::part][1]
-             |following::glossary[parent::article or parent::book or parent::part][1]
-             |following::index[$generate.index != 0]
-                               [parent::article or parent::book or parent::part][1]
-             |following::article[1]
-             |following::topic[1]
-             |following::setindex[$generate.index != 0][1]
-             |descendant::book[1]
-             |descendant::preface[1]
-             |descendant::chapter[1]
-             |descendant::appendix[1]
-             |descendant::article[1]
-             |descendant::topic[1]
-             |descendant::bibliography[parent::article or parent::book or parent::part][1]
-             |descendant::glossary[parent::article or parent::book or parent::part][1]
-             |descendant::index[$generate.index != 0]
-                               [parent::article or parent::book or parent::part][1]
-             |descendant::colophon[1]
-             |descendant::setindex[$generate.index != 0][1]
-             |descendant::part[1]
-             |descendant::reference[1]
-             |descendant::refentry[1]
+    select="(following::d:book[1]
+             |following::d:preface[1]
+             |following::d:chapter[1]
+             |following::d:appendix[1]
+             |following::d:part[1]
+             |following::d:reference[1]
+             |following::d:refentry[1]
+             |following::d:colophon[1]
+             |following::d:bibliography[parent::d:article or parent::d:book or parent::d:part][1]
+             |following::d:glossary[parent::d:article or parent::d:book or parent::d:part][1]
+             |following::d:index[$generate.index != 0]
+                               [parent::d:article or parent::d:book or parent::d:part][1]
+             |following::d:article[1]
+             |following::d:topic[1]
+             |following::d:setindex[$generate.index != 0][1]
+             |descendant::d:book[1]
+             |descendant::d:preface[1]
+             |descendant::d:chapter[1]
+             |descendant::d:appendix[1]
+             |descendant::d:article[1]
+             |descendant::d:topic[1]
+             |descendant::d:bibliography[parent::d:article or parent::d:book or parent::d:part][1]
+             |descendant::d:glossary[parent::d:article or parent::d:book or parent::d:part][1]
+             |descendant::d:index[$generate.index != 0]
+                               [parent::d:article or parent::d:book or parent::d:part][1]
+             |descendant::d:colophon[1]
+             |descendant::d:setindex[$generate.index != 0][1]
+             |descendant::d:part[1]
+             |descendant::d:reference[1]
+             |descendant::d:refentry[1]
              |$next-v1
              |$next-v2)[1]"/>
 
   </xsl:param>
 
   <xsl:variable name="prev-v1"
-    select="(preceding::sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |preceding::sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |preceding::sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |preceding::sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |preceding::sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |preceding::section[$chunk.section.depth &gt; count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
+    select="(preceding::d:sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |preceding::d:sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |preceding::d:sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |preceding::d:sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |preceding::d:sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |preceding::d:section[$chunk.section.depth &gt; count(ancestor::d:section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
 
   <xsl:variable name="prev-v2"
-    select="(ancestor::sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |ancestor::sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |ancestor::sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |ancestor::sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |ancestor::sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |ancestor::section[$chunk.section.depth &gt; count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
+    select="(ancestor::d:sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |ancestor::d:sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |ancestor::d:sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |ancestor::d:sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |ancestor::d:sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |ancestor::d:section[$chunk.section.depth &gt; count(ancestor::d:section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[last()]"/>
 
   <xsl:variable name="prev"
-    select="(preceding::book[1]
-             |preceding::preface[1]
-             |preceding::chapter[1]
-             |preceding::appendix[1]
-             |preceding::part[1]
-             |preceding::reference[1]
-             |preceding::refentry[1]
-             |preceding::colophon[1]
-             |preceding::article[1]
-             |preceding::topic[1]
-             |preceding::bibliography[parent::article or parent::book or parent::part][1]
-             |preceding::glossary[parent::article or parent::book or parent::part][1]
-             |preceding::index[$generate.index != 0]
-                               [parent::article or parent::book or parent::part][1]
-             |preceding::setindex[$generate.index != 0][1]
-             |ancestor::set
-             |ancestor::book[1]
-             |ancestor::preface[1]
-             |ancestor::chapter[1]
-             |ancestor::appendix[1]
-             |ancestor::part[1]
-             |ancestor::reference[1]
-             |ancestor::article[1]
-             |ancestor::topic[1]
+    select="(preceding::d:book[1]
+             |preceding::d:preface[1]
+             |preceding::d:chapter[1]
+             |preceding::d:appendix[1]
+             |preceding::d:part[1]
+             |preceding::d:reference[1]
+             |preceding::d:refentry[1]
+             |preceding::d:colophon[1]
+             |preceding::d:article[1]
+             |preceding::d:topic[1]
+             |preceding::d:bibliography[parent::d:article or parent::d:book or parent::d:part][1]
+             |preceding::d:glossary[parent::d:article or parent::d:book or parent::d:part][1]
+             |preceding::d:index[$generate.index != 0]
+                               [parent::d:article or parent::d:book or parent::d:part][1]
+             |preceding::d:setindex[$generate.index != 0][1]
+             |ancestor::d:set
+             |ancestor::d:book[1]
+             |ancestor::d:preface[1]
+             |ancestor::d:chapter[1]
+             |ancestor::d:appendix[1]
+             |ancestor::d:part[1]
+             |ancestor::d:reference[1]
+             |ancestor::d:article[1]
+             |ancestor::d:topic[1]
              |$prev-v1
              |$prev-v2)[last()]"/>
 
   <xsl:variable name="next-v1"
-    select="(following::sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |following::sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |following::sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |following::sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |following::sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |following::section[$chunk.section.depth &gt; count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
+    select="(following::d:sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |following::d:sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |following::d:sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |following::d:sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |following::d:sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |following::d:section[$chunk.section.depth &gt; count(ancestor::d:section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
 
   <xsl:variable name="next-v2"
-    select="(descendant::sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |descendant::sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |descendant::sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |descendant::sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |descendant::sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
-             |descendant::section[$chunk.section.depth 
-                                  &gt; count(ancestor::section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
+    select="(descendant::d:sect1[$chunk.section.depth &gt; 0 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |descendant::d:sect2[$chunk.section.depth &gt; 1 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |descendant::d:sect3[$chunk.section.depth &gt; 2 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |descendant::d:sect4[$chunk.section.depth &gt; 3 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |descendant::d:sect5[$chunk.section.depth &gt; 4 and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1]
+             |descendant::d:section[$chunk.section.depth 
+                                  &gt; count(ancestor::d:section) and not(ancestor::*/processing-instruction('dbhtml')[normalize-space(.) ='stop-chunking'])][1])[1]"/>
 
   <xsl:variable name="next"
-    select="(following::book[1]
-             |following::preface[1]
-             |following::chapter[1]
-             |following::appendix[1]
-             |following::part[1]
-             |following::reference[1]
-             |following::refentry[1]
-             |following::colophon[1]
-             |following::bibliography[parent::article or parent::book or parent::part][1]
-             |following::glossary[parent::article or parent::book or parent::part][1]
-             |following::index[$generate.index != 0]
-                               [parent::article or parent::book][1]
-             |following::article[1]
-             |following::topic[1]
-             |following::setindex[$generate.index != 0][1]
-             |descendant::book[1]
-             |descendant::preface[1]
-             |descendant::chapter[1]
-             |descendant::appendix[1]
-             |descendant::article[1]
-             |descendant::topic[1]
-             |descendant::bibliography[parent::article or parent::book][1]
-             |descendant::glossary[parent::article or parent::book or parent::part][1]
-             |descendant::index[$generate.index != 0]
-                               [parent::article or parent::book][1]
-             |descendant::colophon[1]
-             |descendant::setindex[$generate.index != 0][1]
-             |descendant::part[1]
-             |descendant::reference[1]
-             |descendant::refentry[1]
+    select="(following::d:book[1]
+             |following::d:preface[1]
+             |following::d:chapter[1]
+             |following::d:appendix[1]
+             |following::d:part[1]
+             |following::d:reference[1]
+             |following::d:refentry[1]
+             |following::d:colophon[1]
+             |following::d:bibliography[parent::d:article or parent::d:book or parent::d:part][1]
+             |following::d:glossary[parent::d:article or parent::d:book or parent::d:part][1]
+             |following::d:index[$generate.index != 0]
+                               [parent::d:article or parent::d:book][1]
+             |following::d:article[1]
+             |following::d:topic[1]
+             |following::d:setindex[$generate.index != 0][1]
+             |descendant::d:book[1]
+             |descendant::d:preface[1]
+             |descendant::d:chapter[1]
+             |descendant::d:appendix[1]
+             |descendant::d:article[1]
+             |descendant::d:topic[1]
+             |descendant::d:bibliography[parent::d:article or parent::d:book][1]
+             |descendant::d:glossary[parent::d:article or parent::d:book or parent::d:part][1]
+             |descendant::d:index[$generate.index != 0]
+                               [parent::d:article or parent::d:book][1]
+             |descendant::d:colophon[1]
+             |descendant::d:setindex[$generate.index != 0][1]
+             |descendant::d:part[1]
+             |descendant::d:reference[1]
+             |descendant::d:refentry[1]
              |$next-v1
              |$next-v2)[1]"/>
 
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'figure'"/>
-                <xsl:with-param name="nodes" select=".//figure"/>
+                <xsl:with-param name="nodes" select=".//d:figure"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'figure'"/>
-            <xsl:with-param name="nodes" select=".//figure"/>
+            <xsl:with-param name="nodes" select=".//d:figure"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'table'"/>
-                <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
+                <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'table'"/>
-            <xsl:with-param name="nodes" select=".//table[not(@tocentry = 0)]"/>
+            <xsl:with-param name="nodes" select=".//d:table[not(@tocentry = 0)]"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'example'"/>
-                <xsl:with-param name="nodes" select=".//example"/>
+                <xsl:with-param name="nodes" select=".//d:example"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'example'"/>
-            <xsl:with-param name="nodes" select=".//example"/>
+            <xsl:with-param name="nodes" select=".//d:example"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'equation'"/>
-                <xsl:with-param name="nodes" select=".//equation[title or info/title]"/>
+                <xsl:with-param name="nodes" select=".//d:equation[d:title or d:info/d:title]"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'equation'"/>
-            <xsl:with-param name="nodes" select=".//equation[title or info/title]"/>
+            <xsl:with-param name="nodes" select=".//d:equation[d:title or d:info/d:title]"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'procedure'"/>
-                <xsl:with-param name="nodes" select=".//procedure[title]"/>
+                <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'procedure'"/>
-            <xsl:with-param name="nodes" select=".//procedure[title]"/>
+            <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
           </xsl:with-param>
           <xsl:with-param name="content">
             <xsl:call-template name="chunk-element-content">
-              <xsl:with-param name="prev" select="/foo"/>
-              <xsl:with-param name="next" select="/foo"/>
+              <xsl:with-param name="prev" select="/d:foo"/>
+              <xsl:with-param name="next" select="/d:foo"/>
               <xsl:with-param name="nav.context" select="'toc'"/>
               <xsl:with-param name="content">
                 <xsl:if test="$chunk.tocs.and.lots.has.title != 0">
       <xsl:with-param name="filename" select="$filename"/>
       <xsl:with-param name="content">
         <xsl:call-template name="chunk-element-content">
-          <xsl:with-param name="prev" select="/foo"/>
-          <xsl:with-param name="next" select="/foo"/>
+          <xsl:with-param name="prev" select="/d:foo"/>
+          <xsl:with-param name="next" select="/d:foo"/>
           <xsl:with-param name="nav.context" select="'toc'"/>
           <xsl:with-param name="content">
             <xsl:copy-of select="$lot"/>
 
 <xsl:template name="count.footnotes.in.this.chunk">
   <xsl:param name="node" select="."/>
-  <xsl:param name="footnotes" select="$node//footnote"/>
+  <xsl:param name="footnotes" select="$node//d:footnote"/>
   <xsl:param name="count" select="0"/>
 
 <!--
             <xsl:with-param name="count" select="$count"/>
           </xsl:call-template>
         </xsl:when>
-        <xsl:when test="$footnotes[1]/ancestor::table
-                        |$footnotes[1]/ancestor::informaltable">
+        <xsl:when test="$footnotes[1]/ancestor::d:table
+                        |$footnotes[1]/ancestor::d:informaltable">
           <xsl:call-template name="count.footnotes.in.this.chunk">
             <xsl:with-param name="node" select="$node"/>
             <xsl:with-param name="footnotes"
 
 <xsl:template name="process.footnotes.in.this.chunk">
   <xsl:param name="node" select="."/>
-  <xsl:param name="footnotes" select="$node//footnote"/>
+  <xsl:param name="footnotes" select="$node//d:footnote"/>
 
 <!--
   <xsl:message>process.footnotes.in.this.chunk</xsl:message>
                             select="$footnotes[position() &gt; 1]"/>
           </xsl:call-template>
         </xsl:when>
-        <xsl:when test="$footnotes[1]/ancestor::table
-                        |$footnotes[1]/ancestor::informaltable">
+        <xsl:when test="$footnotes[1]/ancestor::d:table
+                        |$footnotes[1]/ancestor::d:informaltable">
           <xsl:call-template name="process.footnotes.in.this.chunk">
             <xsl:with-param name="node" select="$node"/>
             <xsl:with-param name="footnotes"
 </xsl:template>
 
 <xsl:template name="process.footnotes">
-  <xsl:variable name="footnotes" select=".//footnote"/>
+  <xsl:variable name="footnotes" select=".//d:footnote"/>
   <xsl:variable name="fcount">
     <xsl:call-template name="count.footnotes.in.this.chunk">
       <xsl:with-param name="node" select="."/>
               in this chunk should be referenced. I don't think it
               does any harm to reference them all, but it adds
               unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
+  <xsl:if test="$annotation.support != 0 and //d:annotation">
     <div class="annotation-list">
       <div class="annotation-nocss">
         <p>The following annotations are from this essay. You are seeing
         techniques used to make them appear as â€˜popups’ on modern browsers.</p>
       </div>
 
-      <xsl:apply-templates select="//annotation"
+      <xsl:apply-templates select="//d:annotation"
                            mode="annotation-popup"/>
     </div>
   </xsl:if>
     <xsl:text> cfs: </xsl:text>
     <xsl:value-of select="$chunk.first.sections"/>
     <xsl:text> ps: </xsl:text>
-    <xsl:value-of select="count($node/parent::section)"/>
+    <xsl:value-of select="count($node/parent::d:section)"/>
     <xsl:text> prs: </xsl:text>
-    <xsl:value-of select="count($node/preceding-sibling::section)"/>
+    <xsl:value-of select="count($node/preceding-sibling::d:section)"/>
   </xsl:message>
 -->
 
     <xsl:when test="local-name($node) = 'sect1'
                     and $chunk.section.depth &gt;= 1
                     and ($chunk.first.sections != 0
-                         or count($node/preceding-sibling::sect1) &gt; 0)">
+                         or count($node/preceding-sibling::d:sect1) &gt; 0)">
       <xsl:text>1</xsl:text>
     </xsl:when>
     <xsl:when test="local-name($node) = 'sect2'
                     and $chunk.section.depth &gt;= 2
                     and ($chunk.first.sections != 0
-                         or count($node/preceding-sibling::sect2) &gt; 0)">
+                         or count($node/preceding-sibling::d:sect2) &gt; 0)">
       <xsl:call-template name="chunk">
         <xsl:with-param name="node" select="$node/parent::*"/>
       </xsl:call-template>
     <xsl:when test="local-name($node) = 'sect3'
                     and $chunk.section.depth &gt;= 3
                     and ($chunk.first.sections != 0
-                         or count($node/preceding-sibling::sect3) &gt; 0)">
+                         or count($node/preceding-sibling::d:sect3) &gt; 0)">
       <xsl:call-template name="chunk">
         <xsl:with-param name="node" select="$node/parent::*"/>
       </xsl:call-template>
     <xsl:when test="local-name($node) = 'sect4'
                     and $chunk.section.depth &gt;= 4
                     and ($chunk.first.sections != 0
-                         or count($node/preceding-sibling::sect4) &gt; 0)">
+                         or count($node/preceding-sibling::d:sect4) &gt; 0)">
       <xsl:call-template name="chunk">
         <xsl:with-param name="node" select="$node/parent::*"/>
       </xsl:call-template>
     <xsl:when test="local-name($node) = 'sect5'
                     and $chunk.section.depth &gt;= 5
                     and ($chunk.first.sections != 0
-                         or count($node/preceding-sibling::sect5) &gt; 0)">
+                         or count($node/preceding-sibling::d:sect5) &gt; 0)">
       <xsl:call-template name="chunk">
         <xsl:with-param name="node" select="$node/parent::*"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:when test="local-name($node) = 'section'
-                    and $chunk.section.depth &gt;= count($node/ancestor::section)+1
+                    and $chunk.section.depth &gt;= count($node/ancestor::d:section)+1
                     and ($chunk.first.sections != 0
-                         or count($node/preceding-sibling::section) &gt; 0)">
+                         or count($node/preceding-sibling::d:section) &gt; 0)">
       <xsl:call-template name="chunk">
         <xsl:with-param name="node" select="$node/parent::*"/>
       </xsl:call-template>
 <!-- ==================================================================== -->
 
 <xsl:template name="html.head">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:variable name="this" select="."/>
   <xsl:variable name="home" select="/*[1]"/>
   <xsl:variable name="up" select="parent::*"/>
     </xsl:if>
 
     <xsl:if test="$html.extra.head.links != 0">
-      <xsl:for-each select="//part
-                            |//reference
-                            |//preface
-                            |//chapter
-                            |//article
-                            |//refentry
-                            |//appendix[not(parent::article)]|appendix
-                            |//glossary[not(parent::article)]|glossary
-                            |//index[not(parent::article)]|index">
+      <xsl:for-each select="//d:part
+                            |//d:reference
+                            |//d:preface
+                            |//d:chapter
+                            |//d:article
+                            |//d:refentry
+                            |//d:appendix[not(parent::d:article)]|d:appendix
+                            |//d:glossary[not(parent::d:article)]|d:glossary
+                            |//d:index[not(parent::d:article)]|d:index">
         <link rel="{local-name(.)}">
           <xsl:attribute name="href">
             <xsl:call-template name="href.target">
         </link>
       </xsl:for-each>
 
-      <xsl:for-each select="section|sect1|refsection|refsect1">
+      <xsl:for-each select="d:section|d:sect1|d:refsection|d:refsect1">
         <link>
           <xsl:attribute name="rel">
             <xsl:choose>
         </link>
       </xsl:for-each>
 
-      <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
+      <xsl:for-each select="d:sect2|d:sect3|d:sect4|d:sect5|d:refsect2|d:refsect3">
         <link rel="subsection">
           <xsl:attribute name="href">
             <xsl:call-template name="href.target">
     <!-- * separate page and $html.head.legalnotice.link.types is -->
     <!-- * non-empty, we generate a link or links for each value in -->
     <!-- * $html.head.legalnotice.link.types -->
-    <xsl:if test="//legalnotice
+    <xsl:if test="//d:legalnotice
                   and not($generate.legalnotice.link = 0)
                   and not($html.head.legalnotice.link.types = '')">
       <xsl:call-template name="make.legalnotice.head.links"/>
 <!-- ==================================================================== -->
 
 <xsl:template name="header.navigation">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:param name="nav.context"/>
 
   <xsl:variable name="home" select="/*[1]"/>
 <!-- ==================================================================== -->
 
 <xsl:template name="footer.navigation">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:param name="nav.context"/>
 
   <xsl:variable name="home" select="/*[1]"/>
 <!-- ==================================================================== -->
 
 <xsl:template name="navig.content">
-    <xsl:param name="direction" select="next"/>
+    <xsl:param name="direction" select="d:next"/>
     <xsl:variable name="navtext">
         <xsl:choose>
             <xsl:when test="$direction = 'prev'">
   <!-- * we need it in order to construct the filename for use in the -->
   <!-- * value of the href attribute on the link -->
 
-  <xsl:param name="ln-node" select="(//legalnotice)[1]"/>
+  <xsl:param name="ln-node" select="(//d:legalnotice)[1]"/>
   
   <xsl:param name="linktype">
     <xsl:choose>
         <xsl:value-of select="$file"/>
       </xsl:attribute>
       <xsl:attribute name="title">
-        <xsl:apply-templates select="(//legalnotice)[1]"
+        <xsl:apply-templates select="(//d:legalnotice)[1]"
                              mode="object.title.markup.textonly"/>
       </xsl:attribute>
     </link>
index e67ca754d900814e95426b2efc45cd270e9bf0d6..00d1fd0666f70bad906fc434144934392f6aad95 100644 (file)
@@ -1,7 +1,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                version="1.0"
-                exclude-result-prefixes="exsl">
+                exclude-result-prefixes="exsl d">
 
 <!-- ********************************************************************
 
index a699ba36596ac3cac66ea7ea15b1db299cb56091..3e2cf291327db20aec77e5f008f4f575e774691e 100644 (file)
@@ -1,11 +1,12 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:saxon="http://icl.com/saxon"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:saxon="http://icl.com/saxon"
                 xmlns:lxslt="http://xml.apache.org/xslt"
                 xmlns:redirect="http://xml.apache.org/xalan/redirect"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                version="1.0"
-                exclude-result-prefixes="saxon lxslt redirect exsl doc"
+                exclude-result-prefixes="saxon lxslt redirect exsl doc d"
                 extension-element-prefixes="saxon redirect lxslt exsl">
 
 <!-- ********************************************************************
index d345448bbd93e3c43622684d42f6bc833e227138..3d7fa44929b4824c4b820eab2f4e982170ea964f 100644 (file)
@@ -1,8 +1,9 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"
                version="1.0"
-                exclude-result-prefixes="cf exsl">
+                exclude-result-prefixes="cf exsl d">
 
 <!-- ********************************************************************
 
index c828606fe530fdd48bb6a73cdd5c3baf8f311983..10ff960752ad4829194b3a6829b13e42d7a10b6e 100644 (file)
@@ -1,7 +1,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                version="1.0"
-                exclude-result-prefixes="doc">
+                exclude-result-prefixes="doc d">
 
 <!-- ********************************************************************
 
@@ -29,7 +30,7 @@
   <xsl:variable name="chunks" select="document($chunk.toc,/)"/>
 
   <xsl:choose>
-    <xsl:when test="$chunks//tocentry[@linkend=$id]">1</xsl:when>
+    <xsl:when test="$chunks//d:tocentry[@linkend=$id]">1</xsl:when>
     <xsl:otherwise>0</xsl:otherwise>
   </xsl:choose>
 </xsl:template>
@@ -45,7 +46,7 @@
 
   <xsl:variable name="chunks" select="document($chunk.toc,/)"/>
 
-  <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+  <xsl:variable name="chunk" select="$chunks//d:tocentry[@linkend=$id]"/>
   <xsl:variable name="filename">
     <xsl:call-template name="pi.dbhtml_filename">
       <xsl:with-param name="node" select="$chunk"/>
 
   <xsl:variable name="chunks" select="document($chunk.toc,/)"/>
 
-  <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+  <xsl:variable name="chunk" select="$chunks//d:tocentry[@linkend=$id]"/>
   <xsl:variable name="prev-id"
-                select="($chunk/preceding::tocentry
-                         |$chunk/ancestor::tocentry)[last()]/@linkend"/>
+                select="($chunk/preceding::d:tocentry
+                         |$chunk/ancestor::d:tocentry)[last()]/@linkend"/>
   <xsl:variable name="next-id"
-                select="($chunk/following::tocentry
-                         |$chunk/child::tocentry)[1]/@linkend"/>
+                select="($chunk/following::d:tocentry
+                         |$chunk/child::d:tocentry)[1]/@linkend"/>
 
   <xsl:variable name="prev" select="key('id',$prev-id)"/>
   <xsl:variable name="next" select="key('id',$next-id)"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="set">
+<xsl:template match="d:set">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="book">
+<xsl:template match="d:book">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="book/appendix">
+<xsl:template match="d:book/d:appendix">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="book/glossary">
+<xsl:template match="d:book/d:glossary">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="book/bibliography">
+<xsl:template match="d:book/d:bibliography">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="dedication" mode="dedication">
+<xsl:template match="d:dedication" mode="dedication">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="preface|chapter">
+<xsl:template match="d:preface|d:chapter">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="part|reference">
+<xsl:template match="d:part|d:reference">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="refentry">
+<xsl:template match="d:refentry">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="colophon">
+<xsl:template match="d:colophon">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="article">
+<xsl:template match="d:article">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="topic">
+<xsl:template match="d:topic">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="article/appendix">
+<xsl:template match="d:article/d:appendix">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="article/glossary">
+<xsl:template match="d:article/d:glossary">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="article/bibliography">
+<xsl:template match="d:article/d:bibliography">
   <xsl:call-template name="process-chunk"/>
 </xsl:template>
 
-<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+<xsl:template match="d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:section">
   <xsl:variable name="ischunk">
     <xsl:call-template name="chunk"/>
   </xsl:variable>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="setindex
-                     |book/index
-                     |article/index">
+<xsl:template match="d:setindex
+                     |d:book/d:index
+                     |d:article/d:index">
   <!-- some implementations use completely empty index tags to indicate -->
   <!-- where an automatically generated index should be inserted. so -->
   <!-- if the index is completely empty, skip it. -->
       </xsl:message>
     </xsl:when>
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace is correct -->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'figure'"/>
-                <xsl:with-param name="nodes" select=".//figure"/>
+                <xsl:with-param name="nodes" select=".//d:figure"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'figure'"/>
-            <xsl:with-param name="nodes" select=".//figure"/>
+            <xsl:with-param name="nodes" select=".//d:figure"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'table'"/>
-                <xsl:with-param name="nodes" select=".//table"/>
+                <xsl:with-param name="nodes" select=".//d:table"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'table'"/>
-            <xsl:with-param name="nodes" select=".//table"/>
+            <xsl:with-param name="nodes" select=".//d:table"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'example'"/>
-                <xsl:with-param name="nodes" select=".//example"/>
+                <xsl:with-param name="nodes" select=".//d:example"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'example'"/>
-            <xsl:with-param name="nodes" select=".//example"/>
+            <xsl:with-param name="nodes" select=".//d:example"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'equation'"/>
-                <xsl:with-param name="nodes" select=".//equation"/>
+                <xsl:with-param name="nodes" select=".//d:equation"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'equation'"/>
-            <xsl:with-param name="nodes" select=".//equation"/>
+            <xsl:with-param name="nodes" select=".//d:equation"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
             <xsl:with-param name="lot">
               <xsl:call-template name="list.of.titles">
                 <xsl:with-param name="titles" select="'procedure'"/>
-                <xsl:with-param name="nodes" select=".//procedure[title]"/>
+                <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
               </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         <xsl:otherwise>
           <xsl:call-template name="list.of.titles">
             <xsl:with-param name="titles" select="'procedure'"/>
-            <xsl:with-param name="nodes" select=".//procedure[title]"/>
+            <xsl:with-param name="nodes" select=".//d:procedure[d:title]"/>
           </xsl:call-template>
         </xsl:otherwise>
       </xsl:choose>
           </xsl:with-param>
           <xsl:with-param name="content">
             <xsl:call-template name="chunk-element-content">
-              <xsl:with-param name="prev" select="/foo"/>
-              <xsl:with-param name="next" select="/foo"/>
+              <xsl:with-param name="prev" select="/d:foo"/>
+              <xsl:with-param name="next" select="/d:foo"/>
               <xsl:with-param name="nav.context" select="'toc'"/>
               <xsl:with-param name="content">
                 <h1>
       <xsl:with-param name="filename" select="$filename"/>
       <xsl:with-param name="content">
         <xsl:call-template name="chunk-element-content">
-          <xsl:with-param name="prev" select="/foo"/>
-          <xsl:with-param name="next" select="/foo"/>
+          <xsl:with-param name="prev" select="/d:foo"/>
+          <xsl:with-param name="next" select="/d:foo"/>
           <xsl:with-param name="nav.context" select="'toc'"/>
           <xsl:with-param name="content">
             <xsl:copy-of select="$lot"/>
index 0db1d0d5e42d6e4cfd456d267cd67cf5daae18ea..ea34ecaa680202d74eb01a371279902ea18005db 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
   <xsl:variable name="level">
     <xsl:choose>
       <!-- chapters and other book children should get <h1> -->
-      <xsl:when test="$node/parent::book">0</xsl:when>
-      <xsl:when test="ancestor::section">
-        <xsl:value-of select="count(ancestor::section)+1"/>
+      <xsl:when test="$node/parent::d:book">0</xsl:when>
+      <xsl:when test="ancestor::d:section">
+        <xsl:value-of select="count(ancestor::d:section)+1"/>
       </xsl:when>
-      <xsl:when test="ancestor::sect5">6</xsl:when>
-      <xsl:when test="ancestor::sect4">5</xsl:when>
-      <xsl:when test="ancestor::sect3">4</xsl:when>
-      <xsl:when test="ancestor::sect2">3</xsl:when>
-      <xsl:when test="ancestor::sect1">2</xsl:when>
+      <xsl:when test="ancestor::d:sect5">6</xsl:when>
+      <xsl:when test="ancestor::d:sect4">5</xsl:when>
+      <xsl:when test="ancestor::d:sect3">4</xsl:when>
+      <xsl:when test="ancestor::d:sect2">3</xsl:when>
+      <xsl:when test="ancestor::d:sect1">2</xsl:when>
       <xsl:otherwise>1</xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
 <xsl:template name="component.subtitle">
   <xsl:param name="node" select="."/>
   <xsl:variable name="subtitle"
-                select="($node/docinfo/subtitle
-                        |$node/info/subtitle
-                        |$node/prefaceinfo/subtitle
-                        |$node/chapterinfo/subtitle
-                        |$node/appendixinfo/subtitle
-                        |$node/articleinfo/subtitle
-                        |$node/artheader/subtitle
-                        |$node/subtitle)[1]"/>
+                select="($node/d:docinfo/d:subtitle
+                        |$node/d:info/d:subtitle
+                        |$node/d:prefaceinfo/d:subtitle
+                        |$node/d:chapterinfo/d:subtitle
+                        |$node/d:appendixinfo/d:subtitle
+                        |$node/d:articleinfo/d:subtitle
+                        |$node/d:artheader/d:subtitle
+                        |$node/d:subtitle)[1]"/>
 
   <xsl:if test="$subtitle">
     <h3 class="subtitle">
@@ -77,7 +79,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="dedication" mode="dedication">
+<xsl:template match="d:dedication" mode="dedication">
   <xsl:call-template name="id.warning"/>
 
   <div>
   </div>
 </xsl:template>
 
-<xsl:template match="dedication/title|dedication/info/title" 
+<xsl:template match="d:dedication/d:title|d:dedication/d:info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::dedication[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:dedication[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="dedication/subtitle|dedication/info/subtitle" 
+<xsl:template match="d:dedication/d:subtitle|d:dedication/d:info/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::dedication[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:dedication[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
-<xsl:template match="dedication/title"></xsl:template>
-<xsl:template match="dedication/subtitle"></xsl:template>
-<xsl:template match="dedication/titleabbrev"></xsl:template>
+<xsl:template match="d:dedication"></xsl:template> <!-- see mode="dedication" -->
+<xsl:template match="d:dedication/d:title"></xsl:template>
+<xsl:template match="d:dedication/d:subtitle"></xsl:template>
+<xsl:template match="d:dedication/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="acknowledgements" mode="acknowledgements">
+<xsl:template match="d:acknowledgements" mode="acknowledgements">
   <xsl:call-template name="id.warning"/>
 
   <div>
   </div>
 </xsl:template>
 
-<xsl:template match="acknowledgements/title|acknowledgements/info/title" 
+<xsl:template match="d:acknowledgements/d:title|d:acknowledgements/d:info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::acknowledgements[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:acknowledgements[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="acknowledgements/subtitle|acknowledgements/info/subtitle" 
+<xsl:template match="d:acknowledgements/d:subtitle|d:acknowledgements/d:info/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::acknowledgements[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:acknowledgements[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="acknowledgements"></xsl:template> <!-- see mode="acknowledgements" -->
-<xsl:template match="acknowledgements/title"></xsl:template>
-<xsl:template match="acknowledgements/subtitle"></xsl:template>
-<xsl:template match="acknowledgements/titleabbrev"></xsl:template>
+<xsl:template match="d:acknowledgements"></xsl:template> <!-- see mode="acknowledgements" -->
+<xsl:template match="d:acknowledgements/d:title"></xsl:template>
+<xsl:template match="d:acknowledgements/d:subtitle"></xsl:template>
+<xsl:template match="d:acknowledgements/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="colophon">
+<xsl:template match="d:colophon">
   <xsl:call-template name="id.warning"/>
 
   <div>
   </div>
 </xsl:template>
 
-<xsl:template match="colophon/title"></xsl:template>
-<xsl:template match="colophon/subtitle"></xsl:template>
-<xsl:template match="colophon/titleabbrev"></xsl:template>
+<xsl:template match="d:colophon/d:title"></xsl:template>
+<xsl:template match="d:colophon/d:subtitle"></xsl:template>
+<xsl:template match="d:colophon/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="preface">
+<xsl:template match="d:preface">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="preface/title" mode="titlepage.mode" priority="2">
+<xsl:template match="d:preface/d:title" mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::preface[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:preface[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="preface/subtitle
-                     |preface/prefaceinfo/subtitle
-                     |preface/info/subtitle
-                     |preface/docinfo/subtitle"
+<xsl:template match="d:preface/d:subtitle
+                     |d:preface/d:prefaceinfo/d:subtitle
+                     |d:preface/d:info/d:subtitle
+                     |d:preface/d:docinfo/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::preface[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:preface[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
-<xsl:template match="preface/info"></xsl:template>
-<xsl:template match="preface/title"></xsl:template>
-<xsl:template match="preface/titleabbrev"></xsl:template>
-<xsl:template match="preface/subtitle"></xsl:template>
+<xsl:template match="d:preface/d:docinfo|d:prefaceinfo"></xsl:template>
+<xsl:template match="d:preface/d:info"></xsl:template>
+<xsl:template match="d:preface/d:title"></xsl:template>
+<xsl:template match="d:preface/d:titleabbrev"></xsl:template>
+<xsl:template match="d:preface/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="chapter">
+<xsl:template match="d:chapter">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="chapter/title|chapter/chapterinfo/title|chapter/info/title"
+<xsl:template match="d:chapter/d:title|d:chapter/d:chapterinfo/d:title|d:chapter/d:info/d:title"
              mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::chapter[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:chapter[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="chapter/subtitle
-                     |chapter/chapterinfo/subtitle
-                     |chapter/info/subtitle
-                     |chapter/docinfo/subtitle"
+<xsl:template match="d:chapter/d:subtitle
+                     |d:chapter/d:chapterinfo/d:subtitle
+                     |d:chapter/d:info/d:subtitle
+                     |d:chapter/d:docinfo/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::chapter[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:chapter[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
-<xsl:template match="chapter/info"></xsl:template>
-<xsl:template match="chapter/title"></xsl:template>
-<xsl:template match="chapter/titleabbrev"></xsl:template>
-<xsl:template match="chapter/subtitle"></xsl:template>
+<xsl:template match="d:chapter/d:docinfo|d:chapterinfo"></xsl:template>
+<xsl:template match="d:chapter/d:info"></xsl:template>
+<xsl:template match="d:chapter/d:title"></xsl:template>
+<xsl:template match="d:chapter/d:titleabbrev"></xsl:template>
+<xsl:template match="d:chapter/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="appendix">
+<xsl:template match="d:appendix">
   <xsl:variable name="ischunk">
     <xsl:call-template name="chunk"/>
   </xsl:variable>
     </xsl:call-template>
 
     <xsl:choose>
-      <xsl:when test="parent::article and $ischunk = 0">
+      <xsl:when test="parent::d:article and $ischunk = 0">
         <xsl:call-template name="section.heading">
           <xsl:with-param name="level" select="1"/>
           <xsl:with-param name="title">
 
     <xsl:apply-templates/>
 
-    <xsl:if test="not(parent::article) or $ischunk != 0">
+    <xsl:if test="not(parent::d:article) or $ischunk != 0">
       <xsl:call-template name="process.footnotes"/>
     </xsl:if>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="appendix/title|appendix/appendixinfo/title"
+<xsl:template match="d:appendix/d:title|d:appendix/d:appendixinfo/d:title"
              mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::appendix[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:appendix[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="appendix/subtitle
-                     |appendix/appendixinfo/subtitle
-                     |appendix/info/subtitle
-                     |appendix/docinfo/subtitle"
+<xsl:template match="d:appendix/d:subtitle
+                     |d:appendix/d:appendixinfo/d:subtitle
+                     |d:appendix/d:info/d:subtitle
+                     |d:appendix/d:docinfo/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::appendix[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:appendix[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
-<xsl:template match="appendix/info"></xsl:template>
-<xsl:template match="appendix/title"></xsl:template>
-<xsl:template match="appendix/titleabbrev"></xsl:template>
-<xsl:template match="appendix/subtitle"></xsl:template>
+<xsl:template match="d:appendix/d:docinfo|d:appendixinfo"></xsl:template>
+<xsl:template match="d:appendix/d:info"></xsl:template>
+<xsl:template match="d:appendix/d:title"></xsl:template>
+<xsl:template match="d:appendix/d:titleabbrev"></xsl:template>
+<xsl:template match="d:appendix/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="article">
+<xsl:template match="d:article">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="article/title|article/articleinfo/title" mode="titlepage.mode" priority="2">
+<xsl:template match="d:article/d:title|d:article/d:articleinfo/d:title" mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::article[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:article[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="article/subtitle
-                     |article/articleinfo/subtitle
-                     |article/info/subtitle
-                     |article/artheader/subtitle"
+<xsl:template match="d:article/d:subtitle
+                     |d:article/d:articleinfo/d:subtitle
+                     |d:article/d:info/d:subtitle
+                     |d:article/d:artheader/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::article[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:article[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="article/artheader|article/articleinfo"></xsl:template>
-<xsl:template match="article/info"></xsl:template>
-<xsl:template match="article/title"></xsl:template>
-<xsl:template match="article/titleabbrev"></xsl:template>
-<xsl:template match="article/subtitle"></xsl:template>
+<xsl:template match="d:article/d:artheader|d:article/d:articleinfo"></xsl:template>
+<xsl:template match="d:article/d:info"></xsl:template>
+<xsl:template match="d:article/d:title"></xsl:template>
+<xsl:template match="d:article/d:titleabbrev"></xsl:template>
+<xsl:template match="d:article/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="topic">
+<xsl:template match="d:topic">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="topic/title|topic/info/title" mode="titlepage.mode" priority="2">
+<xsl:template match="d:topic/d:title|d:topic/d:info/d:title" mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.title">
-    <xsl:with-param name="node" select="ancestor::topic[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:topic[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="topic/subtitle
-                     |topic/info/subtitle"
+<xsl:template match="d:topic/d:subtitle
+                     |d:topic/d:info/d:subtitle"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="component.subtitle">
-    <xsl:with-param name="node" select="ancestor::topic[1]"/>
+    <xsl:with-param name="node" select="ancestor::d:topic[1]"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="topic/info"></xsl:template>
-<xsl:template match="topic/title"></xsl:template>
-<xsl:template match="topic/titleabbrev"></xsl:template>
-<xsl:template match="topic/subtitle"></xsl:template>
+<xsl:template match="d:topic/d:info"></xsl:template>
+<xsl:template match="d:topic/d:title"></xsl:template>
+<xsl:template match="d:topic/d:titleabbrev"></xsl:template>
+<xsl:template match="d:topic/d:subtitle"></xsl:template>
 
 </xsl:stylesheet>
 
index f93b883984f7322ae879e13dadb76ac6bc4cec67..e539763352f88d861fc3d295023899539c5468e4 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="set">
+<xsl:template match="d:set">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="set/setinfo"></xsl:template>
-<xsl:template match="set/title"></xsl:template>
-<xsl:template match="set/titleabbrev"></xsl:template>
-<xsl:template match="set/subtitle"></xsl:template>
+<xsl:template match="d:set/d:setinfo"></xsl:template>
+<xsl:template match="d:set/d:title"></xsl:template>
+<xsl:template match="d:set/d:titleabbrev"></xsl:template>
+<xsl:template match="d:set/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="book">
+<xsl:template match="d:book">
   <xsl:call-template name="id.warning"/>
 
   <div>
@@ -69,8 +71,8 @@
 
     <xsl:call-template name="book.titlepage"/>
 
-    <xsl:apply-templates select="dedication" mode="dedication"/>
-    <xsl:apply-templates select="acknowledgements" mode="acknowledgements"/>
+    <xsl:apply-templates select="d:dedication" mode="dedication"/>
+    <xsl:apply-templates select="d:acknowledgements" mode="acknowledgements"/>
 
     <xsl:variable name="toc.params">
       <xsl:call-template name="find.path.params">
   </div>
 </xsl:template>
 
-<xsl:template match="book/bookinfo"></xsl:template>
-<xsl:template match="book/info"></xsl:template>
-<xsl:template match="book/title"></xsl:template>
-<xsl:template match="book/titleabbrev"></xsl:template>
-<xsl:template match="book/subtitle"></xsl:template>
+<xsl:template match="d:book/d:bookinfo"></xsl:template>
+<xsl:template match="d:book/d:info"></xsl:template>
+<xsl:template match="d:book/d:title"></xsl:template>
+<xsl:template match="d:book/d:titleabbrev"></xsl:template>
+<xsl:template match="d:book/d:subtitle"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="part">
+<xsl:template match="d:part">
   <xsl:call-template name="id.warning"/>
 
   <div>
         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
       </xsl:call-template>
     </xsl:variable>
-    <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
+    <xsl:if test="not(d:partintro) and contains($toc.params, 'toc')">
       <xsl:call-template name="division.toc"/>
     </xsl:if>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="part" mode="make.part.toc">
+<xsl:template match="d:part" mode="make.part.toc">
   <xsl:call-template name="division.toc"/>
 </xsl:template>
 
-<xsl:template match="reference" mode="make.part.toc">
+<xsl:template match="d:reference" mode="make.part.toc">
   <xsl:call-template name="division.toc"/>
 </xsl:template>
 
-<xsl:template match="part/docinfo"></xsl:template>
-<xsl:template match="part/partinfo"></xsl:template>
-<xsl:template match="part/info"></xsl:template>
-<xsl:template match="part/title"></xsl:template>
-<xsl:template match="part/titleabbrev"></xsl:template>
-<xsl:template match="part/subtitle"></xsl:template>
+<xsl:template match="d:part/d:docinfo"></xsl:template>
+<xsl:template match="d:part/d:partinfo"></xsl:template>
+<xsl:template match="d:part/d:info"></xsl:template>
+<xsl:template match="d:part/d:title"></xsl:template>
+<xsl:template match="d:part/d:titleabbrev"></xsl:template>
+<xsl:template match="d:part/d:subtitle"></xsl:template>
 
-<xsl:template match="partintro">
+<xsl:template match="d:partintro">
   <xsl:call-template name="id.warning"/>
 
   <div>
   </div>
 </xsl:template>
 
-<xsl:template match="partintro/title"></xsl:template>
-<xsl:template match="partintro/titleabbrev"></xsl:template>
-<xsl:template match="partintro/subtitle"></xsl:template>
+<xsl:template match="d:partintro/d:title"></xsl:template>
+<xsl:template match="d:partintro/d:titleabbrev"></xsl:template>
+<xsl:template match="d:partintro/d:subtitle"></xsl:template>
 
-<xsl:template match="partintro/title" mode="partintro.title.mode">
+<xsl:template match="d:partintro/d:title" mode="partintro.title.mode">
   <h2>
     <xsl:apply-templates/>
   </h2>
 </xsl:template>
 
-<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
+<xsl:template match="d:partintro/d:subtitle" mode="partintro.title.mode">
   <h3>
     <i><xsl:apply-templates/></i>
   </h3>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="book" mode="division.number">
-  <xsl:number from="set" count="book" format="1."/>
+<xsl:template match="d:book" mode="division.number">
+  <xsl:number from="d:set" count="d:book" format="1."/>
 </xsl:template>
 
-<xsl:template match="part" mode="division.number">
-  <xsl:number from="book" count="part" format="I."/>
+<xsl:template match="d:part" mode="division.number">
+  <xsl:number from="d:book" count="d:part" format="I."/>
 </xsl:template>
 
 <!-- ==================================================================== -->
index 3e7366a863a68cd9cdce1a34de246b700eee3d48..b8e0b5f69a87b715f4b8df61968a9086e8ec99b2 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
 <xsl:output method="html"
@@ -69,7 +70,7 @@
 <xsl:include href="chunker.xsl"/>
 <xsl:include href="html-rtf.xsl"/>
 <xsl:include href="annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
+<xsl:include href="../common/addns.xsl"/>
 <xsl:include href="publishers.xsl"/>
 
 <xsl:param name="stylesheet.result.type" select="'html'"/>
 
 <xsl:template name="head.content.abstract">
   <xsl:param name="node" select="."/>
-  <xsl:variable name="info" select="(articleinfo
-    |bookinfo
-    |prefaceinfo
-    |chapterinfo
-    |appendixinfo
-    |sectioninfo
-    |sect1info
-    |sect2info
-    |sect3info
-    |sect4info
-    |sect5info
-    |referenceinfo
-    |refentryinfo
-    |partinfo
-    |info
-    |docinfo)[1]"/>
-  <xsl:if test="$info and $info/abstract">
+  <xsl:variable name="info" select="(d:articleinfo
+    |d:bookinfo
+    |d:prefaceinfo
+    |d:chapterinfo
+    |d:appendixinfo
+    |d:sectioninfo
+    |d:sect1info
+    |d:sect2info
+    |d:sect3info
+    |d:sect4info
+    |d:sect5info
+    |d:referenceinfo
+    |d:refentryinfo
+    |d:partinfo
+    |d:info
+    |d:docinfo)[1]"/>
+  <xsl:if test="$info and $info/d:abstract">
     <meta name="description">
       <xsl:attribute name="content">
-        <xsl:for-each select="$info/abstract[1]/*">
+        <xsl:for-each select="$info/d:abstract[1]/*">
           <xsl:value-of select="normalize-space(.)"/>
           <xsl:if test="position() &lt; last()">
             <xsl:text> </xsl:text>
@@ -293,30 +294,30 @@ body { background-image: url('</xsl:text>
 <!-- ============================================================ -->
 
 <xsl:template match="*" mode="head.keywords.content">
-  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:chapterinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:appendixinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:prefaceinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:bookinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:setinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:articleinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:artheader/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect1info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect2info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect3info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect4info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect5info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sectioninfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect1info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect2info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect3info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:bibliographyinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:glossaryinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:indexinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refentryinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:partinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:referenceinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:docinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:info/d:keywordset" mode="html.header"/>
 
   <xsl:if test="$inherit.keywords != 0
                 and parent::*">
@@ -333,11 +334,11 @@ body { background-image: url('</xsl:text>
               in this chunk should be referenced. I don't think it
               does any harm to reference them all, but it adds
               unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
+  <xsl:if test="$annotation.support != 0 and //d:annotation">
     <xsl:call-template name="add.annotation.links"/>
     <script type="text/javascript">
       <xsl:text>&#10;// Create PopupWindow objects</xsl:text>
-      <xsl:for-each select="//annotation">
+      <xsl:for-each select="//d:annotation">
         <xsl:text>&#10;var popup_</xsl:text>
         <xsl:value-of select="generate-id(.)"/>
         <xsl:text> = new PopupWindow("popup-</xsl:text>
@@ -385,8 +386,8 @@ body { background-image: url('</xsl:text>
 
 <xsl:template name="user.header.navigation">
   <xsl:param name="node" select="."/>
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:param name="nav.context"/>
 </xsl:template>
 
@@ -400,8 +401,8 @@ body { background-image: url('</xsl:text>
 
 <xsl:template name="user.footer.navigation">
   <xsl:param name="node" select="."/>
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:param name="nav.context"/>
 </xsl:template>
 
@@ -409,10 +410,10 @@ body { background-image: url('</xsl:text>
 be created as a global variable here.
 Used by docbook.xsl, chunk-common.xsl, chunktoc.xsl, and
 chunk-code.xsl; and in $chunk.hierarchy used in chunkfast.xsl -->
-<xsl:variable name="no.namespace">
+<xsl:variable name="with.namespace">
   <xsl:if test="$exsl.node.set.available != 0 and 
-                namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
-      <xsl:apply-templates select="/*" mode="stripNS"/>
+                namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
+      <xsl:apply-templates select="/*" mode="addNS"/>
   </xsl:if>
 </xsl:variable>
 
@@ -425,15 +426,15 @@ chunk-code.xsl; and in $chunk.hierarchy used in chunkfast.xsl -->
   <xsl:choose>
     <!-- fix namespace if necessary -->
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
       <!-- DEBUG: uncomment to save namespace-fixed document.
@@ -442,16 +443,16 @@ chunk-code.xsl; and in $chunk.hierarchy used in chunkfast.xsl -->
         <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
         <xsl:with-param name="method" select="'xml'"/>
         <xsl:with-param name="content">
-          <xsl:copy-of select="exsl:node-set($no.namespace)"/>
+          <xsl:copy-of select="exsl:node-set($with.namespace)"/>
         </xsl:with-param>
       </xsl:call-template>
       -->
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
index 4b09ba701ef88ffb41cd1a60b7808de728ae4b4a..c373037e3f0e3d9d017c503572aaf49128734356 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -47,7 +48,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="productionset">
+<xsl:template match="d:productionset">
   <table width="100%" cellpadding="5">
     <xsl:if test="$ebnf.table.bgcolor != ''">
       <xsl:attribute name="bgcolor">
@@ -62,17 +63,17 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     </xsl:attribute>
     <xsl:attribute name="summary">
       <xsl:text>EBNF</xsl:text>
-      <xsl:if test="title|info/title">
+      <xsl:if test="d:title|d:info/d:title">
         <xsl:text> for </xsl:text>
-        <xsl:value-of select="title|info/title[1]"/>
+        <xsl:value-of select="d:title|d:info/d:title[1]"/>
       </xsl:if>
     </xsl:attribute>
 
-    <xsl:if test="title|info/title">
+    <xsl:if test="d:title|d:info/d:title">
       <tr>
         <th align="{$direction.align.start}" valign="top">
           <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:apply-templates select="title|info/title[1]"/>
+          <xsl:apply-templates select="d:title|d:info/d:title[1]"/>
         </th>
       </tr>
     </xsl:if>
@@ -88,18 +89,18 @@ to be incomplete. Don't forget to read the source, too :-)</para>
             <xsl:value-of select="local-name(.)"/>
           </xsl:attribute>
           <xsl:attribute name="summary">EBNF productions</xsl:attribute>
-          <xsl:apply-templates select="production|productionrecap"/>
+          <xsl:apply-templates select="d:production|d:productionrecap"/>
         </table>
       </td>
     </tr>
   </table>
 </xsl:template>
 
-<xsl:template match="productionset/title">
+<xsl:template match="d:productionset/d:title">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="production">
+<xsl:template match="d:production">
   <xsl:param name="recap" select="false()"/>
   <tr>
     <td align="{$direction.align.start}" valign="top" width="3%">
@@ -116,13 +117,13 @@ to be incomplete. Don't forget to read the source, too :-)</para>
                 <xsl:with-param name="object" select="."/>
               </xsl:call-template>
             </xsl:attribute>
-            <xsl:apply-templates select="lhs"/>
+            <xsl:apply-templates select="d:lhs"/>
           </a>
         </xsl:when>
         <xsl:otherwise>
           <xsl:call-template name="id.attribute"/>
           <xsl:call-template name="anchor"/>
-          <xsl:apply-templates select="lhs"/>
+          <xsl:apply-templates select="d:lhs"/>
         </xsl:otherwise>
       </xsl:choose>
     </td>
@@ -130,14 +131,14 @@ to be incomplete. Don't forget to read the source, too :-)</para>
       <xsl:copy-of select="$ebnf.assignment"/>
     </td>
     <td valign="top" width="52%">
-      <xsl:apply-templates select="rhs"/>
+      <xsl:apply-templates select="d:rhs"/>
       <xsl:copy-of select="$ebnf.statement.terminator"/>
     </td>
     <td align="{$direction.align.start}" valign="top" width="30%">
       <xsl:choose>
-        <xsl:when test="rhs/lineannotation|constraint">
-          <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
-          <xsl:apply-templates select="constraint"/>
+        <xsl:when test="d:rhs/d:lineannotation|d:constraint">
+          <xsl:apply-templates select="d:rhs/d:lineannotation" mode="rhslo"/>
+          <xsl:apply-templates select="d:constraint"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:text>&#160;</xsl:text>
@@ -147,7 +148,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </tr>
 </xsl:template>
 
-<xsl:template match="productionrecap">
+<xsl:template match="d:productionrecap">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
@@ -172,19 +173,19 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="lhs">
+<xsl:template match="d:lhs">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="rhs">
+<xsl:template match="d:rhs">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::rhs">
+  <xsl:if test="following-sibling::d:rhs">
     <xsl:text> |</xsl:text>
     <br/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="nonterminal">
+<xsl:template match="d:nonterminal">
   <xsl:variable name="linkend">
     <xsl:call-template name="xpointer.idref">
       <xsl:with-param name="xpointer" select="@def"/>
@@ -242,7 +243,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
           <xsl:when test="$linkend != ''">
             <xsl:variable name="targets" select="key('id',$linkend)"/>
             <xsl:variable name="target" select="$targets[1]"/>
-            <xsl:apply-templates select="$target/lhs"/>
+            <xsl:apply-templates select="$target/d:lhs"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:text>???</xsl:text>
@@ -253,18 +254,18 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </a>
 </xsl:template>
 
-<xsl:template match="rhs/lineannotation">
+<xsl:template match="d:rhs/d:lineannotation">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="rhs/lineannotation" mode="rhslo">
+<xsl:template match="d:rhs/d:lineannotation" mode="rhslo">
   <xsl:text>/*&#160;</xsl:text>
   <xsl:apply-templates/>
   <xsl:text>&#160;*/</xsl:text>
   <br/>
 </xsl:template>
 
-<xsl:template match="constraint">
+<xsl:template match="d:constraint">
   <xsl:call-template name="check.id.unique">
     <xsl:with-param name="linkend" select="@linkend"/>
   </xsl:call-template>
@@ -305,12 +306,12 @@ to be incomplete. Don't forget to read the source, too :-)</para>
     <xsl:apply-templates select="$target" mode="title.markup"/>
   </a>
   <xsl:text>&#160;]</xsl:text>
-  <xsl:if test="following-sibling::constraint">
+  <xsl:if test="following-sibling::d:constraint">
     <br/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="constraintdef">
+<xsl:template match="d:constraintdef">
   <div>
     <xsl:apply-templates select="." mode="class.attribute"/>
     <xsl:call-template name="id.attribute"/>
@@ -319,7 +320,7 @@ to be incomplete. Don't forget to read the source, too :-)</para>
   </div>
 </xsl:template>
 
-<xsl:template match="constraintdef/title">
+<xsl:template match="d:constraintdef/d:title">
   <p><b><xsl:apply-templates/></b></p>
 </xsl:template>
 
index f9b696ad505523b579a84f897a5367e8c53226bd..75e1bfa9ed74b8abc7db16a78245ef58fc7eb36b 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -16,7 +17,7 @@
 The footnote text is handled in name="process.footnote".
 The footnote marker gets an id of @id, while the
 footnote text gets an id of #ftn.@id. They cross link to each other. -->
-<xsl:template match="footnote">
+<xsl:template match="d:footnote">
   <xsl:variable name="name">
     <xsl:call-template name="object.id">
       <xsl:with-param name="conditional" select="0"/>
@@ -47,7 +48,7 @@ footnote text gets an id of #ftn.@id. They cross link to each other. -->
   </a>
 </xsl:template>
 
-<xsl:template match="footnoteref">
+<xsl:template match="d:footnoteref">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="footnote" select="$targets[1]"/>
 
@@ -84,14 +85,14 @@ linkend/id: <xsl:value-of select="@linkend"/>
   </a>
 </xsl:template>
 
-<xsl:template match="footnote" mode="footnote.number">
+<xsl:template match="d:footnote" mode="footnote.number">
   <xsl:choose>
     <xsl:when test="string-length(@label) != 0">
       <xsl:value-of select="@label"/>
     </xsl:when>
-    <xsl:when test="ancestor::table or ancestor::informaltable">
+    <xsl:when test="ancestor::d:table or ancestor::d:informaltable">
       <xsl:variable name="tfnum">
-        <xsl:number level="any" from="table|informaltable" format="1"/>
+        <xsl:number level="any" from="d:table|d:informaltable" format="1"/>
       </xsl:variable>
 
       <xsl:choose>
@@ -99,15 +100,15 @@ linkend/id: <xsl:value-of select="@linkend"/>
           <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:number level="any" from="table | informaltable"
+          <xsl:number level="any" from="d:table | d:informaltable"
                       format="{$table.footnote.number.format}"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:variable name="pfoot" select="preceding::footnote[not(@label)]"/>
-      <xsl:variable name="ptfoot" select="preceding::table//footnote |
-                                          preceding::informaltable//footnote"/>
+      <xsl:variable name="pfoot" select="preceding::d:footnote[not(@label)]"/>
+      <xsl:variable name="ptfoot" select="preceding::d:table//d:footnote |
+                                          preceding::d:informaltable//d:footnote"/>
       <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/>
 
       <xsl:choose>
@@ -124,13 +125,13 @@ linkend/id: <xsl:value-of select="@linkend"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="footnote/para[1]|footnote/simpara[1]" priority="2">
+<xsl:template match="d:footnote/d:para[1]|d:footnote/d:simpara[1]" priority="2">
   <!-- this only works if the first thing in a footnote is a para, -->
   <!-- which is ok, because it usually is. -->
   <xsl:variable name="href">
     <xsl:text>#</xsl:text>
     <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
+      <xsl:with-param name="object" select="ancestor::d:footnote"/>
     </xsl:call-template>
   </xsl:variable>
 
@@ -146,7 +147,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
         <sup>
           <xsl:apply-templates select="." mode="class.attribute"/>
           <xsl:text>[</xsl:text>
-          <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
+          <xsl:apply-templates select="ancestor::d:footnote" mode="footnote.number"/>
           <xsl:text>] </xsl:text>
         </sup>
       </a>
@@ -162,13 +163,13 @@ linkend/id: <xsl:value-of select="@linkend"/>
   <xsl:variable name="name">
     <xsl:text>ftn.</xsl:text>
     <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
+      <xsl:with-param name="object" select="ancestor::d:footnote"/>
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="href">
     <xsl:text>#</xsl:text>
     <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select="ancestor::footnote"/>
+      <xsl:with-param name="object" select="ancestor::d:footnote"/>
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="footnote.mark">
@@ -188,7 +189,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
       </xsl:choose>
       <sup>
         <xsl:text>[</xsl:text>
-        <xsl:apply-templates select="ancestor::footnote"
+        <xsl:apply-templates select="ancestor::d:footnote"
                              mode="footnote.number"/>
         <xsl:text>] </xsl:text>
       </sup>
@@ -247,9 +248,9 @@ linkend/id: <xsl:value-of select="@linkend"/>
 <!-- ==================================================================== -->
 
 <xsl:template name="process.footnotes">
-  <xsl:variable name="footnotes" select=".//footnote"/>
+  <xsl:variable name="footnotes" select=".//d:footnote"/>
   <xsl:variable name="table.footnotes"
-                select=".//table//footnote | .//informaltable//footnote"/>
+                select=".//d:table//d:footnote | .//d:informaltable//d:footnote"/>
 
   <!-- Only bother to do this if there's at least one non-table footnote -->
   <xsl:if test="count($footnotes)>count($table.footnotes)">
@@ -280,7 +281,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
     </div>
   </xsl:if>
 
-  <xsl:if test="$annotation.support != 0 and //annotation">
+  <xsl:if test="$annotation.support != 0 and //d:annotation">
     <div class="annotation-list">
       <div class="annotation-nocss">
        <p>The following annotations are from this essay. You are seeing
@@ -288,7 +289,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
        techniques used to make them appear as â€˜popups’ on modern browsers.</p>
       </div>
 
-      <xsl:apply-templates select="//annotation"
+      <xsl:apply-templates select="//d:annotation"
                           mode="annotation-popup"/>
     </div>
   </xsl:if>
@@ -302,7 +303,7 @@ linkend/id: <xsl:value-of select="@linkend"/>
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="footnote" name="process.footnote" mode="process.footnote.mode">
+<xsl:template match="d:footnote" name="process.footnote" mode="process.footnote.mode">
   <xsl:variable name="id">
     <xsl:text>ftn.</xsl:text>
     <xsl:call-template name="object.id">
@@ -344,11 +345,11 @@ linkend/id: <xsl:value-of select="@linkend"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="table//footnote | informaltable//footnote"
+<xsl:template match="d:table//d:footnote | d:informaltable//d:footnote"
               mode="process.footnote.mode">
 </xsl:template>
 
-<xsl:template match="footnote" mode="table.footnote.mode">
+<xsl:template match="d:footnote" mode="table.footnote.mode">
   <xsl:call-template name="process.footnote"/>
 </xsl:template>
 
index da5c82f399e79747d83b02054c85468827c9ae48..de86f4735f096b85b95cb5448bf5eb2bf20fe82e 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
   <xsl:param name="class" select="local-name(.)"/>
 
   <xsl:choose>
-    <xsl:when test="title or info/title">
+    <xsl:when test="d:title or d:info/d:title">
       <xsl:call-template name="formal.object">
         <xsl:with-param name="placement" select="$placement"/>
         <xsl:with-param name="class" select="$class"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="figure">
+<xsl:template match="d:figure">
   <xsl:variable name="param.placement"
                 select="substring-after(normalize-space($formal.title.placement),
                                         concat(local-name(.), ' '))"/>
 
 </xsl:template>
 
-<xsl:template match="table">
+<xsl:template match="d:table">
   <xsl:choose>
-    <xsl:when test="tgroup|mediaobject|graphic">
+    <xsl:when test="d:tgroup|d:mediaobject|d:graphic">
       <xsl:call-template name="calsTable"/>
     </xsl:when>
-    <xsl:when test="caption">
+    <xsl:when test="d:caption">
       <xsl:call-template name="htmlTable.with.caption"/>
     </xsl:when>
     <xsl:otherwise>
 </xsl:template>
 
 <xsl:template name="calsTable">
-  <xsl:if test="tgroup/tbody/tr
-                |tgroup/thead/tr
-                |tgroup/tfoot/tr">
+  <xsl:if test="d:tgroup/d:tbody/d:tr
+                |d:tgroup/d:thead/d:tr
+                |d:tgroup/d:tfoot/d:tr">
     <xsl:message terminate="yes">Broken table: tr descendent of CALS Table.</xsl:message>
   </xsl:if>
 
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="table|informaltable" mode="class.value">
+<xsl:template match="d:table|d:informaltable" mode="class.value">
   <xsl:choose>
     <xsl:when test="@tabstyle">
       <xsl:value-of select="@tabstyle"/>
 </xsl:template>
 
 <xsl:template name="htmlTable">
-  <xsl:if test="tgroup/tbody/row
-                |tgroup/thead/row
-                |tgroup/tfoot/row">
+  <xsl:if test="d:tgroup/d:tbody/d:row
+                |d:tgroup/d:thead/d:row
+                |d:tgroup/d:tfoot/d:row">
     <xsl:message terminate="yes">Broken table: row descendent of HTML table.</xsl:message>
   </xsl:if>
 
   <xsl:apply-templates mode="htmlTable"/>
 
-  <xsl:if test=".//footnote|../title//footnote">
+  <xsl:if test=".//d:footnote|../d:title//d:footnote">
     <tbody class="footnotes">
       <tr>
         <td colspan="50">
-          <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/>
+          <xsl:apply-templates select=".//d:footnote|../d:title//d:footnote" mode="table.footnote.mode"/>
         </td>
       </tr>
     </tbody>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="example">
+<xsl:template match="d:example">
   <xsl:variable name="param.placement"
              select="substring-after(normalize-space($formal.title.placement),
                      concat(local-name(.), ' '))"/>
 
 </xsl:template>
 
-<xsl:template match="equation">
+<xsl:template match="d:equation">
   <xsl:variable name="param.placement"
               select="substring-after(normalize-space($formal.title.placement),
                                       concat(local-name(.), ' '))"/>
 
 </xsl:template>
 
-<xsl:template match="figure/title"></xsl:template>
-<xsl:template match="figure/titleabbrev"></xsl:template>
-<xsl:template match="table/title"></xsl:template>
-<xsl:template match="table/titleabbrev"></xsl:template>
-<xsl:template match="table/textobject"></xsl:template>
-<xsl:template match="example/title"></xsl:template>
-<xsl:template match="example/titleabbrev"></xsl:template>
-<xsl:template match="equation/title"></xsl:template>
-<xsl:template match="equation/titleabbrev"></xsl:template>
-
-<xsl:template match="informalfigure">
+<xsl:template match="d:figure/d:title"></xsl:template>
+<xsl:template match="d:figure/d:titleabbrev"></xsl:template>
+<xsl:template match="d:table/d:title"></xsl:template>
+<xsl:template match="d:table/d:titleabbrev"></xsl:template>
+<xsl:template match="d:table/d:textobject"></xsl:template>
+<xsl:template match="d:example/d:title"></xsl:template>
+<xsl:template match="d:example/d:titleabbrev"></xsl:template>
+<xsl:template match="d:equation/d:title"></xsl:template>
+<xsl:template match="d:equation/d:titleabbrev"></xsl:template>
+
+<xsl:template match="d:informalfigure">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
-<xsl:template match="informalexample">
+<xsl:template match="d:informalexample">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
-<xsl:template match="informaltable">
+<xsl:template match="d:informaltable">
   <xsl:choose>
-    <xsl:when test="tgroup|mediaobject|graphic">
+    <xsl:when test="d:tgroup|d:mediaobject|d:graphic">
       <xsl:call-template name="informal.object"/>
     </xsl:when>
     <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="informaltable/textobject"></xsl:template>
+<xsl:template match="d:informaltable/d:textobject"></xsl:template>
 
 <xsl:template name="table.longdesc">
   <!-- HACK: This doesn't belong inside formal.objectt; it should be done by -->
   </xsl:variable>
 
   <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0
-                and textobject[not(phrase)]">
+                and d:textobject[not(d:phrase)]">
     <xsl:call-template name="longdesc.link">
       <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
     </xsl:call-template>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="informalequation">
+<xsl:template match="d:informalequation">
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
index ec3aed24ee0785e4f73a83b9eadb11a9a9fb904f..1f2dd06225683ea80c70f75e447283cc60aa27cc 100644 (file)
@@ -4,8 +4,9 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="xlink"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xlink='http://www.w3.org/1999/xlink'
+                exclude-result-prefixes="xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -18,7 +19,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="glossary">
+<xsl:template match="d:glossary">
   &setup-language-variable;
   <xsl:call-template name="id.warning"/>
 
     <xsl:call-template name="glossary.titlepage"/>
 
     <xsl:choose>
-      <xsl:when test="glossdiv">
-        <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
+      <xsl:when test="d:glossdiv">
+        <xsl:apply-templates select="(d:glossdiv[1]/preceding-sibling::*)"/>
       </xsl:when>
-      <xsl:when test="glossentry">
-        <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+      <xsl:when test="d:glossentry">
+        <xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates/>
     </xsl:choose>
 
     <xsl:choose>
-      <xsl:when test="glossdiv">
-        <xsl:apply-templates select="glossdiv"/>
+      <xsl:when test="d:glossdiv">
+        <xsl:apply-templates select="d:glossdiv"/>
       </xsl:when>
-      <xsl:when test="glossentry">
+      <xsl:when test="d:glossentry">
         <dl>
           <xsl:choose>
             <xsl:when test="$glossary.sort != 0">
-              <xsl:apply-templates select="glossentry">
-                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+              <xsl:apply-templates select="d:glossentry">
+                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
               </xsl:apply-templates>
             </xsl:when>
             <xsl:otherwise>
-              <xsl:apply-templates select="glossentry"/>
+              <xsl:apply-templates select="d:glossentry"/>
             </xsl:otherwise>
           </xsl:choose>
         </dl>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="not(parent::article)">
+    <xsl:if test="not(parent::d:article)">
       <xsl:call-template name="process.footnotes"/>
     </xsl:if>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="glossary/glossaryinfo"></xsl:template>
-<xsl:template match="glossary/info"></xsl:template>
-<xsl:template match="glossary/title"></xsl:template>
-<xsl:template match="glossary/subtitle"></xsl:template>
-<xsl:template match="glossary/titleabbrev"></xsl:template>
+<xsl:template match="d:glossary/d:glossaryinfo"></xsl:template>
+<xsl:template match="d:glossary/d:info"></xsl:template>
+<xsl:template match="d:glossary/d:title"></xsl:template>
+<xsl:template match="d:glossary/d:subtitle"></xsl:template>
+<xsl:template match="d:glossary/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="glosslist">
+<xsl:template match="d:glosslist">
   &setup-language-variable;
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:if test="blockinfo/title|info/title|title">
+    <xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
     <dl>
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry">
-                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+          <xsl:apply-templates select="d:glossentry">
+                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="glossentry"/>
+          <xsl:apply-templates select="d:glossentry"/>
         </xsl:otherwise>
       </xsl:choose>
     </dl>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="glossdiv">
+<xsl:template match="d:glossdiv">
   &setup-language-variable;
   <xsl:call-template name="id.warning"/>
 
     <xsl:call-template name="id.attribute">
       <xsl:with-param name="conditional" select="0"/>
     </xsl:call-template>
-    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+    <xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/>
 
     <dl>
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
-          <xsl:apply-templates select="glossentry">
+          <xsl:apply-templates select="d:glossentry">
             <xsl:sort lang="{$language}"
-                      select="translate(glossterm, $lowercase, 
+                      select="translate(d:glossterm, $lowercase,
                                         $uppercase)"/>
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="glossentry"/>
+          <xsl:apply-templates select="d:glossentry"/>
         </xsl:otherwise>
       </xsl:choose>
     </dl>
   </div>
 </xsl:template>
 
-<xsl:template match="glossdiv/title">
+<xsl:template match="d:glossdiv/d:title">
   <h3>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
@@ -150,7 +151,7 @@ GlossEntry ::=
   (GlossSee | GlossDef+)
 -->
 
-<xsl:template match="glossentry">
+<xsl:template match="d:glossentry">
   <xsl:choose>
     <xsl:when test="$glossentry.show.acronym = 'primary'">
       <dt>
@@ -172,14 +173,14 @@ GlossEntry ::=
         </xsl:call-template>
 
         <xsl:choose>
-          <xsl:when test="acronym|abbrev">
-            <xsl:apply-templates select="acronym|abbrev"/>
+          <xsl:when test="d:acronym|d:abbrev">
+            <xsl:apply-templates select="d:acronym|d:abbrev"/>
             <xsl:text> (</xsl:text>
-            <xsl:apply-templates select="glossterm"/>
+            <xsl:apply-templates select="d:glossterm"/>
             <xsl:text>)</xsl:text>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:apply-templates select="glossterm"/>
+            <xsl:apply-templates select="d:glossterm"/>
           </xsl:otherwise>
         </xsl:choose>
       </dt>
@@ -203,14 +204,14 @@ GlossEntry ::=
           </xsl:with-param>
         </xsl:call-template>
 
-        <xsl:apply-templates select="glossterm"/>
+        <xsl:apply-templates select="d:glossterm"/>
 
-        <xsl:if test="acronym|abbrev">
+        <xsl:if test="d:acronym|d:abbrev">
           <xsl:text> (</xsl:text>
-          <xsl:apply-templates select="acronym|abbrev"/>
+          <xsl:apply-templates select="d:acronym|d:abbrev"/>
           <xsl:text>)</xsl:text>
         </xsl:if>
-        <xsl:apply-templates select="indexterm"/>
+        <xsl:apply-templates select="d:indexterm"/>
       </dt>
     </xsl:when>
     <xsl:otherwise>
@@ -232,39 +233,39 @@ GlossEntry ::=
           </xsl:with-param>
         </xsl:call-template>
 
-        <xsl:apply-templates select="glossterm"/>
-        <xsl:apply-templates select="indexterm"/>
+        <xsl:apply-templates select="d:glossterm"/>
+        <xsl:apply-templates select="d:indexterm"/>
       </dt>
     </xsl:otherwise>
   </xsl:choose>
 
-  <xsl:apply-templates select="glosssee|glossdef"/>
+  <xsl:apply-templates select="d:glosssee|d:glossdef"/>
 </xsl:template>
 
-<xsl:template match="glossentry/glossterm">
+<xsl:template match="d:glossentry/d:glossterm">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates/>
   </span>
-  <xsl:if test="following-sibling::glossterm">, </xsl:if>
+  <xsl:if test="following-sibling::d:glossterm">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/acronym">
+<xsl:template match="d:glossentry/d:acronym">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+  <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/abbrev">
+<xsl:template match="d:glossentry/d:abbrev">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+  <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
 </xsl:template>
 
-<xsl:template match="glossentry/revhistory">
+<xsl:template match="d:glossentry/d:revhistory">
 </xsl:template>
 
-<xsl:template match="glossentry/glosssee">
+<xsl:template match="d:glossentry/d:glosssee">
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="key('id', $otherterm)"/>
   <xsl:variable name="target" select="$targets[1]"/>
@@ -321,13 +322,13 @@ GlossEntry ::=
   </dd>
 </xsl:template>
 
-<xsl:template match="glossentry/glossdef">
+<xsl:template match="d:glossentry/d:glossdef">
   <dd>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
     <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
-    <xsl:if test="glossseealso">
+    <xsl:if test="d:glossseealso">
       <p>
         <xsl:variable name="template">
           <xsl:call-template name="gentext.template">
@@ -336,7 +337,7 @@ GlossEntry ::=
           </xsl:call-template>
         </xsl:variable>
         <xsl:variable name="title">
-          <xsl:apply-templates select="glossseealso"/>
+          <xsl:apply-templates select="d:glossseealso"/>
         </xsl:variable>
         <xsl:call-template name="substitute-markup">
           <xsl:with-param name="template" select="$template"/>
@@ -347,7 +348,7 @@ GlossEntry ::=
   </dd>
 </xsl:template>
 
-<xsl:template match="glossseealso">
+<xsl:template match="d:glossseealso">
   <xsl:variable name="otherterm" select="@otherterm"/>
   <xsl:variable name="targets" select="key('id', $otherterm)"/>
   <xsl:variable name="target" select="$targets[1]"/>
@@ -400,10 +401,10 @@ GlossEntry ::=
 
 <!-- Glossary collection -->
 
-<xsl:template match="glossary[@role='auto']" priority="2">
+<xsl:template match="d:glossary[@role='auto']" priority="2">
   &setup-language-variable;
   <xsl:variable name="terms" 
-                select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+                select="//d:glossterm[not(parent::d:glossdef)]|//d:firstterm"/>
   <xsl:variable name="collection" select="document($glossary.collection, .)"/>
 
   <xsl:call-template name="id.warning"/>
@@ -433,14 +434,14 @@ GlossEntry ::=
     <xsl:call-template name="glossary.titlepage"/>
 
     <xsl:choose>
-      <xsl:when test="glossdiv and $collection//glossdiv">
-        <xsl:for-each select="$collection//glossdiv">
+      <xsl:when test="d:glossdiv and $collection//d:glossdiv">
+        <xsl:for-each select="$collection//d:glossdiv">
           <!-- first see if there are any in this div -->
           <xsl:variable name="exist.test">
-            <xsl:for-each select="glossentry">
-              <xsl:variable name="cterm" select="glossterm"/>
+            <xsl:for-each select="d:glossentry">
+              <xsl:variable name="cterm" select="d:glossterm"/>
               <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
-                <xsl:value-of select="glossterm"/>
+                <xsl:value-of select="d:glossterm"/>
               </xsl:if>
             </xsl:for-each>
           </xsl:variable>
@@ -456,17 +457,17 @@ GlossEntry ::=
         <dl>
           <xsl:choose>
             <xsl:when test="$glossary.sort != 0">
-              <xsl:for-each select="$collection//glossentry">
-                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-                <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:for-each select="$collection//d:glossentry">
+                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+                <xsl:variable name="cterm" select="d:glossterm"/>
                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                   <xsl:apply-templates select="." mode="auto-glossary"/>
                 </xsl:if>
               </xsl:for-each>
             </xsl:when>
             <xsl:otherwise>
-              <xsl:for-each select="$collection//glossentry">
-                <xsl:variable name="cterm" select="glossterm"/>
+              <xsl:for-each select="$collection//d:glossentry">
+                <xsl:variable name="cterm" select="d:glossterm"/>
                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
                   <xsl:apply-templates select="." mode="auto-glossary"/>
                 </xsl:if>
@@ -477,7 +478,7 @@ GlossEntry ::=
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="not(parent::article)">
+    <xsl:if test="not(parent::d:article)">
       <xsl:call-template name="process.footnotes"/>
     </xsl:if>
   </div>
@@ -488,7 +489,7 @@ GlossEntry ::=
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="glossdiv" mode="auto-glossary">
+<xsl:template match="d:glossdiv" mode="auto-glossary">
   <xsl:param name="terms" select="."/>
 
   &setup-language-variable;
@@ -498,22 +499,22 @@ GlossEntry ::=
     <xsl:call-template name="id.attribute">
       <xsl:with-param name="conditional" select="0"/>
     </xsl:call-template>
-    <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+    <xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/>
 
     <dl>
       <xsl:choose>
         <xsl:when test="$glossary.sort != 0">
-          <xsl:for-each select="glossentry">
-                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
-            <xsl:variable name="cterm" select="glossterm"/>
+          <xsl:for-each select="d:glossentry">
+                               <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+            <xsl:variable name="cterm" select="d:glossterm"/>
             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
               <xsl:apply-templates select="." mode="auto-glossary"/>
             </xsl:if>
           </xsl:for-each>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:for-each select="glossentry">
-            <xsl:variable name="cterm" select="glossterm"/>
+          <xsl:for-each select="d:glossentry">
+            <xsl:variable name="cterm" select="d:glossterm"/>
             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
               <xsl:apply-templates select="." mode="auto-glossary"/>
             </xsl:if>
index 46efc624928dd840a36b8b0a474485f6e94b628b..24cbfe7fa38afade32bd2d4f928c0c516da407db 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xlink="http://www.w3.org/1999/xlink"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xlink="http://www.w3.org/1999/xlink"
                 xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
                 xmlns:simg="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.ImageIntrinsics"
                 xmlns:ximg="xalan://com.nwalsh.xalan.ImageIntrinsics"
                 xmlns:xtext="xalan://com.nwalsh.xalan.Text"
                 xmlns:lxslt="http://xml.apache.org/xslt"
-                exclude-result-prefixes="xlink stext xtext lxslt simg ximg"
+                exclude-result-prefixes="xlink stext xtext lxslt simg ximg d"
                 extension-element-prefixes="stext xtext"
                 version='1.0'>
 
@@ -21,7 +22,7 @@
 
      ******************************************************************** -->
 
-<lxslt:component prefix="xtext" elements="insertfile"/>
+<lxslt:component prefix="xtext" elements="d:insertfile"/>
 <lxslt:component prefix="ximg" functions="new getWidth getDepth"/>
 
 <!-- ==================================================================== -->
@@ -71,7 +72,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="screenshot">
+<xsl:template match="d:screenshot">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="screenshot/title">
+<xsl:template match="d:screenshot/d:title">
   <xsl:call-template name="formal.object.heading">
     <xsl:with-param name="object" select=".."/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="screeninfo">
+<xsl:template match="d:screeninfo">
 </xsl:template>
 
 <!-- ==================================================================== -->
     <xsl:choose>
       <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
       <xsl:when test="local-name(.) = 'inlinegraphic'
-                      or ancestor::inlinemediaobject
-                      or ancestor::inlineequation">0</xsl:when>
+                      or ancestor::d:inlinemediaobject
+                      or ancestor::d:inlineequation">0</xsl:when>
       <xsl:otherwise>
         <xsl:value-of select="$make.graphic.viewport"/>
       </xsl:otherwise>
@@ -605,10 +606,10 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
         </xsl:variable>
         <xsl:variable name="imgcontents">
         <xsl:element name="{$tag}">
-         <xsl:if test="$tag = 'img' and ../../self::imageobjectco">
+         <xsl:if test="$tag = 'img' and ../../self::d:imageobjectco">
            <xsl:variable name="mapname">
              <xsl:call-template name="object.id">
-               <xsl:with-param name="object" select="../../areaspec"/>
+               <xsl:with-param name="object" select="../../d:areaspec"/>
              </xsl:call-template>
            </xsl:variable>
            <xsl:choose>
@@ -650,9 +651,9 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
                 <xsl:when test="$alt != ''">
                   <xsl:copy-of select="$alt"/>
                 </xsl:when>
-                <xsl:when test="ancestor::figure">
+                <xsl:when test="ancestor::d:figure">
                   <xsl:variable name="fig.title">
-                    <xsl:apply-templates select="ancestor::figure/title/node()"/>
+                    <xsl:apply-templates select="ancestor::d:figure/d:title/node()"/>
                   </xsl:variable>
                   <xsl:value-of select="normalize-space($fig.title)"/>
                 </xsl:when>
@@ -765,15 +766,15 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
     </xsl:otherwise>
   </xsl:choose>
 
-  <xsl:if test="$tag = 'img' and ../../self::imageobjectco and not($scaled)">
+  <xsl:if test="$tag = 'img' and ../../self::d:imageobjectco and not($scaled)">
     <xsl:variable name="mapname">
       <xsl:call-template name="object.id">
-        <xsl:with-param name="object" select="../../areaspec"/>
+        <xsl:with-param name="object" select="../../d:areaspec"/>
       </xsl:call-template>
     </xsl:variable>
 
     <map name="{$mapname}">
-      <xsl:for-each select="../../areaspec//area">
+      <xsl:for-each select="../../d:areaspec//d:area">
         <xsl:variable name="units">
           <xsl:choose>
             <xsl:when test="@units = 'other' and @otherunits">
@@ -858,9 +859,9 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
                 </xsl:when>
               </xsl:choose>
  
-              <xsl:if test="alt">
+              <xsl:if test="d:alt">
                 <xsl:attribute name="alt">
-                  <xsl:value-of select="alt[1]"/>
+                  <xsl:value-of select="d:alt[1]"/>
                 </xsl:attribute>
               </xsl:if>
  
@@ -1072,9 +1073,9 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="graphic">
+<xsl:template match="d:graphic">
   <xsl:choose>
-    <xsl:when test="parent::inlineequation">
+    <xsl:when test="parent::d:inlineequation">
       <span>
         <xsl:call-template name="id.attribute"/>
         <xsl:call-template name="anchor"/>
@@ -1096,7 +1097,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="inlinegraphic">
+<xsl:template match="d:inlinegraphic">
   <xsl:variable name="filename">
     <xsl:choose>
       <xsl:when test="@entityref">
@@ -1145,11 +1146,11 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="mediaobject|mediaobjectco">
+<xsl:template match="d:mediaobject|d:mediaobjectco">
 
-  <xsl:variable name="olist" select="imageobject|imageobjectco
-                     |videoobject|audioobject
-                     |textobject"/>
+  <xsl:variable name="olist" select="d:imageobject|d:imageobjectco
+                     |d:videoobject|d:audioobject
+                     |d:textobject"/>
 
   <xsl:variable name="object.index">
     <xsl:call-template name="select.mediaobject.index">
@@ -1161,7 +1162,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
   <xsl:variable name="object" select="$olist[position() = $object.index]"/>
 
   <xsl:variable name="align">
-    <xsl:value-of select="$object/descendant::imagedata[@align][1]/@align"/>
+    <xsl:value-of select="$object/descendant::d:imagedata[@align][1]/@align"/>
   </xsl:variable>
 
   <div>
@@ -1175,11 +1176,11 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
     <xsl:call-template name="anchor"/>
 
     <xsl:apply-templates select="$object"/>
-    <xsl:apply-templates select="caption"/>
+    <xsl:apply-templates select="d:caption"/>
   </div>
 </xsl:template>
 
-<xsl:template match="inlinemediaobject">
+<xsl:template match="d:inlinemediaobject">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1188,22 +1189,22 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
   </span>
 </xsl:template>
 
-<xsl:template match="programlisting/inlinemediaobject
-                     |screen/inlinemediaobject" priority="2">
+<xsl:template match="d:programlisting/d:inlinemediaobject
+                     |d:screen/d:inlinemediaobject" priority="2">
   <!-- the additional span causes problems in some cases -->
   <xsl:call-template name="select.mediaobject"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="imageobjectco">
+<xsl:template match="d:imageobjectco">
   <xsl:call-template name="anchor"/>
   <xsl:choose>
     <!-- select one imageobject? -->
     <xsl:when test="$use.role.for.mediaobject != 0 and
-                    count(imageobject) &gt; 1 and
-                    imageobject[@role]">
-      <xsl:variable name="olist" select="imageobject"/>
+                    count(d:imageobject) &gt; 1 and
+                    d:imageobject[@role]">
+      <xsl:variable name="olist" select="d:imageobject"/>
     
       <xsl:variable name="object.index">
         <xsl:call-template name="select.mediaobject.index">
@@ -1218,19 +1219,19 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
     </xsl:when>
     <xsl:otherwise>
       <!-- otherwise process them all -->
-      <xsl:apply-templates select="imageobject"/>
+      <xsl:apply-templates select="d:imageobject"/>
     </xsl:otherwise>
   </xsl:choose>
 
-  <xsl:apply-templates select="calloutlist"/>
+  <xsl:apply-templates select="d:calloutlist"/>
 
 </xsl:template>
 
-<xsl:template match="imageobject">
-  <xsl:apply-templates select="imagedata"/>
+<xsl:template match="d:imageobject">
+  <xsl:apply-templates select="d:imagedata"/>
 </xsl:template>
 
-<xsl:template match="imagedata">
+<xsl:template match="d:imagedata">
   <xsl:variable name="filename">
     <xsl:call-template name="mediaobject.filename">
       <xsl:with-param name="object" select=".."/>
@@ -1275,23 +1276,23 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
       <xsl:variable name="longdesc.uri">
         <xsl:call-template name="longdesc.uri">
           <xsl:with-param name="mediaobject"
-                          select="ancestor::imageobject/parent::*"/>
+                          select="ancestor::d:imageobject/parent::*"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="phrases"
-                    select="ancestor::mediaobject/textobject[phrase]
-                            |ancestor::inlinemediaobject/textobject[phrase]
-                            |ancestor::mediaobjectco/textobject[phrase]"/>
+                    select="ancestor::d:mediaobject/d:textobject[d:phrase]
+                            |ancestor::d:inlinemediaobject/d:textobject[d:phrase]
+                            |ancestor::d:mediaobjectco/d:textobject[d:phrase]"/>
 
       <xsl:call-template name="process.image">
         <xsl:with-param name="alt">
           <xsl:choose>
-            <xsl:when test="ancestor::mediaobject/alt">
-              <xsl:apply-templates select="ancestor::mediaobject/alt"/>
+            <xsl:when test="ancestor::d:mediaobject/d:alt">
+              <xsl:apply-templates select="ancestor::d:mediaobject/d:alt"/>
             </xsl:when>
-            <xsl:when test="ancestor::inlinemediaobject/alt">
-              <xsl:apply-templates select="ancestor::inlinemediaobject/alt"/>
+            <xsl:when test="ancestor::d:inlinemediaobject/d:alt">
+              <xsl:apply-templates select="ancestor::d:inlinemediaobject/d:alt"/>
             </xsl:when>
             <xsl:otherwise>
               <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
@@ -1301,13 +1302,13 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
         <xsl:with-param name="longdesc">
           <xsl:call-template name="write.longdesc">
             <xsl:with-param name="mediaobject"
-                            select="ancestor::imageobject/parent::*"/>
+                            select="ancestor::d:imageobject/parent::*"/>
           </xsl:call-template>
         </xsl:with-param>
       </xsl:call-template>
 
       <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0
-                    and ancestor::imageobject/parent::*/textobject[not(phrase)]">
+                    and ancestor::d:imageobject/parent::*/d:textobject[not(d:phrase)]">
         <xsl:call-template name="longdesc.link">
           <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
         </xsl:call-template>
@@ -1321,7 +1322,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 <xsl:template name="longdesc.uri">
   <xsl:param name="mediaobject" select="."/>
   <xsl:if test="$html.longdesc">
-    <xsl:if test="$mediaobject/textobject[not(phrase)]">
+    <xsl:if test="$mediaobject/d:textobject[not(d:phrase)]">
       <xsl:variable name="dbhtml.dir">
         <xsl:call-template name="dbhtml-dir"/>
       </xsl:variable>
@@ -1372,7 +1373,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <xsl:template name="write.longdesc">
   <xsl:param name="mediaobject" select="."/>
-  <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
+  <xsl:if test="$html.longdesc != 0 and $mediaobject/d:textobject[not(d:phrase)]">
     <xsl:variable name="filename">
       <xsl:call-template name="longdesc.uri">
         <xsl:with-param name="mediaobject" select="$mediaobject"/>
@@ -1396,7 +1397,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
           </head>
           <body>
             <xsl:call-template name="body.attributes"/>
-            <xsl:for-each select="$mediaobject/textobject[not(phrase)]">
+            <xsl:for-each select="$mediaobject/d:textobject[not(d:phrase)]">
               <xsl:apply-templates select="./*"/>
             </xsl:for-each>
           </body>
@@ -1439,28 +1440,28 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="inlinemediaobject/alt">
+<xsl:template match="d:inlinemediaobject/d:alt">
   <xsl:apply-templates/>
 </xsl:template>
   
-<xsl:template match="mediaobject/alt">
+<xsl:template match="d:mediaobject/d:alt">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="videoobject">
-  <xsl:apply-templates select="videodata"/>
+<xsl:template match="d:videoobject">
+  <xsl:apply-templates select="d:videodata"/>
 </xsl:template>
 
-<xsl:template match="videodata">
+<xsl:template match="d:videodata">
   <xsl:call-template name="process.image">
     <xsl:with-param name="tag" select="'embed'"/>
     <xsl:with-param name="alt">
       <xsl:choose>
-        <xsl:when test="ancestor::mediaobject/alt">
-          <xsl:apply-templates select="ancestor::mediaobject/alt"/>
+        <xsl:when test="ancestor::d:mediaobject/d:alt">
+          <xsl:apply-templates select="ancestor::d:mediaobject/d:alt"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/>
+          <xsl:apply-templates select="(ancestor::d:mediaobject/d:textobject/d:phrase)[1]"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:with-param>
@@ -1469,20 +1470,20 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="audioobject">
-  <xsl:apply-templates select="audiodata"/>
+<xsl:template match="d:audioobject">
+  <xsl:apply-templates select="d:audiodata"/>
 </xsl:template>
 
-<xsl:template match="audiodata">
+<xsl:template match="d:audiodata">
   <xsl:call-template name="process.image">
     <xsl:with-param name="tag" select="'embed'"/>
     <xsl:with-param name="alt">
       <xsl:choose>
-        <xsl:when test="ancestor::mediaobject/alt">
-          <xsl:apply-templates select="ancestor::mediaobject/alt"/>
+        <xsl:when test="ancestor::d:mediaobject/d:alt">
+          <xsl:apply-templates select="ancestor::d:mediaobject/d:alt"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="(ancestor::mediaobject/textobject/phrase)[1]"/>
+          <xsl:apply-templates select="(ancestor::d:mediaobject/d:textobject/d:phrase)[1]"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:with-param>
@@ -1491,11 +1492,11 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="textobject">
+<xsl:template match="d:textobject">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="textdata">
+<xsl:template match="d:textdata">
   <xsl:variable name="filename">
     <xsl:choose>
       <xsl:when test="@entityref">
@@ -1546,7 +1547,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="caption">
+<xsl:template match="d:caption">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
index 6a86f14644a551420f48717ca17dbdb1216d25af..136d5cd532af5df6ac541abfcec6e1f3ab13331c 100644 (file)
@@ -1,82 +1,86 @@
-<?xml version="1.0"?>\r
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslthl="http://xslthl.sf.net" exclude-result-prefixes="xslthl" version="1.0">\r
-  <!-- ********************************************************************\r
-\r
-     This file is part of the XSL DocBook Stylesheet distribution.\r
-     See ../README or http://cdn.docbook.org/release/xsl/current/ for\r
-     and other information.\r
-\r
-     ******************************************************************** -->\r
-  <xsl:import href="../highlighting/common.xsl"/>\r
-  <xsl:template match="xslthl:keyword" mode="xslthl">\r
-    <strong class="hl-keyword">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </strong>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:string" mode="xslthl">\r
-    <strong class="hl-string">\r
-      <em style="color:red">\r
-        <xsl:apply-templates mode="xslthl"/>\r
-      </em>\r
-    </strong>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:comment" mode="xslthl">\r
-    <em class="hl-comment" style="color: silver">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </em>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:directive" mode="xslthl">\r
-    <span class="hl-directive" style="color: maroon">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </span>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:tag" mode="xslthl">\r
-    <strong class="hl-tag" style="color: #000096">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </strong>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:attribute" mode="xslthl">\r
-    <span class="hl-attribute" style="color: #F5844C">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </span>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:value" mode="xslthl">\r
-    <span class="hl-value" style="color: #993300">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </span>\r
-  </xsl:template>\r
-  <xsl:template match='xslthl:html' mode="xslthl">\r
-    <span class="hl-html" style="color: navy; font-weight: bold">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </span>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:xslt" mode="xslthl">\r
-    <strong style="color: #0066FF">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </strong>\r
-  </xsl:template>\r
-  <!-- Not emitted since XSLTHL 2.0 -->\r
-  <xsl:template match="xslthl:section" mode="xslthl">\r
-    <strong>\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </strong>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:number" mode="xslthl">\r
-    <span class="hl-number">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </span>\r
-  </xsl:template>\r
-  <xsl:template match="xslthl:annotation" mode="xslthl">\r
-    <em>\r
-      <span class="hl-annotation" style="color: gray">\r
-        <xsl:apply-templates mode="xslthl"/>\r
-      </span>\r
-    </em>\r
-  </xsl:template>\r
-  <!-- Not sure which element will be in final XSLTHL 2.0 -->\r
-  <xsl:template match="xslthl:doccomment|xslthl:doctype" mode="xslthl">\r
-    <strong class="hl-tag" style="color: blue">\r
-      <xsl:apply-templates mode="xslthl"/>\r
-    </strong>\r
-  </xsl:template>\r
-</xsl:stylesheet>\r
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xslthl="http://xslthl.sf.net"
+               exclude-result-prefixes="xslthl d"
+               version="1.0">
+  <!-- ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://cdn.docbook.org/release/xsl/current/ for
+     and other information.
+
+     ******************************************************************** -->
+  <xsl:import href="../highlighting/common.xsl"/>
+  <xsl:template match="xslthl:keyword" mode="xslthl">
+    <strong class="hl-keyword">
+      <xsl:apply-templates mode="xslthl"/>
+    </strong>
+  </xsl:template>
+  <xsl:template match="xslthl:string" mode="xslthl">
+    <strong class="hl-string">
+      <em style="color:red">
+        <xsl:apply-templates mode="xslthl"/>
+      </em>
+    </strong>
+  </xsl:template>
+  <xsl:template match="xslthl:comment" mode="xslthl">
+    <em class="hl-comment" style="color: silver">
+      <xsl:apply-templates mode="xslthl"/>
+    </em>
+  </xsl:template>
+  <xsl:template match="xslthl:directive" mode="xslthl">
+    <span class="hl-directive" style="color: maroon">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="xslthl:tag" mode="xslthl">
+    <strong class="hl-tag" style="color: #000096">
+      <xsl:apply-templates mode="xslthl"/>
+    </strong>
+  </xsl:template>
+  <xsl:template match="xslthl:attribute" mode="xslthl">
+    <span class="hl-attribute" style="color: #F5844C">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="xslthl:value" mode="xslthl">
+    <span class="hl-value" style="color: #993300">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+  <xsl:template match='xslthl:html' mode="xslthl">
+    <span class="hl-html" style="color: navy; font-weight: bold">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="xslthl:xslt" mode="xslthl">
+    <strong style="color: #0066FF">
+      <xsl:apply-templates mode="xslthl"/>
+    </strong>
+  </xsl:template>
+  <!-- Not emitted since XSLTHL 2.0 -->
+  <xsl:template match="xslthl:section" mode="xslthl">
+    <strong>
+      <xsl:apply-templates mode="xslthl"/>
+    </strong>
+  </xsl:template>
+  <xsl:template match="xslthl:number" mode="xslthl">
+    <span class="hl-number">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+  <xsl:template match="xslthl:annotation" mode="xslthl">
+    <em>
+      <span class="hl-annotation" style="color: gray">
+        <xsl:apply-templates mode="xslthl"/>
+      </span>
+    </em>
+  </xsl:template>
+  <!-- Not sure which element will be in final XSLTHL 2.0 -->
+  <xsl:template match="xslthl:doccomment|xslthl:doctype" mode="xslthl">
+    <strong class="hl-tag" style="color: blue">
+      <xsl:apply-templates mode="xslthl"/>
+    </strong>
+  </xsl:template>
+</xsl:stylesheet>
index 37976abba49245e5c784c59d7a5b13f627e54818..aa0b90603217c0176c9a6b56ad4625061622d4df 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
   <xsl:apply-templates select="." mode="html.title.attribute"/>
 </xsl:template>
 
-<xsl:template match="acronym|abbrev" mode="html.title.attribute">
-  <xsl:if test="alt">
+<xsl:template match="d:acronym|d:abbrev" mode="html.title.attribute">
+  <xsl:if test="d:alt">
     <xsl:attribute name="title">
-      <xsl:value-of select="normalize-space(alt)"/>
+      <xsl:value-of select="normalize-space(d:alt)"/>
     </xsl:attribute>
   </xsl:if>
 </xsl:template>
       </xsl:attribute>
     </xsl:when>
     <!-- Fall back to alt if available -->
-    <xsl:when test="alt">
+    <xsl:when test="d:alt">
       <xsl:attribute name="title">
-        <xsl:value-of select="normalize-space(alt)"/>
+        <xsl:value-of select="normalize-space(d:alt)"/>
       </xsl:attribute>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="html.title.attribute">
-  <xsl:apply-templates select="question" mode="html.title.attribute"/>
+<xsl:template match="d:qandaentry" mode="html.title.attribute">
+  <xsl:apply-templates select="d:question" mode="html.title.attribute"/>
 </xsl:template>
 
-<xsl:template match="question" mode="html.title.attribute">
+<xsl:template match="d:question" mode="html.title.attribute">
   <xsl:variable name="label.text">
     <xsl:apply-templates select="." mode="qanda.label"/>
   </xsl:variable>
       </xsl:attribute>
     </xsl:when>
     <!-- Fall back to alt if available -->
-    <xsl:when test="alt">
+    <xsl:when test="d:alt">
       <xsl:attribute name="title">
-        <xsl:value-of select="normalize-space(alt)"/>
+        <xsl:value-of select="normalize-space(d:alt)"/>
       </xsl:attribute>
     </xsl:when>
   </xsl:choose>
   <xsl:if test="$id.warnings != 0 and not(@id) and not(@xml:id) and parent::*">
     <xsl:variable name="title">
       <xsl:choose>
-        <xsl:when test="title">
-          <xsl:value-of select="title[1]"/>
+        <xsl:when test="d:title">
+          <xsl:value-of select="d:title[1]"/>
         </xsl:when>
         <xsl:when test="substring(local-name(*[1]),
                                   string-length(local-name(*[1])-3) = 'info')
-                        and *[1]/title">
-          <xsl:value-of select="*[1]/title[1]"/>
+                        and *[1]/d:title">
+          <xsl:value-of select="*[1]/d:title[1]"/>
         </xsl:when>
-        <xsl:when test="refmeta/refentrytitle">
-          <xsl:value-of select="refmeta/refentrytitle"/>
+        <xsl:when test="d:refmeta/d:refentrytitle">
+          <xsl:value-of select="d:refmeta/d:refentrytitle"/>
         </xsl:when>
-        <xsl:when test="refnamediv/refname">
-          <xsl:value-of select="refnamediv/refname[1]"/>
+        <xsl:when test="d:refnamediv/d:refname">
+          <xsl:value-of select="d:refnamediv/d:refname[1]"/>
         </xsl:when>
       </xsl:choose>
     </xsl:variable>
index 098829991254519bb4686e2a93ae3615f83bceee..36fcf714f391aa4cd06a48a301e8a5deecbd5dab 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <!-- ********************************************************************
 
 
 <!-- ==================================================================== -->
 
-<xsl:template match="table" mode="htmlTable">
+<xsl:template match="d:table" mode="htmlTable">
   <xsl:element name="table" namespace="">
     <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
     <xsl:call-template name="htmlTable"/>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="colgroup" mode="htmlTable">
+<xsl:template match="d:colgroup" mode="htmlTable">
   <xsl:element name="{local-name()}" namespace="">
     <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
     <xsl:apply-templates mode="htmlTable"/>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="col" mode="htmlTable">
+<xsl:template match="d:col" mode="htmlTable">
   <xsl:element name="{local-name()}" namespace="">
     <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
   </xsl:element>
 </xsl:template>
 
 <!-- Handled by formal.object.title template -->
-<xsl:template match="caption" mode="htmlTable"/>
+<xsl:template match="d:caption" mode="htmlTable"/>
 
-<xsl:template match="tbody|thead|tfoot|tr" mode="htmlTable">
+<xsl:template match="d:tbody|d:thead|d:tfoot|d:tr" mode="htmlTable">
   <xsl:element name="{local-name(.)}">
     <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
     <xsl:apply-templates mode="htmlTable"/>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="th|td" mode="htmlTable">
+<xsl:template match="d:th|d:td" mode="htmlTable">
   <xsl:element name="{local-name(.)}">
     <xsl:apply-templates select="@*" mode="htmlTableAtt"/>
     <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
index d7522265850d1b9fcca4461abbb1b3642359ef38..851e12a6f0415446ba04aefdc2ff0de2a3f4dc79 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="index">
+<xsl:template match="d:index">
   <!-- some implementations use completely empty index tags to indicate -->
   <!-- where an automatically generated index should be inserted. so -->
   <!-- if the index is completely empty, skip it. Unless generate.index -->
 
       <xsl:call-template name="index.titlepage"/>
       <xsl:choose>
-       <xsl:when test="indexdiv">
+       <xsl:when test="d:indexdiv">
          <xsl:apply-templates/>
        </xsl:when>
        <xsl:otherwise>
-         <xsl:apply-templates select="*[not(self::indexentry)]"/>
+         <xsl:apply-templates select="*[not(self::d:indexentry)]"/>
          <!-- Because it's actually valid for Index to have neither any -->
          <!-- Indexdivs nor any Indexentries, we need to check and make -->
          <!-- sure that at least one Indexentry exists, and generate a -->
          <!-- wrapper dl if there is at least one; otherwise, do nothing. -->
-         <xsl:if test="indexentry">
+         <xsl:if test="d:indexentry">
            <!-- The indexentry template assumes a parent dl wrapper has -->
            <!-- been generated; for Indexes that have Indexdivs, the dl -->
            <!-- wrapper is generated by the indexdiv template; however, -->
            <!-- for Indexes that lack Indexdivs, if we don't generate a -->
            <!-- dl here, HTML output will not be valid. -->
            <dl>
-             <xsl:apply-templates select="indexentry"/>
+             <xsl:apply-templates select="d:indexentry"/>
            </dl>
          </xsl:if>
        </xsl:otherwise>
       </xsl:choose>
 
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+      <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
         <xsl:call-template name="generate-index">
-          <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+          <xsl:with-param name="scope" select="(ancestor::d:book|/)[last()]"/>
         </xsl:call-template>
       </xsl:if>
 
-      <xsl:if test="not(parent::article)">
+      <xsl:if test="not(parent::d:article)">
         <xsl:call-template name="process.footnotes"/>
       </xsl:if>
     </div>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="setindex">
+<xsl:template match="d:setindex">
   <!-- some implementations use completely empty index tags to indicate -->
   <!-- where an automatically generated index should be inserted. so -->
   <!-- if the index is completely empty, skip it. Unless generate.index -->
       <xsl:call-template name="setindex.titlepage"/>
       <xsl:apply-templates/>
 
-      <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+      <xsl:if test="count(d:indexentry) = 0 and count(d:indexdiv) = 0">
         <xsl:call-template name="generate-index">
           <xsl:with-param name="scope" select="/"/>
         </xsl:call-template>
       </xsl:if>
 
-      <xsl:if test="not(parent::article)">
+      <xsl:if test="not(parent::d:article)">
         <xsl:call-template name="process.footnotes"/>
       </xsl:if>
     </div>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="index/indexinfo"></xsl:template>
-<xsl:template match="index/info"></xsl:template>
-<xsl:template match="index/title"></xsl:template>
-<xsl:template match="index/subtitle"></xsl:template>
-<xsl:template match="index/titleabbrev"></xsl:template>
+<xsl:template match="d:index/d:indexinfo"></xsl:template>
+<xsl:template match="d:index/d:info"></xsl:template>
+<xsl:template match="d:index/d:title"></xsl:template>
+<xsl:template match="d:index/d:subtitle"></xsl:template>
+<xsl:template match="d:index/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="indexdiv">
+<xsl:template match="d:indexdiv">
   <xsl:call-template name="id.warning"/>
 
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:apply-templates select="*[not(self::indexentry)]"/>
+    <xsl:apply-templates select="*[not(self::d:indexentry)]"/>
     <dl>
-      <xsl:apply-templates select="indexentry"/>
+      <xsl:apply-templates select="d:indexentry"/>
     </dl>
   </div>
 </xsl:template>
 
-<xsl:template match="indexdiv/title">
+<xsl:template match="d:indexdiv/d:title">
   <h3>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </h3>
 </xsl:template>
 
-<xsl:template match="indexdiv/subtitle">
+<xsl:template match="d:indexdiv/d:subtitle">
   <h4>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="indexterm">
+<xsl:template match="d:indexterm">
   <!-- this one must have a name, even if it doesn't have an ID -->
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   <a class="indexterm" name="{$id}"/>
 </xsl:template>
 
-<xsl:template match="primary|secondary|tertiary|see|seealso">
+<xsl:template match="d:primary|d:secondary|d:tertiary|d:see|d:seealso">
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="indexentry">
-  <xsl:apply-templates select="primaryie"/>
+<xsl:template match="d:indexentry">
+  <xsl:apply-templates select="d:primaryie"/>
 </xsl:template>
 
-<xsl:template match="primaryie">
+<xsl:template match="d:primaryie">
   <dt>
     <xsl:apply-templates/>
   </dt>
   <dd>
-    <xsl:apply-templates select="following-sibling::seeie
-                                   [not(preceding-sibling::secondaryie)]"
+    <xsl:apply-templates select="following-sibling::d:seeie
+                                   [not(preceding-sibling::d:secondaryie)]"
                          mode="indexentry"/>
-    <xsl:apply-templates select="following-sibling::seealsoie
-                                   [not(preceding-sibling::secondaryie)]"
+    <xsl:apply-templates select="following-sibling::d:seealsoie
+                                   [not(preceding-sibling::d:secondaryie)]"
                          mode="indexentry"/>
-    <xsl:apply-templates select="following-sibling::secondaryie"
+    <xsl:apply-templates select="following-sibling::d:secondaryie"
                          mode="indexentry"/>
   </dd>
 </xsl:template>
 
 <!-- Handled in mode to convert flat list to structured output -->
-<xsl:template match="secondaryie">
+<xsl:template match="d:secondaryie">
 </xsl:template>
-<xsl:template match="tertiaryie">
+<xsl:template match="d:tertiaryie">
 </xsl:template>
-<xsl:template match="seeie|seealsoie">
+<xsl:template match="d:seeie|d:seealsoie">
 </xsl:template>
 
-<xsl:template match="secondaryie" mode="indexentry">
+<xsl:template match="d:secondaryie" mode="indexentry">
   <dl>
     <dt>
       <xsl:apply-templates/>
       <xsl:variable name="after.this"
               select="following-sibling::*"/>
       <xsl:variable name="next.entry"
-              select="(following-sibling::secondaryie|following-sibling::tertiaryie)[1]"/>
+              select="(following-sibling::d:secondaryie|following-sibling::d:tertiaryie)[1]"/>
       <xsl:variable name="before.entry"
                     select="$next.entry/preceding-sibling::*"/>
       <xsl:variable name="see.intersection"
              select="$after.this[count(.|$before.entry) = count($before.entry)]
-                                [self::seeie or self::seealsoie]"/>
+                                [self::d:seeie or self::d:seealsoie]"/>
       <xsl:choose>
         <xsl:when test="count($see.intersection) != 0">
           <xsl:apply-templates select="$see.intersection" mode="indexentry"/>
         </xsl:when>
         <xsl:when test="count($next.entry) = 0">
-          <xsl:apply-templates select="following-sibling::seeie"
+          <xsl:apply-templates select="following-sibling::d:seeie"
                                mode="indexentry"/>
-          <xsl:apply-templates select="following-sibling::seealsoie"
+          <xsl:apply-templates select="following-sibling::d:seealsoie"
                                mode="indexentry"/>
         </xsl:when>
       </xsl:choose>
 
       <!-- now process any tertiaryie before the next secondaryie -->
       <xsl:variable name="before.next.secondary" 
-              select="following-sibling::secondaryie[1]/preceding-sibling::*"/>
+              select="following-sibling::d:secondaryie[1]/preceding-sibling::*"/>
       <xsl:variable name="tertiary.intersection"
              select="$after.this[count(.|$before.next.secondary) = 
                                  count($before.next.secondary)]
-                                [not(self::seeie) and not(self::seealsoie)]"/>
+                                [not(self::d:seeie) and not(self::d:seealsoie)]"/>
       <xsl:choose>
         <xsl:when test="count($tertiary.intersection) != 0">
           <xsl:apply-templates select="$tertiary.intersection"
                                mode="indexentry"/>
         </xsl:when>
-        <xsl:when test="not(following-sibling::secondaryie)">
-          <xsl:apply-templates select="following-sibling::tertiaryie"
+        <xsl:when test="not(following-sibling::d:secondaryie)">
+          <xsl:apply-templates select="following-sibling::d:tertiaryie"
                                mode="indexentry"/>
         </xsl:when>
       </xsl:choose>
   </dl>
 </xsl:template>
 
-<xsl:template match="tertiaryie" mode="indexentry">
+<xsl:template match="d:tertiaryie" mode="indexentry">
   <dl>
     <dt>
       <xsl:apply-templates/>
       <xsl:variable name="after.this"
               select="following-sibling::*"/>
       <xsl:variable name="next.entry"
-              select="(following-sibling::secondaryie|following-sibling::tertiaryie)[1]"/>
+              select="(following-sibling::d:secondaryie|following-sibling::d:tertiaryie)[1]"/>
       <xsl:variable name="before.entry"
                     select="$next.entry/preceding-sibling::*"/>
       <xsl:variable name="see.intersection"
              select="$after.this[count(.|$before.entry) = count($before.entry)]
-                                [self::seeie or self::seealsoie]"/>
+                                [self::d:seeie or self::d:seealsoie]"/>
       <xsl:choose>
         <xsl:when test="count($see.intersection) != 0">
           <xsl:apply-templates select="$see.intersection" mode="indexentry"/>
         </xsl:when>
         <xsl:when test="count($next.entry) = 0">
-          <xsl:apply-templates select="following-sibling::seeie"
+          <xsl:apply-templates select="following-sibling::d:seeie"
                                mode="indexentry"/>
-          <xsl:apply-templates select="following-sibling::seealsoie"
+          <xsl:apply-templates select="following-sibling::d:seealsoie"
                                mode="indexentry"/>
         </xsl:when>
       </xsl:choose>
   </dl>
 </xsl:template>
 
-<xsl:template match="seeie" mode="indexentry">
+<xsl:template match="d:seeie" mode="indexentry">
   <dt>
     <xsl:text>(</xsl:text>
     <xsl:call-template name="gentext">
   </dt>
 </xsl:template>
 
-<xsl:template match="seealsoie" mode="indexentry">
+<xsl:template match="d:seealsoie" mode="indexentry">
   <div>
     <xsl:text>(</xsl:text>
     <xsl:call-template name="gentext">
index cd22c8f52d2925ca40c2d5adb3aa1583807c3e6b..908507a36034a1513c908dd8e036a65d5963cbe6 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -20,7 +22,7 @@
 <!-- ==================================================================== -->
 <!-- called from named templates in a given mode -->
 
-<xsl:template match="corpauthor">
+<xsl:template match="d:corpauthor">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -30,7 +32,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="jobtitle">
+<xsl:template match="d:jobtitle">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
index f80c8ca50b91a83256b8a9c00e6787d0ed921cbb..e5844e0eaa690772bcf8183c0eeb4d91c158e2c0 100644 (file)
@@ -4,9 +4,10 @@
 %common.entities;
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xlink='http://www.w3.org/1999/xlink'
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xlink='http://www.w3.org/1999/xlink'
                 xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
-                exclude-result-prefixes="xlink suwl"
+                exclude-result-prefixes="xlink suwl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -17,8 +18,8 @@
 
      ******************************************************************** -->
 
-<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm)"/>
-<xsl:key name="glossentries" match="glossentry" use="normalize-space(glossterm/@baseform)"/>
+<xsl:key name="glossentries" match="d:glossentry" use="normalize-space(d:glossterm)"/>
+<xsl:key name="glossentries" match="d:glossentry" use="normalize-space(d:glossterm/@baseform)"/>
 
 <xsl:template name="simple.xlink">
   <xsl:param name="node" select="."/>
 <!-- ==================================================================== -->
 <!-- some special cases -->
 
-<xsl:template match="author">
+<xsl:template match="d:author">
   <xsl:param name="content">
     <xsl:call-template name="person.name"/>
   </xsl:param>
   </span>
 </xsl:template>
 
-<xsl:template match="editor">
+<xsl:template match="d:editor">
   <xsl:param name="content">
     <xsl:call-template name="person.name"/>
   </xsl:param>
   </span>
 </xsl:template>
 
-<xsl:template match="othercredit">
+<xsl:template match="d:othercredit">
   <xsl:param name="content">
     <xsl:call-template name="person.name"/>
   </xsl:param>
   </span>
 </xsl:template>
 
-<xsl:template match="authorinitials">
+<xsl:template match="d:authorinitials">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="accel">
+<xsl:template match="d:accel">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="action">
+<xsl:template match="d:action">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="application">
+<xsl:template match="d:application">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="classname">
+<xsl:template match="d:classname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="exceptionname">
+<xsl:template match="d:exceptionname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="interfacename">
+<xsl:template match="d:interfacename">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="methodname">
+<xsl:template match="d:methodname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="command">
+<xsl:template match="d:command">
   <xsl:call-template name="inline.boldseq"/>
 </xsl:template>
 
-<xsl:template match="computeroutput">
+<xsl:template match="d:computeroutput">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="constant">
+<xsl:template match="d:constant">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="database">
+<xsl:template match="d:database">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="date">
+<xsl:template match="d:date">
   <!-- should this support locale-specific formatting? how? -->
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errorcode">
+<xsl:template match="d:errorcode">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errorname">
+<xsl:template match="d:errorname">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errortype">
+<xsl:template match="d:errortype">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="errortext">
+<xsl:template match="d:errortext">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="envar">
+<xsl:template match="d:envar">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="filename">
+<xsl:template match="d:filename">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="function">
+<xsl:template match="d:function">
   <xsl:choose>
     <xsl:when test="$function.parens != '0'
-                    and (parameter or function or replaceable)">
+                    and (d:parameter or d:function or d:replaceable)">
       <xsl:variable name="nodes" select="text()|*"/>
       <xsl:call-template name="inline.monoseq">
         <xsl:with-param name="content">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="function/parameter" priority="2">
+<xsl:template match="d:function/d:parameter" priority="2">
   <xsl:call-template name="inline.italicmonoseq"/>
   <xsl:if test="$function.parens != 0 and following-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="function/replaceable" priority="2">
+<xsl:template match="d:function/d:replaceable" priority="2">
   <xsl:call-template name="inline.italicmonoseq"/>
   <xsl:if test="$function.parens != 0 and following-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="guibutton">
+<xsl:template match="d:guibutton">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guiicon">
+<xsl:template match="d:guiicon">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guilabel">
+<xsl:template match="d:guilabel">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guimenu">
+<xsl:template match="d:guimenu">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guimenuitem">
+<xsl:template match="d:guimenuitem">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="guisubmenu">
+<xsl:template match="d:guisubmenu">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="hardware">
+<xsl:template match="d:hardware">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="interface">
+<xsl:template match="d:interface">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="interfacedefinition">
+<xsl:template match="d:interfacedefinition">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="keycap">
+<xsl:template match="d:keycap">
   <xsl:choose>
     <xsl:when test="@function and normalize-space(.) = ''">
       <xsl:call-template name="inline.boldseq">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="keycode">
+<xsl:template match="d:keycode">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="keysym">
+<xsl:template match="d:keysym">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="literal">
+<xsl:template match="d:literal">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="code">
+<xsl:template match="d:code">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="medialabel">
+<xsl:template match="d:medialabel">
   <xsl:call-template name="inline.italicseq"/>
 </xsl:template>
 
-<xsl:template match="shortcut">
+<xsl:template match="d:shortcut">
   <xsl:call-template name="inline.boldseq"/>
 </xsl:template>
 
-<xsl:template match="mousebutton">
+<xsl:template match="d:mousebutton">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="option">
+<xsl:template match="d:option">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="package">
+<xsl:template match="d:package">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="parameter">
+<xsl:template match="d:parameter">
   <xsl:call-template name="inline.italicmonoseq"/>
 </xsl:template>
 
-<xsl:template match="property">
+<xsl:template match="d:property">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="prompt">
+<xsl:template match="d:prompt">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="replaceable" priority="1">
+<xsl:template match="d:replaceable" priority="1">
   <xsl:call-template name="inline.italicmonoseq"/>
 </xsl:template>
 
-<xsl:template match="returnvalue">
+<xsl:template match="d:returnvalue">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="structfield">
+<xsl:template match="d:structfield">
   <xsl:call-template name="inline.italicmonoseq"/>
 </xsl:template>
 
-<xsl:template match="structname">
+<xsl:template match="d:structname">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="symbol">
+<xsl:template match="d:symbol">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="systemitem">
+<xsl:template match="d:systemitem">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="token">
+<xsl:template match="d:token">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="type">
+<xsl:template match="d:type">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="userinput">
+<xsl:template match="d:userinput">
   <xsl:call-template name="inline.boldmonoseq"/>
 </xsl:template>
 
-<xsl:template match="abbrev">
+<xsl:template match="d:abbrev">
   <xsl:call-template name="inline.charseq">
     <xsl:with-param name="wrapper-name">abbr</xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="acronym">
+<xsl:template match="d:acronym">
   <xsl:call-template name="inline.charseq">
     <xsl:with-param name="wrapper-name">acronym</xsl:with-param>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="citerefentry">
+<xsl:template match="d:citerefentry">
   <xsl:choose>
     <xsl:when test="$citerefentry.link != '0'">
       <a>
 
 <xsl:template name="x.generate.citerefentry.link">
   <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
-  <xsl:value-of select="refentrytitle"/>
+  <xsl:value-of select="d:refentrytitle"/>
   <xsl:text>(</xsl:text>
-  <xsl:value-of select="manvolnum"/>
+  <xsl:value-of select="d:manvolnum"/>
   <xsl:text>)</xsl:text>
 </xsl:template>
 
-<xsl:template match="citetitle">
+<xsl:template match="d:citetitle">
   <xsl:choose>
     <xsl:when test="@pubwork = 'article'">
       <xsl:call-template name="gentext.startquote"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="emphasis">
+<xsl:template match="d:emphasis">
   <span>
     <xsl:call-template name="id.attribute"/>
     <xsl:choose>
   </span>
 </xsl:template>
 
-<xsl:template match="foreignphrase">
+<xsl:template match="d:foreignphrase">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="inline.italicseq"/>
   </span>
 </xsl:template>
 
-<xsl:template match="markup">
+<xsl:template match="d:markup">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="phrase">
+<xsl:template match="d:phrase">
   <span>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="locale.html.attributes"/>
   </span>
 </xsl:template>
 
-<xsl:template match="quote">
+<xsl:template match="d:quote">
   <xsl:variable name="depth">
     <xsl:call-template name="dot.count">
       <xsl:with-param name="string">
   </span>
 </xsl:template>
 
-<xsl:template match="varname">
+<xsl:template match="d:varname">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="wordasword">
+<xsl:template match="d:wordasword">
   <xsl:call-template name="inline.italicseq"/>
 </xsl:template>
 
-<xsl:template match="lineannotation">
+<xsl:template match="d:lineannotation">
   <em>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="inline.charseq"/>
   </em>
 </xsl:template>
 
-<xsl:template match="superscript">
+<xsl:template match="d:superscript">
   <xsl:call-template name="inline.superscriptseq"/>
 </xsl:template>
 
-<xsl:template match="subscript">
+<xsl:template match="d:subscript">
   <xsl:call-template name="inline.subscriptseq"/>
 </xsl:template>
 
-<xsl:template match="trademark">
+<xsl:template match="d:trademark">
   <xsl:call-template name="inline.charseq"/>
   <xsl:choose>
     <xsl:when test="@class = 'copyright'
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="firstterm">
+<xsl:template match="d:firstterm">
   <xsl:call-template name="glossterm">
     <xsl:with-param name="firstterm" select="1"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="glossterm" name="glossterm">
+<xsl:template match="d:glossterm" name="glossterm">
   <xsl:param name="firstterm" select="0"/>
 
   <!-- To avoid extra <a name=""> anchor from inline.italicseq -->
       </xsl:variable>
 
       <xsl:variable name="cterm"
-           select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+           select="(document($glossary.collection,.)//d:glossentry[d:glossterm=$term])[1]"/>
 
       <!-- HACK HACK HACK! But it works... -->
       <!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
 
-      <xsl:variable name="glossary" select="//glossary[@role='auto']"/>
+      <xsl:variable name="glossary" select="//d:glossary[@role='auto']"/>
 
       <xsl:if test="count($glossary) != 1">
         <xsl:message>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="termdef">
+<xsl:template match="d:termdef">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="gentext.template">
   </span>
 </xsl:template>
 
-<xsl:template match="sgmltag|tag">
+<xsl:template match="d:sgmltag|d:tag">
   <xsl:call-template name="format.sgmltag"/>
 </xsl:template>
 
   </code>
 </xsl:template>
 
-<xsl:template match="email">
+<xsl:template match="d:email">
   <xsl:call-template name="inline.monoseq">
     <xsl:with-param name="content">
       <xsl:if test="not($email.delimiters.enabled = 0)">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="keycombo">
+<xsl:template match="d:keycombo">
   <xsl:variable name="action" select="@action"/>
   <xsl:variable name="joinchar">
     <xsl:choose>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="uri">
+<xsl:template match="d:uri">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="menuchoice">
-  <xsl:variable name="shortcut" select="./shortcut"/>
+<xsl:template match="d:menuchoice">
+  <xsl:variable name="shortcut" select="./d:shortcut"/>
   <xsl:call-template name="process.menuchoice"/>
   <xsl:if test="$shortcut">
     <xsl:text> (</xsl:text>
 </xsl:template>
 
 <xsl:template name="process.menuchoice">
-  <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
+  <xsl:param name="nodelist" select="d:guibutton|d:guiicon|d:guilabel|d:guimenu|d:guimenuitem|d:guisubmenu|d:interface"/><!-- not(shortcut) -->
   <xsl:param name="count" select="1"/>
 
   <xsl:choose>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="optional">
+<xsl:template match="d:optional">
   <xsl:value-of select="$arg.choice.opt.open.str"/>
   <xsl:call-template name="inline.charseq"/>
   <xsl:value-of select="$arg.choice.opt.close.str"/>
 </xsl:template>
 
-<xsl:template match="citation">
+<xsl:template match="d:citation">
   <!-- todo: integrate with bibliography collection -->
-  <xsl:variable name="targets" select="(//biblioentry | //bibliomixed)[abbrev = string(current())]"/>
+  <xsl:variable name="targets" select="(//d:biblioentry | //d:bibliomixed)[d:abbrev = string(current())]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
     <!-- try automatic linking based on match to abbrev -->
-    <xsl:when test="$target and not(xref) and not(link)">
+    <xsl:when test="$target and not(d:xref) and not(d:link)">
 
       <xsl:text>[</xsl:text>
       <a>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="citebiblioid">
-  <xsl:variable name="targets" select="//*[biblioid = string(current())]"/>
+<xsl:template match="d:citebiblioid">
+  <xsl:variable name="targets" select="//*[d:biblioid = string(current())]"/>
   <xsl:variable name="target" select="$targets[1]"/>
 
   <xsl:choose>
     <!-- try automatic linking based on match to parent of biblioid -->
-    <xsl:when test="$target and not(xref) and not(link)">
+    <xsl:when test="$target and not(d:xref) and not(d:link)">
 
       <xsl:text>[</xsl:text>
       <a>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="citation">
-  <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="citation">
+  <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
               level="any" format="1"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
+<xsl:template match="d:comment[&comment.block.parents;]|d:remark[&comment.block.parents;]">
   <xsl:if test="$show.comments != 0">
     <p class="remark"><em><xsl:call-template name="inline.charseq"/></em></p>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="comment|remark">
+<xsl:template match="d:comment|d:remark">
   <xsl:if test="$show.comments != 0">
     <em><xsl:call-template name="inline.charseq"/></em>
   </xsl:if>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="productname">
+<xsl:template match="d:productname">
   <xsl:call-template name="inline.charseq"/>
   <xsl:if test="@class">
     <xsl:call-template name="dingbat">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="productnumber">
+<xsl:template match="d:productnumber">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
+<xsl:template match="d:pob|d:street|d:city|d:state|d:postcode|d:country|d:otheraddr">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="phone|fax">
+<xsl:template match="d:phone|d:fax">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- in Addresses, for example -->
-<xsl:template match="honorific|firstname|surname|lineage|othername">
+<xsl:template match="d:honorific|d:firstname|d:surname|d:lineage|d:othername">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="person">
+<xsl:template match="d:person">
   <xsl:param name="content">
-    <xsl:apply-templates select="personname"/>
+    <xsl:apply-templates select="d:personname"/>
   </xsl:param>
 
   <xsl:param name="contentwithlink">
   </span>
 </xsl:template>
 
-<xsl:template match="personname">
+<xsl:template match="d:personname">
   <xsl:param name="content">
     <xsl:call-template name="person.name"/>
   </xsl:param>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="org">
+<xsl:template match="d:org">
   <xsl:param name="content">
     <xsl:apply-templates/>
   </xsl:param>
   </span>
 </xsl:template>
 
-<xsl:template match="orgname">
+<xsl:template match="d:orgname">
   <xsl:param name="content">
     <xsl:apply-templates/>
   </xsl:param>
   </span>
 </xsl:template>
 
-<xsl:template match="orgdiv">
+<xsl:template match="d:orgdiv">
   <xsl:param name="content">
     <xsl:apply-templates/>
   </xsl:param>
   </span>
 </xsl:template>
 
-<xsl:template match="affiliation">
+<xsl:template match="d:affiliation">
   <xsl:param name="content">
     <xsl:call-template name="person.name"/>
   </xsl:param>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="beginpage">
+<xsl:template match="d:beginpage">
   <!-- does nothing; this *is not* markup to force a page break. -->
 </xsl:template>
 
index f1f3cc073097657032f1ddce9f2674209e9cbd5d..515d707957425d6c42c70b337133a85f962af8dc 100644 (file)
-<?xml version='1.0'?>\r
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-               xmlns:its="http://www.w3.org/2005/11/its"\r
-               exclude-result-prefixes="its"\r
-                version='1.0'>\r
-\r
-<!-- ********************************************************************\r
-\r
-     This file is part of the XSL DocBook Stylesheet distribution.\r
-     See ../README or http://cdn.docbook.org/release/xsl/current/ for\r
-     copyright and other information.\r
-\r
-     Templates in this stylesheet convert ITS 2.0 markup\r
-     http://www.w3.org/TR/its20/ into corresponding HTML5 attributes\r
-     (prefixed with its-*).\r
-\r
-     ******************************************************************** -->\r
-\r
-<!-- List of recognized ITS attributes -->\r
-<xsl:variable name="its-attrs"> its-allowed-characters its-annotators-ref its-line-break-type its-loc-note its-loc-note-ref its-loc-note-type its-loc-quality-issue-comment its-loc-quality-issue-enabled its-loc-quality-issue-profile-ref its-loc-quality-issue-severity its-loc-quality-issue-type its-loc-quality-issues-ref its-loc-quality-rating-profile-ref its-loc-quality-rating-score its-loc-quality-rating-score-threshold its-loc-quality-rating-vote its-loc-quality-rating-vote-threshold its-locale-filter-list its-locale-filter-type its-mt-confidence its-org its-org-ref its-person its-person-ref its-prov-ref its-provenance-records-ref its-rev-org its-rev-org-ref its-rev-person its-rev-person-ref its-rev-tool its-rev-tool-ref its-storage-encoding its-storage-size its-ta-class-ref its-ta-confidence its-ta-ident its-ta-ident-ref its-ta-source its-term its-term-confidence its-term-info-ref its-tool its-tool-ref its-within-text </xsl:variable>\r
-\r
-<xsl:template name="its.attributes">\r
-  <xsl:param name="inherit" select="0"/>\r
-  <xsl:apply-templates select="." mode="its.attributes">\r
-    <xsl:with-param name="inherit" select="$inherit"/>\r
-  </xsl:apply-templates>\r
-</xsl:template>\r
-\r
-<xsl:template match="*" mode="its.attributes">\r
-  <xsl:param name="inherit" select="0"/>\r
-\r
-  <xsl:choose>\r
-    <!-- Handle inheritance; especially necessary for chunking -->\r
-    <xsl:when test="$inherit = 1">\r
-      <xsl:variable name="attrs" select="ancestor-or-self::*/@*[namespace-uri() = 'http://www.w3.org/2005/11/its']"/>\r
-      <xsl:for-each select="$attrs">\r
-       <xsl:variable name="name" select="local-name(.)"/>\r
-       <xsl:if test="not(..//*/@*[local-name(.) = $name and (count(. | $attrs) = 1)])">\r
-         <xsl:apply-templates select="."/>\r
-       </xsl:if>\r
-      </xsl:for-each>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:apply-templates select="@*[namespace-uri() = 'http://www.w3.org/2005/11/its']"/>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-</xsl:template>\r
-\r
-<!-- translate attribute is special in HTML -->\r
-<xsl:template match="@its:translate">\r
-  <xsl:attribute name="translate">\r
-    <xsl:value-of select="."/>\r
-  </xsl:attribute>\r
-</xsl:template>\r
-\r
-<xsl:template match="@its:*">\r
-  <xsl:variable name="attr">\r
-    <xsl:call-template name="its-html-attribute-name">\r
-      <xsl:with-param name="name" select="local-name(.)"/>\r
-    </xsl:call-template>\r
-  </xsl:variable>\r
-\r
-  <xsl:choose>\r
-    <xsl:when test="contains($its-attrs, concat(' ', $attr, ' '))">\r
-      <xsl:attribute name="{$attr}">\r
-       <xsl:value-of select="."/>\r
-      </xsl:attribute>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:message>Attribute <xsl:value-of select="name(.)"/> is not recognized as ITS attribute. Ignoring.</xsl:message>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-</xsl:template>\r
-\r
-<xsl:template name="its-html-attribute-name">\r
-  <xsl:param name="name"/>\r
-\r
-  <xsl:text>its-</xsl:text>\r
-  <xsl:call-template name="its-camel-case-to-dashes">\r
-    <xsl:with-param name="text" select="$name"/>\r
-  </xsl:call-template>\r
-</xsl:template>\r
-\r
-<xsl:template name="its-camel-case-to-dashes">\r
-  <xsl:param name="text"/>\r
-\r
-  <xsl:variable name="first" select="substring($text, 1, 1)"/>\r
-  <xsl:variable name="rest" select="substring($text, 2)"/>\r
-\r
-  <xsl:choose>\r
-    <xsl:when test="$first != translate($first, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')">\r
-      <xsl:value-of select="'-'"/>\r
-      <xsl:value-of select="translate($first, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>\r
-    </xsl:when>\r
-    <xsl:otherwise>\r
-      <xsl:value-of select="$first"/>\r
-    </xsl:otherwise>\r
-  </xsl:choose>\r
-  \r
-  <xsl:if test="$rest != ''">\r
-  <xsl:call-template name="its-camel-case-to-dashes">\r
-      <xsl:with-param name="text" select="$rest"/>\r
-    </xsl:call-template>\r
-  </xsl:if>\r
-</xsl:template>\r
-\r
-</xsl:stylesheet>\r
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:its="http://www.w3.org/2005/11/its"
+               exclude-result-prefixes="its d"
+                version='1.0'>
+
+<!-- ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://cdn.docbook.org/release/xsl/current/ for
+     copyright and other information.
+
+     Templates in this stylesheet convert ITS 2.0 markup
+     http://www.w3.org/TR/its20/ into corresponding HTML5 attributes
+     (prefixed with its-*).
+
+     ******************************************************************** -->
+
+<!-- List of recognized ITS attributes -->
+<xsl:variable name="its-attrs"> its-allowed-characters its-annotators-ref its-line-break-type its-loc-note its-loc-note-ref its-loc-note-type its-loc-quality-issue-comment its-loc-quality-issue-enabled its-loc-quality-issue-profile-ref its-loc-quality-issue-severity its-loc-quality-issue-type its-loc-quality-issues-ref its-loc-quality-rating-profile-ref its-loc-quality-rating-score its-loc-quality-rating-score-threshold its-loc-quality-rating-vote its-loc-quality-rating-vote-threshold its-locale-filter-list its-locale-filter-type its-mt-confidence its-org its-org-ref its-person its-person-ref its-prov-ref its-provenance-records-ref its-rev-org its-rev-org-ref its-rev-person its-rev-person-ref its-rev-tool its-rev-tool-ref its-storage-encoding its-storage-size its-ta-class-ref its-ta-confidence its-ta-ident its-ta-ident-ref its-ta-source its-term its-term-confidence its-term-info-ref its-tool its-tool-ref its-within-text </xsl:variable>
+
+<xsl:template name="its.attributes">
+  <xsl:param name="inherit" select="0"/>
+  <xsl:apply-templates select="." mode="its.attributes">
+    <xsl:with-param name="inherit" select="$inherit"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="its.attributes">
+  <xsl:param name="inherit" select="0"/>
+
+  <xsl:choose>
+    <!-- Handle inheritance; especially necessary for chunking -->
+    <xsl:when test="$inherit = 1">
+      <xsl:variable name="attrs" select="ancestor-or-self::*/@*[namespace-uri() = 'http://www.w3.org/2005/11/its']"/>
+      <xsl:for-each select="$attrs">
+       <xsl:variable name="name" select="local-name(.)"/>
+       <xsl:if test="not(..//*/@*[local-name(.) = $name and (count(. | $attrs) = 1)])">
+         <xsl:apply-templates select="."/>
+       </xsl:if>
+      </xsl:for-each>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates select="@*[namespace-uri() = 'http://www.w3.org/2005/11/its']"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- translate attribute is special in HTML -->
+<xsl:template match="@its:translate">
+  <xsl:attribute name="translate">
+    <xsl:value-of select="."/>
+  </xsl:attribute>
+</xsl:template>
+
+<xsl:template match="@its:*">
+  <xsl:variable name="attr">
+    <xsl:call-template name="its-html-attribute-name">
+      <xsl:with-param name="name" select="local-name(.)"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:choose>
+    <xsl:when test="contains($its-attrs, concat(' ', $attr, ' '))">
+      <xsl:attribute name="{$attr}">
+       <xsl:value-of select="."/>
+      </xsl:attribute>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:message>Attribute <xsl:value-of select="name(.)"/> is not recognized as ITS attribute. Ignoring.</xsl:message>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="its-html-attribute-name">
+  <xsl:param name="name"/>
+
+  <xsl:text>its-</xsl:text>
+  <xsl:call-template name="its-camel-case-to-dashes">
+    <xsl:with-param name="text" select="$name"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="its-camel-case-to-dashes">
+  <xsl:param name="text"/>
+
+  <xsl:variable name="first" select="substring($text, 1, 1)"/>
+  <xsl:variable name="rest" select="substring($text, 2)"/>
+
+  <xsl:choose>
+    <xsl:when test="$first != translate($first, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')">
+      <xsl:value-of select="'-'"/>
+      <xsl:value-of select="translate($first, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$first"/>
+    </xsl:otherwise>
+  </xsl:choose>
+  
+  <xsl:if test="$rest != ''">
+  <xsl:call-template name="its-camel-case-to-dashes">
+      <xsl:with-param name="text" select="$rest"/>
+    </xsl:call-template>
+  </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
index bc8f5e6accb22e60fe10fc513f02c4d75107b44d..290ae0ac0374140d58440fe61905e6d1387be58f 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
 
      ******************************************************************** -->
 
-<xsl:template match="keywordset"></xsl:template>
-<xsl:template match="subjectset"></xsl:template>
+<xsl:template match="d:keywordset"></xsl:template>
+<xsl:template match="d:subjectset"></xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="keywordset" mode="html.header">
+<xsl:template match="d:keywordset" mode="html.header">
   <meta name="keywords">
     <xsl:attribute name="content">
-      <xsl:apply-templates select="keyword" mode="html.header"/>
+      <xsl:apply-templates select="d:keyword" mode="html.header"/>
     </xsl:attribute>
   </meta>
 </xsl:template>
 
-<xsl:template match="keyword" mode="html.header">
+<xsl:template match="d:keyword" mode="html.header">
   <xsl:apply-templates/>
-  <xsl:if test="following-sibling::keyword">, </xsl:if>
+  <xsl:if test="following-sibling::d:keyword">, </xsl:if>
 </xsl:template>
 
 <!-- ==================================================================== -->
index d3972edc6e7b466409bbc82aeb5f661622e55deb..4ab83f346db69cb06c6cafc63328e227bf52d44c 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="itemizedlist">
+<xsl:template match="d:itemizedlist">
   <!-- Handle spacing="compact" as multiple class attribute instead
        of the deprecated HTML compact attribute -->
   <xsl:variable name="default.class">
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:if test="title|info/title">
+    <xsl:if test="d:title|d:info/d:title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
     <!-- Preserve order of PIs and comments -->
     <xsl:apply-templates 
-        select="*[not(self::listitem
-                  or self::title
-                  or self::titleabbrev)]
-                |comment()[not(preceding-sibling::listitem)]
-                |processing-instruction()[not(preceding-sibling::listitem)]"/>
+        select="*[not(self::d:listitem
+                  or self::d:title
+                  or self::d:titleabbrev)]
+                |comment()[not(preceding-sibling::d:listitem)]
+                |processing-instruction()[not(preceding-sibling::d:listitem)]"/>
 
     <ul>
       <xsl:call-template name="generate.class.attribute">
       </xsl:choose>
 
       <xsl:apply-templates 
-            select="listitem
-                    |comment()[preceding-sibling::listitem]
-                    |processing-instruction()[preceding-sibling::listitem]"/>
+            select="d:listitem
+                    |comment()[preceding-sibling::d:listitem]
+                    |processing-instruction()[preceding-sibling::d:listitem]"/>
     </ul>
   </div>
 </xsl:template>
 
-<xsl:template match="itemizedlist/title">
+<xsl:template match="d:itemizedlist/d:title">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="itemizedlist/listitem">
+<xsl:template match="d:itemizedlist/d:listitem">
   <xsl:variable name="mark" select="../@mark"/>
   <xsl:variable name="override" select="@override"/>
 
   </li>
 </xsl:template>
 
-<xsl:template match="orderedlist">
+<xsl:template match="d:orderedlist">
   <!-- Handle spacing="compact" as multiple class attribute instead
        of the deprecated HTML compact attribute -->
   <xsl:variable name="default.class">
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
 
-    <xsl:if test="title|info/title">
+    <xsl:if test="d:title|d:info/d:title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
     <!-- Preserve order of PIs and comments -->
     <xsl:apply-templates 
-        select="*[not(self::listitem
-                  or self::title
-                  or self::titleabbrev)]
-                |comment()[not(preceding-sibling::listitem)]
-                |processing-instruction()[not(preceding-sibling::listitem)]"/>
+        select="*[not(self::d:listitem
+                  or self::d:title
+                  or self::d:titleabbrev)]
+                |comment()[not(preceding-sibling::d:listitem)]
+                |processing-instruction()[not(preceding-sibling::d:listitem)]"/>
 
     <xsl:choose>
-      <xsl:when test="@inheritnum='inherit' and ancestor::listitem[parent::orderedlist]">
+      <xsl:when test="@inheritnum='inherit' and ancestor::d:listitem[parent::d:orderedlist]">
         <table border="{$table.border.off}">
           <xsl:call-template name="generate.class.attribute">
             <xsl:with-param name="class" select="$default.class"/>
           <tbody>
             <xsl:apply-templates 
                 mode="orderedlist-table"
-                select="listitem
-                        |comment()[preceding-sibling::listitem]
-                        |processing-instruction()[preceding-sibling::listitem]"/>
+                select="d:listitem
+                        |comment()[preceding-sibling::d:listitem]
+                        |processing-instruction()[preceding-sibling::d:listitem]"/>
           </tbody>
         </table>
       </xsl:when>
             </xsl:attribute>
           </xsl:if>
           <xsl:apply-templates 
-                select="listitem
-                        |comment()[preceding-sibling::listitem]
-                        |processing-instruction()[preceding-sibling::listitem]"/>
+                select="d:listitem
+                        |comment()[preceding-sibling::d:listitem]
+                        |processing-instruction()[preceding-sibling::d:listitem]"/>
         </ol>
       </xsl:otherwise>
     </xsl:choose>
   </div>
 </xsl:template>
 
-<xsl:template match="orderedlist/title">
+<xsl:template match="d:orderedlist/d:title">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem">
+<xsl:template match="d:orderedlist/d:listitem">
   <li>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </li>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem" mode="orderedlist-table">
+<xsl:template match="d:orderedlist/d:listitem" mode="orderedlist-table">
   <tr>
     <td>
       <xsl:apply-templates select="." mode="item-number"/>
   </tr>
 </xsl:template>
 
-<xsl:template match="variablelist">
+<xsl:template match="d:variablelist">
   <xsl:variable name="pi-presentation">
     <xsl:call-template name="pi.dbhtml_list-presentation"/>
   </xsl:variable>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:if test="title|info/title">
+    <xsl:if test="d:title|d:info/d:title">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
       <xsl:when test="$presentation = 'table'">
         <!-- Preserve order of PIs and comments -->
         <xsl:apply-templates 
-          select="*[not(self::varlistentry
-                    or self::title
-                    or self::titleabbrev)]
-                  |comment()[not(preceding-sibling::varlistentry)]
-                  |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+          select="*[not(self::d:varlistentry
+                    or self::d:title
+                    or self::d:titleabbrev)]
+                  |comment()[not(preceding-sibling::d:varlistentry)]
+                  |processing-instruction()[not(preceding-sibling::d:varlistentry)]"/>
         <table border="{$table.border.off}">
           <xsl:call-template name="generate.class.attribute">
             <xsl:with-param name="class" select="$default.class"/>
           </colgroup>
           <tbody>
             <xsl:apply-templates mode="varlist-table"
-              select="varlistentry
-                      |comment()[preceding-sibling::varlistentry]
-                      |processing-instruction()[preceding-sibling::varlistentry]"/>
+              select="d:varlistentry
+                      |comment()[preceding-sibling::d:varlistentry]
+                      |processing-instruction()[preceding-sibling::d:varlistentry]"/>
           </tbody>
         </table>
       </xsl:when>
       <xsl:otherwise>
         <!-- Preserve order of PIs and comments -->
         <xsl:apply-templates 
-          select="*[not(self::varlistentry
-                    or self::title
-                    or self::titleabbrev)]
-                  |comment()[not(preceding-sibling::varlistentry)]
-                  |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+          select="*[not(self::d:varlistentry
+                    or self::d:title
+                    or self::d:titleabbrev)]
+                  |comment()[not(preceding-sibling::d:varlistentry)]
+                  |processing-instruction()[not(preceding-sibling::d:varlistentry)]"/>
         <dl>
           <xsl:call-template name="generate.class.attribute">
             <xsl:with-param name="class" select="$default.class"/>
           </xsl:call-template>
           <xsl:apply-templates 
-              select="varlistentry
-                      |comment()[preceding-sibling::varlistentry]
-                      |processing-instruction()[preceding-sibling::varlistentry]"/>
+              select="d:varlistentry
+                      |comment()[preceding-sibling::d:varlistentry]
+                      |processing-instruction()[preceding-sibling::d:varlistentry]"/>
         </dl>
       </xsl:otherwise>
     </xsl:choose>
   </div>
 </xsl:template>
 
-<xsl:template match="variablelist/title">
+<xsl:template match="d:variablelist/d:title">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
+<xsl:template match="d:itemizedlist/d:titleabbrev|d:orderedlist/d:titleabbrev">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="variablelist/titleabbrev">
+<xsl:template match="d:variablelist/d:titleabbrev">
   <!--nop-->
 </xsl:template>
 
-<xsl:template match="listitem" mode="xref">
+<xsl:template match="d:listitem" mode="xref">
   <xsl:number format="1"/>
 </xsl:template>
 
-<xsl:template match="listitem/simpara" priority="2">
+<xsl:template match="d:listitem/d:simpara" priority="2">
   <!-- If a listitem contains only a single simpara, don't output
        the <p> wrapper; this has the effect of creating an li
        with simple text content. -->
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="varlistentry">
+<xsl:template match="d:varlistentry">
   <dt>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:apply-templates select="term"/>
+    <xsl:apply-templates select="d:term"/>
   </dt>
   <dd>
-    <xsl:apply-templates select="listitem"/>
+    <xsl:apply-templates select="d:listitem"/>
   </dd>
 </xsl:template>
 
-<xsl:template match="varlistentry" mode="varlist-table">
+<xsl:template match="d:varlistentry" mode="varlist-table">
   <xsl:variable name="presentation">
     <xsl:call-template name="pi.dbhtml_term-presentation">
       <xsl:with-param name="node" select=".."/>
   <tr>
     <xsl:call-template name="tr.attributes">
       <xsl:with-param name="rownum">
-        <xsl:number from="variablelist" count="varlistentry"/>
+        <xsl:number from="d:variablelist" count="d:varlistentry"/>
       </xsl:with-param>
     </xsl:call-template>
 
       <xsl:choose>
         <xsl:when test="$presentation = 'bold'">
           <strong>
-            <xsl:apply-templates select="term"/>
+            <xsl:apply-templates select="d:term"/>
             <xsl:value-of select="$separator"/>
           </strong>
         </xsl:when>
         <xsl:when test="$presentation = 'italic'">
           <em>
-            <xsl:apply-templates select="term"/>
+            <xsl:apply-templates select="d:term"/>
             <xsl:value-of select="$separator"/>
           </em>
         </xsl:when>
         <xsl:when test="$presentation = 'bold-italic'">
           <strong>
             <em>
-              <xsl:apply-templates select="term"/>
+              <xsl:apply-templates select="d:term"/>
               <xsl:value-of select="$separator"/>
             </em>
           </strong>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="term"/>
+          <xsl:apply-templates select="d:term"/>
           <xsl:value-of select="$separator"/>
         </xsl:otherwise>
       </xsl:choose>
       </p>
     </td>
     <td>
-      <xsl:apply-templates select="listitem"/>
+      <xsl:apply-templates select="d:listitem"/>
     </td>
   </tr>
 </xsl:template>
 
-<xsl:template match="varlistentry/term">
+<xsl:template match="d:varlistentry/d:term">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="varlistentry/listitem">
+<xsl:template match="d:varlistentry/d:listitem">
   <!-- we can't just drop the anchor in since some browsers (Opera)
        get confused about line breaks if we do. So if the first child
        is a para, assume the para will put in the anchor. Otherwise,
 
 <!-- ==================================================================== -->
 
-<xsl:template match="simplelist">
+<xsl:template match="d:simplelist">
   <!-- with no type specified, the default is 'vert' -->
   <xsl:call-template name="anchor"/>
   <table border="{$table.border.off}">
   </table>
 </xsl:template>
 
-<xsl:template match="simplelist[@type='inline']">
+<xsl:template match="d:simplelist[@type='inline']">
   <span>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
       </xsl:choose>
     </xsl:variable>
   
-    <xsl:for-each select="member">
+    <xsl:for-each select="d:member">
       <xsl:call-template name="simple.xlink">
         <xsl:with-param name="content">
           <xsl:apply-templates/>
   </span>
 </xsl:template>
 
-<xsl:template match="simplelist[@type='horiz']">
+<xsl:template match="d:simplelist[@type='horiz']">
   <xsl:call-template name="anchor"/>
   <table border="{$table.border.off}">
     <xsl:if test="$div.element != 'section'">
   </table>
 </xsl:template>
 
-<xsl:template match="simplelist[@type='vert']">
+<xsl:template match="d:simplelist[@type='vert']">
   <xsl:call-template name="anchor"/>
   <table border="{$table.border.off}">
     <xsl:if test="$div.element != 'section'">
 <xsl:template name="simplelist.horiz">
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
 
   <xsl:if test="$cell &lt;= count($members)">
     <tr>
 <xsl:template name="simplelist.horiz.row">
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
   <xsl:param name="curcol">1</xsl:param>
 
   <xsl:if test="$curcol &lt;= $cols">
 <xsl:template name="simplelist.vert">
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
   <xsl:param name="rows"
              select="floor((count($members)+$cols - 1) div $cols)"/>
 
   <xsl:param name="cols">1</xsl:param>
   <xsl:param name="rows">1</xsl:param>
   <xsl:param name="cell">1</xsl:param>
-  <xsl:param name="members" select="./member"/>
+  <xsl:param name="members" select="./d:member"/>
   <xsl:param name="curcol">1</xsl:param>
 
   <xsl:if test="$curcol &lt;= $cols">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="member">
+<xsl:template match="d:member">
   <xsl:call-template name="anchor"/>
   <xsl:call-template name="simple.xlink">
     <xsl:with-param name="content">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="procedure">
+<xsl:template match="d:procedure">
   <xsl:variable name="param.placement"
                 select="substring-after(normalize-space($formal.title.placement),
                                         concat(local-name(.), ' '))"/>
 
   <!-- Preserve order of PIs and comments -->
   <xsl:variable name="preamble"
-        select="*[not(self::step
-                  or self::title
-                  or self::titleabbrev)]
-                |comment()[not(preceding-sibling::step)]
-                |processing-instruction()[not(preceding-sibling::step)]"/>
+        select="*[not(self::d:step
+                  or self::d:title
+                  or self::d:titleabbrev)]
+                |comment()[not(preceding-sibling::d:step)]
+                |processing-instruction()[not(preceding-sibling::d:step)]"/>
 
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute">
       <xsl:with-param name="conditional">
         <xsl:choose>
-          <xsl:when test="title">0</xsl:when>
+          <xsl:when test="d:title">0</xsl:when>
           <xsl:otherwise>1</xsl:otherwise>
         </xsl:choose>
       </xsl:with-param>
     <xsl:call-template name="anchor">
       <xsl:with-param name="conditional">
         <xsl:choose>
-          <xsl:when test="title|info/title|blockinfo/title">0</xsl:when>
+          <xsl:when test="d:title|d:info/d:title|d:blockinfo/d:title">0</xsl:when>
           <xsl:otherwise>1</xsl:otherwise>
         </xsl:choose>
       </xsl:with-param>
     </xsl:call-template>
 
-    <xsl:if test="(title or info/title or blockinfo/title) and $placement = 'before'">
+    <xsl:if test="(d:title or d:info/d:title or d:blockinfo/d:title) and $placement = 'before'">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
     <xsl:apply-templates select="$preamble"/>
 
     <xsl:choose>
-      <xsl:when test="count(step) = 1">
+      <xsl:when test="count(d:step) = 1">
         <ul>
           <xsl:call-template name="generate.class.attribute"/>
           <xsl:apply-templates 
-            select="step
-                    |comment()[preceding-sibling::step]
-                    |processing-instruction()[preceding-sibling::step]"/>
+            select="d:step
+                    |comment()[preceding-sibling::d:step]
+                    |processing-instruction()[preceding-sibling::d:step]"/>
         </ul>
       </xsl:when>
       <xsl:otherwise>
             <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
           </xsl:attribute>
           <xsl:apply-templates 
-            select="step
-                    |comment()[preceding-sibling::step]
-                    |processing-instruction()[preceding-sibling::step]"/>
+            select="d:step
+                    |comment()[preceding-sibling::d:step]
+                    |processing-instruction()[preceding-sibling::d:step]"/>
         </ol>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:if test="(title or info/title or blockinfo/title) and $placement != 'before'">
+    <xsl:if test="(d:title or d:info/d:title or d:blockinfo/d:title) and $placement != 'before'">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
   </div>
 </xsl:template>
 
-<xsl:template match="procedure/title">
+<xsl:template match="d:procedure/d:title">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="substeps">
+<xsl:template match="d:substeps">
   <xsl:variable name="numeration">
     <xsl:call-template name="procedure.step.numeration"/>
   </xsl:variable>
   </ol>
 </xsl:template>
 
-<xsl:template match="step">
+<xsl:template match="d:step">
   <li>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </li>
 </xsl:template>
 
-<xsl:template match="stepalternatives">
+<xsl:template match="d:stepalternatives">
   <xsl:call-template name="anchor"/>
   <ul>
     <xsl:call-template name="common.html.attributes"/>
   </ul>
 </xsl:template>
 
-<xsl:template match="step/title">
+<xsl:template match="d:step/d:title">
   <p>
     <xsl:call-template name="common.html.attributes"/>
     <b>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="segmentedlist">
+<xsl:template match="d:segmentedlist">
   <xsl:variable name="presentation">
     <xsl:call-template name="pi.dbhtml_list-presentation"/>
   </xsl:variable>
   </div>
 </xsl:template>
 
-<xsl:template match="segmentedlist/title">
+<xsl:template match="d:segmentedlist/d:title">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <strong>
   </div>
 </xsl:template>
 
-<xsl:template match="segtitle">
+<xsl:template match="d:segtitle">
 </xsl:template>
 
-<xsl:template match="segtitle" mode="segtitle-in-seg">
+<xsl:template match="d:segtitle" mode="segtitle-in-seg">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="seglistitem">
+<xsl:template match="d:seglistitem">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="seg">
-  <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
-  <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
-  <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+<xsl:template match="d:seg">
+  <xsl:variable name="segnum" select="count(preceding-sibling::d:seg)+1"/>
+  <xsl:variable name="seglist" select="ancestor::d:segmentedlist"/>
+  <xsl:variable name="segtitles" select="$seglist/d:segtitle"/>
 
   <!--
      Note: segtitle is only going to be the right thing in a well formed
   </div>
 </xsl:template>
 
-<xsl:template match="segmentedlist" mode="seglist-table">
+<xsl:template match="d:segmentedlist" mode="seglist-table">
   <xsl:variable name="table-summary">
     <xsl:call-template name="pi.dbhtml_table-summary"/>
   </xsl:variable>
     <xsl:call-template name="pi.dbhtml_list-width"/>
   </xsl:variable>
 
-  <xsl:apply-templates select="title"/>
+  <xsl:apply-templates select="d:title"/>
 
   <table border="{$table.border.off}">
     <xsl:if test="$list-width != ''">
     <thead>
       <tr class="segtitle">
         <xsl:call-template name="tr.attributes">
-          <xsl:with-param name="row" select="segtitle[1]"/>
+          <xsl:with-param name="row" select="d:segtitle[1]"/>
           <xsl:with-param name="rownum" select="1"/>
         </xsl:call-template>
-        <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+        <xsl:apply-templates select="d:segtitle" mode="seglist-table"/>
       </tr>
     </thead>
     <tbody>
-      <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+      <xsl:apply-templates select="d:seglistitem" mode="seglist-table"/>
     </tbody>
   </table>
 </xsl:template>
 
-<xsl:template match="segtitle" mode="seglist-table">
+<xsl:template match="d:segtitle" mode="seglist-table">
   <th><xsl:apply-templates/></th>
 </xsl:template>
 
-<xsl:template match="seglistitem" mode="seglist-table">
+<xsl:template match="d:seglistitem" mode="seglist-table">
   <xsl:variable name="seglinum">
-    <xsl:number from="segmentedlist" count="seglistitem"/>
+    <xsl:number from="d:segmentedlist" count="d:seglistitem"/>
   </xsl:variable>
 
   <tr>
   </tr>
 </xsl:template>
 
-<xsl:template match="seg" mode="seglist-table">
+<xsl:template match="d:seg" mode="seglist-table">
   <td>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </td>
 </xsl:template>
 
-<xsl:template match="seg[1]" mode="seglist-table">
+<xsl:template match="d:seg[1]" mode="seglist-table">
   <td>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor">
-      <xsl:with-param name="node" select="ancestor::seglistitem"/>
+      <xsl:with-param name="node" select="ancestor::d:seglistitem"/>
     </xsl:call-template>
     <xsl:apply-templates/>
   </td>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="calloutlist">
+<xsl:template match="d:calloutlist">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
-    <xsl:if test="title|info/title">
+    <xsl:if test="d:title|d:info/d: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)]"/>
+         select="*[not(self::d:callout or self::d:title or self::d:titleabbrev)]
+                   |comment()[not(preceding-sibling::d:callout)]
+                   |processing-instruction()[not(preceding-sibling::d:callout)]"/>
 
     <xsl:choose>
       <xsl:when test="$callout.list.table != 0">
           <xsl:if test="$div.element != 'section'">
             <xsl:attribute name="summary">Callout list</xsl:attribute>
           </xsl:if>
-          <xsl:apply-templates select="callout
-                                |comment()[preceding-sibling::callout]
-                                |processing-instruction()[preceding-sibling::callout]"/>
+          <xsl:apply-templates select="d:callout
+                                |comment()[preceding-sibling::d:callout]
+                                |processing-instruction()[preceding-sibling::d:callout]"/>
         </table>
       </xsl:when>
       <xsl:otherwise>
         <dl>
           <xsl:apply-templates select="." mode="class.attribute"/>
-          <xsl:apply-templates select="callout
-                                |comment()[preceding-sibling::callout]
-                                |processing-instruction()[preceding-sibling::callout]"/>
+          <xsl:apply-templates select="d:callout
+                                |comment()[preceding-sibling::d:callout]
+                                |processing-instruction()[preceding-sibling::d:callout]"/>
         </dl>
       </xsl:otherwise>
     </xsl:choose>
   </div>
 </xsl:template>
 
-<xsl:template match="calloutlist/title">
+<xsl:template match="d:calloutlist/d:title">
 </xsl:template>
 
-<xsl:template match="callout">
+<xsl:template match="d:callout">
   <xsl:choose>
     <xsl:when test="$callout.list.table != 0">
       <tr>
         <xsl:call-template name="tr.attributes">
           <xsl:with-param name="rownum">
-            <xsl:number from="calloutlist" count="callout"/>
+            <xsl:number from="d:calloutlist" count="d:callout"/>
           </xsl:with-param>
         </xsl:call-template>
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="callout/simpara" priority="2">
+<xsl:template match="d:callout/d:simpara" priority="2">
   <!-- If a callout contains only a single simpara, don't output
        the <p> wrapper; this has the effect of creating an li
        with simple text content. -->
     </xsl:when>
     <xsl:when test="local-name($target)='area'">
       <xsl:choose>
-        <xsl:when test="$target/parent::areaset">
+        <xsl:when test="$target/parent::d:areaset">
           <xsl:call-template name="callout-bug">
             <xsl:with-param name="conum">
-              <xsl:apply-templates select="$target/parent::areaset"
+              <xsl:apply-templates select="$target/parent::d:areaset"
                                    mode="conumber"/>
             </xsl:with-param>
           </xsl:call-template>
index ed706075771cb6c9b1fabf7c6ca415ae399f4310..356e631859a6f7ba92413fdbcfac31d72338f7e8 100644 (file)
@@ -1,7 +1,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                version="1.0"
-                exclude-result-prefixes="doc">
+                exclude-result-prefixes="doc d">
 
 <!-- ********************************************************************
 
@@ -22,7 +23,7 @@
 
 <!-- refentry in autotoc.xsl does not use subtoc, so must
      handle it explicitly here. -->
-<xsl:template match="refentry" mode="toc">
+<xsl:template match="d:refentry" mode="toc">
   <xsl:param name="toc-context" select="."/>
 
   <xsl:call-template name="subtoc">
@@ -46,7 +47,7 @@
     <xsl:variable name="id">
       <xsl:call-template name="object.id"/>
     </xsl:variable>
-    <tocentry linkend="{$id}">
+    <d:tocentry linkend="{$id}">
       <xsl:processing-instruction name="dbhtml">
         <xsl:text>filename="</xsl:text>
         <xsl:value-of select="$filename"/>
@@ -55,7 +56,7 @@
       <xsl:text>&#xA;</xsl:text>
       <xsl:apply-templates mode="toc" select="$nodes"/>
       <xsl:call-template name="indent-spaces"/>
-    </tocentry>
+    </d:tocentry>
     <xsl:text>&#xA;</xsl:text>
   </xsl:if>
 </xsl:template>
index ae18bd04ae0e7a69433383244a57c4ff7950aa24..d38803d0e91c656d0f174156ba7f3a79c9066494 100644 (file)
@@ -1,7 +1,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 version="1.0"
-                exclude-result-prefixes="doc">
+                exclude-result-prefixes="doc d">
 
 <!-- ********************************************************************
 
index 75cec5a822f5ff31ff8613f9407316cd30043d8e..ae0db65c7ffba7b5773fc3dc5b08ad1b91a9212b 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:mml="http://www.w3.org/1998/Math/MathML"
-                exclude-result-prefixes="mml"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:mml="http://www.w3.org/1998/Math/MathML"
+                exclude-result-prefixes="mml d"
                 version='1.0'>
 
 <!-- ********************************************************************
 
      ******************************************************************** -->
 
-<xsl:template match="inlineequation">
+<xsl:template match="d:inlineequation">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="alt">
+<xsl:template match="d:alt">
 </xsl:template>
 
-<xsl:template match="mathphrase">
+<xsl:template match="d:mathphrase">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   <xsl:text>\bye &#xA;</xsl:text>
 </xsl:template>
 
-<xsl:template match="inlineequation" mode="collect.tex.math.plain">
+<xsl:template match="d:inlineequation" mode="collect.tex.math.plain">
   <xsl:variable name="filename">
     <xsl:choose>
-      <xsl:when test="graphic">
+      <xsl:when test="d:graphic">
         <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
+          <xsl:with-param name="object" select="d:graphic"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="inlinemediaobject/*"/>
+          <xsl:with-param name="olist" select="d:inlinemediaobject/*"/>
         </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
@@ -94,7 +95,7 @@
   <xsl:variable name="output.delims">
     <xsl:call-template name="tex.math.output.delims"/>
   </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
+  <xsl:variable name="tex" select="d:alt[@role='tex'] | d:inlinemediaobject/d:textobject[@role='tex']"/>
   <xsl:if test="$tex">
     <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
     <xsl:value-of select="$filename"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="equation|informalequation" mode="collect.tex.math.plain">
+<xsl:template match="d:equation|d:informalequation" mode="collect.tex.math.plain">
   <xsl:variable name="filename">
     <xsl:choose>
-      <xsl:when test="graphic">
+      <xsl:when test="d:graphic">
         <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
+          <xsl:with-param name="object" select="d:graphic"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="mediaobject/*"/>
+          <xsl:with-param name="olist" select="d:mediaobject/*"/>
         </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
   <xsl:variable name="output.delims">
     <xsl:call-template name="tex.math.output.delims"/>
   </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
+  <xsl:variable name="tex" select="d:alt[@role='tex'] | d:mediaobject/d:textobject[@role='tex']"/>
   <xsl:if test="$tex">
     <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
     <xsl:value-of select="$filename"/>
   <xsl:text>\end{document} &#xA;</xsl:text>
 </xsl:template>
 
-<xsl:template match="inlineequation" mode="collect.tex.math.latex">
+<xsl:template match="d:inlineequation" mode="collect.tex.math.latex">
   <xsl:variable name="filename">
     <xsl:choose>
-      <xsl:when test="graphic">
+      <xsl:when test="d:graphic">
         <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
+          <xsl:with-param name="object" select="d:graphic"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="inlinemediaobject/*"/>
+          <xsl:with-param name="olist" select="d:inlinemediaobject/*"/>
         </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
   <xsl:variable name="output.delims">
     <xsl:call-template name="tex.math.output.delims"/>
   </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
+  <xsl:variable name="tex" select="d:alt[@role='tex'] | d:inlinemediaobject/d:textobject[@role='tex']"/>
   <xsl:if test="$tex">
     <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
     <xsl:value-of select="$filename"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="equation|informalequation" mode="collect.tex.math.latex">
+<xsl:template match="d:equation|d:informalequation" mode="collect.tex.math.latex">
   <xsl:variable name="filename">
     <xsl:choose>
-      <xsl:when test="graphic">
+      <xsl:when test="d:graphic">
         <xsl:call-template name="mediaobject.filename">
-          <xsl:with-param name="object" select="graphic"/>
+          <xsl:with-param name="object" select="d:graphic"/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="select.mediaobject.filename">
-          <xsl:with-param name="olist" select="mediaobject/*"/>
+          <xsl:with-param name="olist" select="d:mediaobject/*"/>
         </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
   <xsl:variable name="output.delims">
     <xsl:call-template name="tex.math.output.delims"/>
   </xsl:variable>
-  <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
+  <xsl:variable name="tex" select="d:alt[@role='tex'] | d:mediaobject/d:textobject[@role='tex']"/>
   <xsl:if test="$tex">
     <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
     <xsl:value-of select="$filename"/>
 
 <xsl:template name="select.mediaobject.filename">
   <xsl:param name="olist"
-             select="imageobject|imageobjectco
-                     |videoobject|audioobject|textobject"/>
+             select="d:imageobject|d:imageobjectco
+                     |d:videoobject|d:audioobject|d:textobject"/>
 
   <xsl:variable name="mediaobject.index">
     <xsl:call-template name="select.mediaobject.index">
index ba1a60e3fae682303c58448c10ffd24129c8d1a2..58900d7bdc3c43e27fcc8c1d9c369a7f6948d1fb 100644 (file)
@@ -1,10 +1,11 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:saxon="http://icl.com/saxon"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:saxon="http://icl.com/saxon"
                 xmlns:lxslt="http://xml.apache.org/xslt"
                 xmlns:redirect="http://xml.apache.org/xalan/redirect"
                 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                version="1.1"
-                exclude-result-prefixes="doc"
+                exclude-result-prefixes="doc d"
                 extension-element-prefixes="saxon redirect lxslt">
 
 <!-- ********************************************************************
index c31ea172f6427174e4cd9729834b54d6d88a5bf8..844a085805377d59fd33d240e0743e32e41b1d59 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 version="1.0"
-                exclude-result-prefixes="doc">
+                exclude-result-prefixes="doc d">
 
 <!-- ********************************************************************
 
index cd63e35a68e9aee7dbf86ab6f1779e2dd94a83ae..c6f7399b2be3182ef87ba8de7ddae152d499a0e3 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="doc"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -966,7 +967,7 @@ specifications in one processing instruction:
   </refparameter>
 </doc:pi>
 <xsl:template name="pi.dbcmdlist">
-  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
+  <xsl:variable name="cmdsynopses" select="..//d:cmdsynopsis"/>
   <xsl:if test="count($cmdsynopses)&lt;1">
     <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
     </xsl:message>
@@ -996,7 +997,7 @@ specifications in one processing instruction:
   </refparameter>
 </doc:pi>
 <xsl:template name="pi.dbfunclist">
-  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
+  <xsl:variable name="funcsynopses" select="..//d:funcsynopsis"/>
   <xsl:if test="count($funcsynopses)&lt;1">
     <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
     </xsl:message>
index b71f678c4a6c17ed126c320e31f75209ce57b0b0..ada6311f2da1d9a92759614c1ff172ccd524791d 100644 (file)
@@ -1,7 +1,8 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                version="1.0"
-                exclude-result-prefixes="exsl">
+                exclude-result-prefixes="exsl d">
 
 <!-- ********************************************************************
 
index 06e3c8c2a16bd5ab5b0ebb387c2c2afeda869cae..f562ea10d845e53bc08a1bd8917dba18a76a5b43 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 version="1.0"
-                exclude-result-prefixes="doc">
+                exclude-result-prefixes="doc d">
 
 <!-- ********************************************************************
 
index ac86e69330fcc2eba4940ea8128794a9ab8907e5..307f2ec768f5deb4cc4582294976ddc7b25aec1f 100644 (file)
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
-  exclude-result-prefixes="exsl"
+  exclude-result-prefixes="exsl d"
   version="1.0">
 
 <!-- Support for the DocBook Publishers extension -->
-<xsl:template match="drama">
+<xsl:template match="d:drama">
 
   <div>
     <xsl:call-template name="common.html.attributes"/>
@@ -20,7 +21,7 @@
   </div>
 </xsl:template>
 
-<xsl:template match="stagedir">
+<xsl:template match="d:stagedir">
 
   <div>
     <xsl:call-template name="common.html.attributes"/>
@@ -42,7 +43,7 @@
   </div>
 </xsl:template>
 
-<xsl:template match="inlinestagedir">
+<xsl:template match="d:inlinestagedir">
 
   <span>
     <xsl:call-template name="common.html.attributes"/>
@@ -65,7 +66,7 @@
   </span>
 </xsl:template>
 
-<xsl:template match="linegroup">
+<xsl:template match="d:linegroup">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
         <xsl:if test="$make.clean.html = 0">
           <xsl:attribute name="style">display: table-cell; width: 15%</xsl:attribute>
         </xsl:if>
-        <xsl:apply-templates select="speaker"/>
+        <xsl:apply-templates select="d:speaker"/>
       </div>
 
       <div>
         <xsl:if test="$make.clean.html = 0">
           <xsl:attribute name="style">display: table-cell; width: 85%</xsl:attribute>
         </xsl:if>
-        <xsl:apply-templates select="*[not(self::speaker)]"/>
+        <xsl:apply-templates select="*[not(self::d:speaker)]"/>
       </div>
 
     </div>
   </div>
 </xsl:template>
 
-<xsl:template match="speaker">
+<xsl:template match="d:speaker">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="line">
+<xsl:template match="d:line">
   <div>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="drama/title"/>
-<xsl:template match="poetry/title"/>
-<xsl:template match="dialogue/title"/>
+<xsl:template match="d:drama/d:title"/>
+<xsl:template match="d:poetry/d:title"/>
+<xsl:template match="d:dialogue/d:title"/>
 
 </xsl:stylesheet>
index 14dd22edddc884a8970dff3582c1a320ee196a6b..cc9ca4312b9ccca48e062241d5519fb481870a22 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-                exclude-result-prefixes="doc"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -14,8 +15,8 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="qandaset">
-  <xsl:variable name="title" select="(blockinfo/title|info/title|title)[1]"/>
+<xsl:template match="d:qandaset">
+  <xsl:variable name="title" select="(d:blockinfo/d:title|d:info/d:title|d:title)[1]"/>
   <xsl:variable name="preamble" select="*[local-name(.) != 'title'
                                           and local-name(.) != 'titleabbrev'
                                           and local-name(.) != 'qandadiv'
@@ -43,7 +44,7 @@
       </xsl:call-template>
     </xsl:if>
     <xsl:if test="((contains($toc.params, 'toc') and $toc != '0') or $toc = '1')
-                  and not(ancestor::answer and not($qanda.nested.in.toc=0))">
+                  and not(ancestor::d:answer and not($qanda.nested.in.toc=0))">
       <xsl:call-template name="process.qanda.toc"/>
     </xsl:if>
     <xsl:apply-templates select="$preamble"/>
@@ -51,9 +52,9 @@
   </div>
 </xsl:template>
 
-<xsl:template match="qandaset/blockinfo/title|
-                     qandaset/info/title|
-                     qandaset/title">
+<xsl:template match="d:qandaset/d:blockinfo/d:title|
+                     d:qandaset/d:info/d:title|
+                     d:qandaset/d:title">
   <xsl:variable name="qalevel">
     <xsl:call-template name="qanda.section.level"/>
   </xsl:variable>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="qandaset/blockinfo|qandaset/info">
+<xsl:template match="d:qandaset/d:blockinfo|d:qandaset/d:info">
   <!-- what should this template really do? -->
-  <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
+  <xsl:apply-templates select="d:legalnotice" mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="qandadiv">
+<xsl:template match="d:qandadiv">
   <xsl:variable name="preamble" select="*[local-name(.) != 'title'
                                           and local-name(.) != 'titleabbrev'
                                           and local-name(.) != 'qandadiv'
                                           and local-name(.) != 'qandaentry']"/>
 
-  <xsl:if test="blockinfo/title|info/title|title">
+  <xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title">
     <tr class="qandadiv">
       <td align="{$direction.align.start}" valign="top" colspan="2">
-        <xsl:apply-templates select="(blockinfo/title|info/title|title)[1]"/>
+        <xsl:apply-templates select="(d:blockinfo/d:title|d:info/d:title|d:title)[1]"/>
       </td>
     </tr>
   </xsl:if>
       </td>
     </tr>
   </xsl:if>
-  <xsl:apply-templates select="qandadiv|qandaentry"/>
+  <xsl:apply-templates select="d:qandadiv|d:qandaentry"/>
 </xsl:template>
 
-<xsl:template match="qandadiv/blockinfo/title|
-                     qandadiv/info/title|
-                     qandadiv/title">
+<xsl:template match="d:qandadiv/d:blockinfo/d:title|
+                     d:qandadiv/d:info/d:title|
+                     d:qandadiv/d:title">
   <xsl:variable name="qalevel">
     <xsl:call-template name="qandadiv.section.level"/>
   </xsl:variable>
       <xsl:with-param name="node" select=".."/>
       <xsl:with-param name="conditional" select="0"/>
     </xsl:call-template>
-    <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+    <xsl:apply-templates select="parent::d:qandadiv" mode="label.markup"/>
     <xsl:if test="$qandadiv.autolabel != 0">
       <xsl:apply-templates select="." mode="intralabel.punctuation"/>
       <xsl:text> </xsl:text>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="qandaentry">
+<xsl:template match="d:qandaentry">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="question">
+<xsl:template match="d:question">
   <xsl:variable name="deflabel">
     <xsl:apply-templates select="." mode="qanda.defaultlabel"/>
   </xsl:variable>
     </td>
     <td align="{$direction.align.start}" valign="top">
       <xsl:choose>
-        <xsl:when test="$deflabel = 'none' and not(label)">
+        <xsl:when test="$deflabel = 'none' and not(d:label)">
           <b><xsl:apply-templates select="*[local-name(.) != 'label']"/></b>
         </xsl:when>
         <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="question" mode="qanda.label">
+<xsl:template match="d:question" mode="qanda.label">
   <xsl:variable name="deflabel">
     <xsl:apply-templates select="." mode="qanda.defaultlabel"/>
   </xsl:variable>
   <xsl:apply-templates select="." mode="label.markup"/>
-  <xsl:if test="contains($deflabel, 'number') and not(label)">
+  <xsl:if test="contains($deflabel, 'number') and not(d:label)">
     <xsl:apply-templates select="." mode="intralabel.punctuation"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="answer">
+<xsl:template match="d:answer">
   <xsl:variable name="deflabel">
     <xsl:apply-templates select="." mode="qanda.defaultlabel"/>
   </xsl:variable>
         and local-name(.) != 'qandaentry']"/>
       <!-- * handle nested answer/qandaentry instances -->
       <!-- * (bug 1509043 from Daniel Leidert) -->
-      <xsl:if test="descendant::question">
+      <xsl:if test="descendant::d:question">
         <xsl:call-template name="process.qandaset"/>
       </xsl:if>
     </td>
   </tr>
 </xsl:template>
 
-<xsl:template match="answer" mode="qanda.label">
+<xsl:template match="d:answer" mode="qanda.label">
   <xsl:apply-templates select="." mode="label.markup"/>
 </xsl:template>
 
-<xsl:template match="label">
+<xsl:template match="d:label">
   <xsl:apply-templates/>
 </xsl:template>
 
   <!-- * if user wants nested qandaset and qandaentry in main Qandaset TOC, -->
   <!-- * then don't also include the nested stuff in the sub TOCs -->
   <dl>
-    <xsl:apply-templates select="qandadiv" mode="qandatoc.mode"/>
-    <xsl:apply-templates select="qandaset|qandaentry" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="d:qandadiv" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="d:qandaset|d:qandaentry" mode="qandatoc.mode"/>
   </dl>
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="qandatoc.mode">
-  <dt><xsl:apply-templates select="title" mode="qandatoc.mode"/></dt>
+<xsl:template match="d:qandadiv" mode="qandatoc.mode">
+  <dt><xsl:apply-templates select="d:title" mode="qandatoc.mode"/></dt>
   <dd><xsl:call-template name="process.qanda.toc"/></dd>
 </xsl:template>
 
-<xsl:template match="qandadiv/blockinfo/title|
-                     qandadiv/info/title|
-                     qandadiv/title" mode="qandatoc.mode">
+<xsl:template match="d:qandadiv/d:blockinfo/d:title|
+                     d:qandadiv/d:info/d:title|
+                     d:qandadiv/d:title" mode="qandatoc.mode">
   <xsl:variable name="qalevel">
     <xsl:call-template name="qandadiv.section.level"/>
   </xsl:variable>
   </xsl:variable>
 
   <xsl:variable name="div.label">
-    <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+    <xsl:apply-templates select="parent::d:qandadiv" mode="label.markup"/>
   </xsl:variable>
   <xsl:if test="string-length($div.label) != 0">
     <xsl:copy-of select="$div.label"/>
   </a>
 </xsl:template>
 
-<xsl:template match="qandaset" mode="qandatoc.mode">
-  <xsl:for-each select="qandaentry">
+<xsl:template match="d:qandaset" mode="qandatoc.mode">
+  <xsl:for-each select="d:qandaentry">
     <xsl:apply-templates select="." mode="qandatoc.mode"/>
   </xsl:for-each>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="qandatoc.mode">
-  <xsl:apply-templates select="question" mode="qandatoc.mode"/>
+<xsl:template match="d:qandaentry" mode="qandatoc.mode">
+  <xsl:apply-templates select="d:question" mode="qandatoc.mode"/>
 </xsl:template>
 
-<xsl:template match="question" mode="qandatoc.mode">
+<xsl:template match="d:question" mode="qandatoc.mode">
   <xsl:variable name="firstch">
     <!-- Use a titleabbrev or title if available -->
     <xsl:choose>
-      <xsl:when test="../blockinfo/titleabbrev">
-        <xsl:apply-templates select="../blockinfo/titleabbrev[1]/node()"/>
+      <xsl:when test="../d:blockinfo/d:titleabbrev">
+        <xsl:apply-templates select="../d:blockinfo/d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../blockinfo/title">
-        <xsl:apply-templates select="../blockinfo/title[1]/node()"/>
+      <xsl:when test="../d:blockinfo/d:title">
+        <xsl:apply-templates select="../d:blockinfo/d:title[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../info/titleabbrev">
-        <xsl:apply-templates select="../info/titleabbrev[1]/node()"/>
+      <xsl:when test="../d:info/d:titleabbrev">
+        <xsl:apply-templates select="../d:info/d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../titleabbrev">
-        <xsl:apply-templates select="../titleabbrev[1]/node()"/>
+      <xsl:when test="../d:titleabbrev">
+        <xsl:apply-templates select="../d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../info/title">
-        <xsl:apply-templates select="../info/title[1]/node()"/>
+      <xsl:when test="../d:info/d:title">
+        <xsl:apply-templates select="../d:info/d:title[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../title">
-        <xsl:apply-templates select="../title[1]/node()"/>
+      <xsl:when test="../d:title">
+        <xsl:apply-templates select="../d:title[1]/node()"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates select="(*[local-name(.)!='label'])[1]/node()"/>
 
   <dt>
     <xsl:apply-templates select="." mode="label.markup"/>
-    <xsl:if test="contains($deflabel,'number') and not(label)">
+    <xsl:if test="contains($deflabel,'number') and not(d:label)">
       <xsl:apply-templates select="." mode="intralabel.punctuation"/>
     </xsl:if>
     <xsl:text> </xsl:text>
   </dt>
   <!-- * include nested qandaset/qandaentry in TOC if user wants it -->
   <xsl:if test="not($qanda.nested.in.toc = 0)">
-    <xsl:apply-templates select="following-sibling::answer" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="following-sibling::d:answer" mode="qandatoc.mode"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="answer" mode="qandatoc.mode">
-  <xsl:if test="descendant::question">
+<xsl:template match="d:answer" mode="qandatoc.mode">
+  <xsl:if test="descendant::d:question">
     <dd>
       <xsl:call-template name="process.qanda.toc"/>
     </dd>
       <col/>
     </colgroup>
     <tbody>
-      <xsl:apply-templates select="qandaentry|qandadiv"/>
+      <xsl:apply-templates select="d:qandaentry|d:qandadiv"/>
     </tbody>
   </table>
 </xsl:template>
index a52341fd3b1e4f4717e5b8d74e12293da821da56..14872f60896354eed06f4434fbe2a5e905d23119 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="reference">
+<xsl:template match="d:reference">
   <xsl:call-template name="id.warning"/>
 
   <div>
       </xsl:call-template>
     </xsl:variable>
 
-    <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
+    <xsl:if test="not(d:partintro) and contains($toc.params, 'toc')">
       <xsl:call-template name="division.toc"/>
     </xsl:if>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="reference" mode="division.number">
-  <xsl:number from="book" count="reference" format="I."/>
+<xsl:template match="d:reference" mode="division.number">
+  <xsl:number from="d:book" count="d:reference" format="I."/>
 </xsl:template>
 
-<xsl:template match="reference/docinfo"></xsl:template>
-<xsl:template match="reference/referenceinfo"></xsl:template>
-<xsl:template match="reference/title"></xsl:template>
-<xsl:template match="reference/subtitle"></xsl:template>
-<xsl:template match="reference/titleabbrev"></xsl:template>
+<xsl:template match="d:reference/d:docinfo"></xsl:template>
+<xsl:template match="d:reference/d:referenceinfo"></xsl:template>
+<xsl:template match="d:reference/d:title"></xsl:template>
+<xsl:template match="d:reference/d:subtitle"></xsl:template>
+<xsl:template match="d:reference/d:titleabbrev"></xsl:template>
 
 <!-- ==================================================================== -->
 
 <xsl:template name="refentry.title">
   <xsl:param name="node" select="."/>
-  <xsl:variable name="refmeta" select="$node//refmeta"/>
-  <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
-  <xsl:variable name="refnamediv" select="$node//refnamediv"/>
-  <xsl:variable name="refname" select="$refnamediv//refname"/>
-  <xsl:variable name="refdesc" select="$refnamediv//refdescriptor"/>
+  <xsl:variable name="refmeta" select="$node//d:refmeta"/>
+  <xsl:variable name="refentrytitle" select="$refmeta//d:refentrytitle"/>
+  <xsl:variable name="refnamediv" select="$node//d:refnamediv"/>
+  <xsl:variable name="refname" select="$refnamediv//d:refname"/>
+  <xsl:variable name="refdesc" select="$refnamediv//d:refdescriptor"/>
   <xsl:variable name="title">
     <xsl:choose>
       <xsl:when test="$refentrytitle">
@@ -77,7 +79,7 @@
   </h1>
 </xsl:template>
 
-<xsl:template match="refentry">
+<xsl:template match="d:refentry">
   <xsl:call-template name="id.warning"/>
 
   <div>
@@ -87,7 +89,7 @@
     <xsl:call-template name="id.attribute">
       <xsl:with-param name="conditional" select="0"/>
     </xsl:call-template>
-    <xsl:if test="$refentry.separator != 0 and preceding-sibling::refentry">
+    <xsl:if test="$refentry.separator != 0 and preceding-sibling::d:refentry">
       <div class="refentry.separator">
         <hr/>
       </div>
   </div>
 </xsl:template>
 
-<xsl:template match="refentry/docinfo|refentry/refentryinfo"></xsl:template>
-<xsl:template match="refentry/info"></xsl:template>
+<xsl:template match="d:refentry/d:docinfo|d:refentry/d:refentryinfo"></xsl:template>
+<xsl:template match="d:refentry/d:info"></xsl:template>
 
-<xsl:template match="refentrytitle|refname|refdescriptor" mode="title">
+<xsl:template match="d:refentrytitle|d:refname|d:refdescriptor" mode="title">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="refmeta">
+<xsl:template match="d:refmeta">
 </xsl:template>
 
-<xsl:template match="manvolnum">
+<xsl:template match="d:manvolnum">
   <xsl:if test="$refentry.xref.manvolnum != 0">
     <xsl:text>(</xsl:text>
     <xsl:apply-templates/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refmiscinfo">
+<xsl:template match="d:refmiscinfo">
 </xsl:template>
 
-<xsl:template match="refentrytitle">
+<xsl:template match="d:refentrytitle">
   <xsl:call-template name="inline.charseq"/>
 </xsl:template>
 
-<xsl:template match="refnamediv">
+<xsl:template match="d:refnamediv">
   <div>
     <xsl:call-template name="common.html.attributes">
       <xsl:with-param name="inherit" select="1"/>
     <xsl:call-template name="anchor"/>
 
     <xsl:choose>
-      <xsl:when test="preceding-sibling::refnamediv">
+      <xsl:when test="preceding-sibling::d:refnamediv">
        <!-- no title on secondary refnamedivs! -->
       </xsl:when>
       <xsl:when test="$refentry.generate.name != 0">
       <xsl:when test="$refentry.generate.title != 0">
         <h2>
           <xsl:choose>
-            <xsl:when test="../refmeta/refentrytitle">
-              <xsl:apply-templates select="../refmeta/refentrytitle"/>
+            <xsl:when test="../d:refmeta/d:refentrytitle">
+              <xsl:apply-templates select="../d:refmeta/d:refentrytitle"/>
             </xsl:when>
             <xsl:otherwise>
-              <xsl:apply-templates select="refname[1]"/>
+              <xsl:apply-templates select="d:refname[1]"/>
             </xsl:otherwise>
           </xsl:choose>
         </h2>
   </div>
 </xsl:template>
 
-<xsl:template match="refname">
-  <xsl:if test="not(preceding-sibling::refdescriptor)">
+<xsl:template match="d:refname">
+  <xsl:if test="not(preceding-sibling::d:refdescriptor)">
     <xsl:apply-templates/>
-    <xsl:if test="following-sibling::refname">
+    <xsl:if test="following-sibling::d:refname">
       <xsl:text>, </xsl:text>
     </xsl:if>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refpurpose">
+<xsl:template match="d:refpurpose">
   <xsl:if test="node()">
     <xsl:text> </xsl:text>
     <xsl:call-template name="dingbat">
 </xsl:template>
 
 <!-- This handles repurpose in TOC line to turn off any nested links -->
-<xsl:template match="refpurpose" mode="no.anchor.mode">
+<xsl:template match="d:refpurpose" mode="no.anchor.mode">
   <xsl:if test="node()">
     <xsl:text> </xsl:text>
     <xsl:call-template name="dingbat">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refdescriptor">
+<xsl:template match="d:refdescriptor">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="refclass">
+<xsl:template match="d:refclass">
   <xsl:if test="$refclass.suppress = 0">
   <b>
     <xsl:if test="@role">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="refsynopsisdiv">
+<xsl:template match="d:refsynopsisdiv">
   <div>
     <xsl:call-template name="common.html.attributes">
       <xsl:with-param name="inherit" select="1"/>
     <xsl:call-template name="anchor"/>
     <h2>
       <xsl:choose>
-        <xsl:when test="refsynopsisdiv/title|title">
-          <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]"
+        <xsl:when test="d:refsynopsisdiv/d:title|d:title">
+          <xsl:apply-templates select="(d:refsynopsisdiv/d:title|d:title)[1]"
                                mode="titlepage.mode"/>
         </xsl:when>
         <xsl:otherwise>
   </div>
 </xsl:template>
 
-<xsl:template match="refsynopsisdivinfo"></xsl:template>
+<xsl:template match="d:refsynopsisdivinfo"></xsl:template>
 
-<xsl:template match="refsynopsisdiv/title">
+<xsl:template match="d:refsynopsisdiv/d:title">
 </xsl:template>
 
-<xsl:template match="refsynopsisdiv/title" mode="titlepage.mode">
+<xsl:template match="d:refsynopsisdiv/d:title" mode="titlepage.mode">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="refsection|refsect1|refsect2|refsect3">
+<xsl:template match="d:refsection|d:refsect1|d:refsect2|d:refsect3">
   <div>
     <xsl:call-template name="common.html.attributes">
       <xsl:with-param name="inherit" select="1"/>
       <xsl:with-param name="conditional" select="0"/>
     </xsl:call-template>
     <!-- pick up info title -->
-    <xsl:apply-templates select="(title|info/title)[1]"/>
-    <xsl:apply-templates select="node()[not(self::title) and not(self::info)]"/>
+    <xsl:apply-templates select="(d:title|d:info/d:title)[1]"/>
+    <xsl:apply-templates select="node()[not(self::d:title) and not(self::d:info)]"/>
   </div>
 </xsl:template>
 
-<xsl:template match="refsection/title|refsection/info/title">
+<xsl:template match="d:refsection/d:title|d:refsection/d:info/d:title">
   <!-- the ID is output in the block.object call for refsect1 -->
-  <xsl:variable name="level" select="count(ancestor-or-self::refsection)"/>
+  <xsl:variable name="level" select="count(ancestor-or-self::d:refsection)"/>
   <xsl:variable name="refsynopsisdiv">
     <xsl:text>0</xsl:text>
-    <xsl:if test="ancestor::refsynopsisdiv">1</xsl:if>
+    <xsl:if test="ancestor::d:refsynopsisdiv">1</xsl:if>
   </xsl:variable>
   <xsl:variable name="hlevel">
     <xsl:choose>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="refsect1/title|refsect1/info/title">
+<xsl:template match="d:refsect1/d:title|d:refsect1/d:info/d:title">
   <!-- the ID is output in the block.object call for refsect1 -->
   <h2>
     <xsl:apply-templates/>
   </h2>
 </xsl:template>
 
-<xsl:template match="refsect2/title|refsect2/info/title">
+<xsl:template match="d:refsect2/d:title|d:refsect2/d:info/d:title">
   <!-- the ID is output in the block.object call for refsect2 -->
   <h3>
     <xsl:apply-templates/>
   </h3>
 </xsl:template>
 
-<xsl:template match="refsect3/title|refsect3/info/title">
+<xsl:template match="d:refsect3/d:title|d:refsect3/d:info/d:title">
   <!-- the ID is output in the block.object call for refsect3 -->
   <h4>
     <xsl:apply-templates/>
   </h4>
 </xsl:template>
 
-<xsl:template match="refsectioninfo|refsection/info"></xsl:template>
-<xsl:template match="refsect1info|refsect1/info"></xsl:template>
-<xsl:template match="refsect2info|refsect2/info"></xsl:template>
-<xsl:template match="refsect3info|refsect3/info"></xsl:template>
+<xsl:template match="d:refsectioninfo|d:refsection/d:info"></xsl:template>
+<xsl:template match="d:refsect1info|d:refsect1/d:info"></xsl:template>
+<xsl:template match="d:refsect2info|d:refsect2/d:info"></xsl:template>
+<xsl:template match="d:refsect3info|d:refsect3/d:info"></xsl:template>
 
 
 <!-- ==================================================================== -->
index 91aa7174f857acdd74ba665743651524a48bbbaf..72e67ecbe511b81bb2f35c2d524dfdc29a63bf42 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,8 +14,8 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="section">
-  <xsl:variable name="depth" select="count(ancestor::section)+1"/>
+<xsl:template match="d:section">
+  <xsl:variable name="depth" select="count(ancestor::d:section)+1"/>
 
   <xsl:call-template name="id.warning"/>
 
 
 <xsl:template name="section.title">
   <!-- the context node should be the title of a section when called -->
-  <xsl:variable name="section" select="(ancestor::section
-                                        |ancestor::simplesect
-                                        |ancestor::sect1
-                                        |ancestor::sect2
-                                        |ancestor::sect3
-                                        |ancestor::sect4
-                                        |ancestor::sect5)[last()]"/>
+  <xsl:variable name="section" select="(ancestor::d:section
+                                        |ancestor::d:simplesect
+                                        |ancestor::d:sect1
+                                        |ancestor::d:sect2
+                                        |ancestor::d:sect3
+                                        |ancestor::d:sect4
+                                        |ancestor::d:sect5)[last()]"/>
 
   <xsl:variable name="renderas">
     <xsl:choose>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="section/title
-                    |section/info/title
-                    |sectioninfo/title" 
+<xsl:template match="d:section/d:title
+                    |d:section/d:info/d:title
+                    |d:sectioninfo/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="sect1">
+<xsl:template match="d:sect1">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect1/title
-                    |sect1/info/title
-                    |sect1info/title" 
+<xsl:template match="d:sect1/d:title
+                    |d:sect1/d:info/d:title
+                    |d:sect1info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="sect2">
+<xsl:template match="d:sect2">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect2/title
-                    |sect2/info/title
-                    |sect2info/title" 
+<xsl:template match="d:sect2/d:title
+                    |d:sect2/d:info/d:title
+                    |d:sect2info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="sect3">
+<xsl:template match="d:sect3">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect3/title
-                    |sect3/info/title
-                    |sect3info/title" 
+<xsl:template match="d:sect3/d:title
+                    |d:sect3/d:info/d:title
+                    |d:sect3info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="sect4">
+<xsl:template match="d:sect4">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect4/title
-                    |sect4/info/title
-                    |sect4info/title" 
+<xsl:template match="d:sect4/d:title
+                    |d:sect4/d:info/d:title
+                    |d:sect4info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="sect5">
+<xsl:template match="d:sect5">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="sect5/title
-                    |sect5/info/title
-                    |sect5info/title" 
+<xsl:template match="d:sect5/d:title
+                    |d:sect5/d:info/d:title
+                    |d:sect5info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="simplesect">
+<xsl:template match="d:simplesect">
   <xsl:call-template name="id.warning"/>
 
   <xsl:element name="{$div.element}">
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="simplesect/title|simplesect/info/title" 
+<xsl:template match="d:simplesect/d:title|d:simplesect/d:info/d:title"
               mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.title"/>
 </xsl:template>
 
-<xsl:template match="section/title"></xsl:template>
-<xsl:template match="section/titleabbrev"></xsl:template>
-<xsl:template match="section/subtitle"></xsl:template>
-<xsl:template match="sectioninfo"></xsl:template>
-<xsl:template match="section/info"></xsl:template>
-
-<xsl:template match="sect1/title"></xsl:template>
-<xsl:template match="sect1/titleabbrev"></xsl:template>
-<xsl:template match="sect1/subtitle"></xsl:template>
-<xsl:template match="sect1info"></xsl:template>
-<xsl:template match="sect1/info"></xsl:template>
-
-<xsl:template match="sect2/title"></xsl:template>
-<xsl:template match="sect2/subtitle"></xsl:template>
-<xsl:template match="sect2/titleabbrev"></xsl:template>
-<xsl:template match="sect2info"></xsl:template>
-<xsl:template match="sect2/info"></xsl:template>
-
-<xsl:template match="sect3/title"></xsl:template>
-<xsl:template match="sect3/subtitle"></xsl:template>
-<xsl:template match="sect3/titleabbrev"></xsl:template>
-<xsl:template match="sect3info"></xsl:template>
-<xsl:template match="sect3/info"></xsl:template>
-
-<xsl:template match="sect4/title"></xsl:template>
-<xsl:template match="sect4/subtitle"></xsl:template>
-<xsl:template match="sect4/titleabbrev"></xsl:template>
-<xsl:template match="sect4info"></xsl:template>
-<xsl:template match="sect4/info"></xsl:template>
-
-<xsl:template match="sect5/title"></xsl:template>
-<xsl:template match="sect5/subtitle"></xsl:template>
-<xsl:template match="sect5/titleabbrev"></xsl:template>
-<xsl:template match="sect5info"></xsl:template>
-<xsl:template match="sect5/info"></xsl:template>
-
-<xsl:template match="simplesect/title"></xsl:template>
-<xsl:template match="simplesect/subtitle"></xsl:template>
-<xsl:template match="simplesect/titleabbrev"></xsl:template>
-<xsl:template match="simplesect/info"></xsl:template>
+<xsl:template match="d:section/d:title"></xsl:template>
+<xsl:template match="d:section/d:titleabbrev"></xsl:template>
+<xsl:template match="d:section/d:subtitle"></xsl:template>
+<xsl:template match="d:sectioninfo"></xsl:template>
+<xsl:template match="d:section/d:info"></xsl:template>
+
+<xsl:template match="d:sect1/d:title"></xsl:template>
+<xsl:template match="d:sect1/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect1/d:subtitle"></xsl:template>
+<xsl:template match="d:sect1info"></xsl:template>
+<xsl:template match="d:sect1/d:info"></xsl:template>
+
+<xsl:template match="d:sect2/d:title"></xsl:template>
+<xsl:template match="d:sect2/d:subtitle"></xsl:template>
+<xsl:template match="d:sect2/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect2info"></xsl:template>
+<xsl:template match="d:sect2/d:info"></xsl:template>
+
+<xsl:template match="d:sect3/d:title"></xsl:template>
+<xsl:template match="d:sect3/d:subtitle"></xsl:template>
+<xsl:template match="d:sect3/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect3info"></xsl:template>
+<xsl:template match="d:sect3/d:info"></xsl:template>
+
+<xsl:template match="d:sect4/d:title"></xsl:template>
+<xsl:template match="d:sect4/d:subtitle"></xsl:template>
+<xsl:template match="d:sect4/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect4info"></xsl:template>
+<xsl:template match="d:sect4/d:info"></xsl:template>
+
+<xsl:template match="d:sect5/d:title"></xsl:template>
+<xsl:template match="d:sect5/d:subtitle"></xsl:template>
+<xsl:template match="d:sect5/d:titleabbrev"></xsl:template>
+<xsl:template match="d:sect5info"></xsl:template>
+<xsl:template match="d:sect5/d:info"></xsl:template>
+
+<xsl:template match="d:simplesect/d:title"></xsl:template>
+<xsl:template match="d:simplesect/d:subtitle"></xsl:template>
+<xsl:template match="d:simplesect/d:titleabbrev"></xsl:template>
+<xsl:template match="d:simplesect/d:info"></xsl:template>
 
 <!-- ==================================================================== -->
 
   <xsl:variable name="id">
     <xsl:choose>
       <!-- Make sure the subtitle doesn't get the same id as the title -->
-      <xsl:when test="self::subtitle">
+      <xsl:when test="self::d:subtitle">
         <xsl:call-template name="object.id">
           <xsl:with-param name="object" select="."/>
         </xsl:call-template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="bridgehead">
+<xsl:template match="d:bridgehead">
   <xsl:variable name="container"
-                select="(ancestor::appendix
-                        |ancestor::article
-                        |ancestor::bibliography
-                        |ancestor::chapter
-                        |ancestor::glossary
-                        |ancestor::glossdiv
-                        |ancestor::index
-                        |ancestor::partintro
-                        |ancestor::preface
-                        |ancestor::refsect1
-                        |ancestor::refsect2
-                        |ancestor::refsect3
-                        |ancestor::sect1
-                        |ancestor::sect2
-                        |ancestor::sect3
-                        |ancestor::sect4
-                        |ancestor::sect5
-                        |ancestor::section
-                        |ancestor::setindex
-                        |ancestor::simplesect)[last()]"/>
+                select="(ancestor::d:appendix
+                        |ancestor::d:article
+                        |ancestor::d:bibliography
+                        |ancestor::d:chapter
+                        |ancestor::d:glossary
+                        |ancestor::d:glossdiv
+                        |ancestor::d:index
+                        |ancestor::d:partintro
+                        |ancestor::d:preface
+                        |ancestor::d:refsect1
+                        |ancestor::d:refsect2
+                        |ancestor::d:refsect3
+                        |ancestor::d:sect1
+                        |ancestor::d:sect2
+                        |ancestor::d:sect3
+                        |ancestor::d:sect4
+                        |ancestor::d:sect5
+                        |ancestor::d:section
+                        |ancestor::d:setindex
+                        |ancestor::d:simplesect)[last()]"/>
 
   <xsl:variable name="clevel">
     <xsl:choose>
                       or local-name($container) = 'preface'
                       or local-name($container) = 'setindex'">1</xsl:when>
       <xsl:when test="local-name($container) = 'glossdiv'">
-        <xsl:value-of select="count(ancestor::glossdiv)+1"/>
+        <xsl:value-of select="count(ancestor::d:glossdiv)+1"/>
       </xsl:when>
       <xsl:when test="local-name($container) = 'sect1'
                       or local-name($container) = 'sect2'
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="section/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:section/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
-<xsl:template match="simplesect/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:simplesect/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
-<xsl:template match="sect1/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:sect1/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
-<xsl:template match="sect2/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:sect2/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
-<xsl:template match="sect3/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:sect3/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
-<xsl:template match="sect4/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:sect4/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
-<xsl:template match="sect5/subtitle" mode="titlepage.mode" priority="2">
+<xsl:template match="d:sect5/d:subtitle" mode="titlepage.mode" priority="2">
   <xsl:call-template name="section.subtitle"/>
 </xsl:template>
 
 <xsl:template name="section.subtitle">
   <!-- the context node should be the subtitle of a section when called -->
-  <xsl:variable name="section" select="(ancestor::section
-                                        |ancestor::simplesect
-                                        |ancestor::sect1
-                                        |ancestor::sect2
-                                        |ancestor::sect3
-                                        |ancestor::sect4
-                                        |ancestor::sect5)[last()]"/>
+  <xsl:variable name="section" select="(ancestor::d:section
+                                        |ancestor::d:simplesect
+                                        |ancestor::d:sect1
+                                        |ancestor::d:sect2
+                                        |ancestor::d:sect3
+                                        |ancestor::d:sect4
+                                        |ancestor::d:sect5)[last()]"/>
 
   <xsl:variable name="level">
     <xsl:call-template name="section.level">
index c48ea20cc11be0f5fa6aa97f1b5e5fccde6f878c..517c347a545138205ed7216add02300e4d501c8c 100644 (file)
@@ -2,8 +2,10 @@
 <!DOCTYPE xsl:stylesheet [
 <!ENTITY nbsp "&#160;">
 ]>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -19,7 +21,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="cmdsynopsis">
+<xsl:template match="d:cmdsynopsis">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <p>
   </div>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis/command">
+<xsl:template match="d:cmdsynopsis/d:command">
   <br/>
   <xsl:call-template name="inline.monoseq"/>
   <xsl:text> </xsl:text>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis/command[1]" priority="2">
+<xsl:template match="d:cmdsynopsis/d:command[1]" priority="2">
   <xsl:call-template name="inline.monoseq"/>
   <xsl:text> </xsl:text>
 </xsl:template>
 
-<xsl:template match="group|arg" name="group-or-arg">
+<xsl:template match="d:group|d:arg" name="group-or-arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:variable name="sepchar">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="group/arg">
+<xsl:template match="d:group/d:arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:if test="preceding-sibling::*">
   <xsl:call-template name="group-or-arg"/>
 </xsl:template>
 
-<xsl:template match="sbr">
+<xsl:template match="d:sbr">
   <br/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="synopfragmentref">
+<xsl:template match="d:synopfragmentref">
   <xsl:variable name="target" select="key('id',@linkend)"/>
   <xsl:variable name="snum">
     <xsl:apply-templates select="$target" mode="synopfragment.number"/>
   </i>
 </xsl:template>
 
-<xsl:template match="synopfragment" mode="synopfragment.number">
+<xsl:template match="d:synopfragment" mode="synopfragment.number">
   <xsl:number format="1"/>
 </xsl:template>
 
-<xsl:template match="synopfragment">
+<xsl:template match="d:synopfragment">
   <xsl:variable name="snum">
     <xsl:apply-templates select="." mode="synopfragment.number"/>
   </xsl:variable>
   </span>
 </xsl:template>
 
-<xsl:template match="funcsynopsis">
+<xsl:template match="d:funcsynopsis">
   <xsl:if test="..//processing-instruction('dbfunclist')">
     <!-- * Placing a dbfunclist PI as a child of a particular element -->
     <!-- * creates a hyperlinked list of all funcsynopsis instances that -->
   <xsl:call-template name="informal.object"/>
 </xsl:template>
 
-<xsl:template match="funcsynopsisinfo">
+<xsl:template match="d:funcsynopsisinfo">
   <pre>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -214,10 +216,10 @@ funcdef       ::= (#PCDATA|type|replaceable|function)*
 paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 -->
 
-<xsl:template match="funcprototype">
+<xsl:template match="d:funcprototype">
   <xsl:variable name="html-style">
     <xsl:call-template name="pi.dbhtml_funcsynopsis-style">
-      <xsl:with-param name="node" select="ancestor::funcsynopsis/descendant-or-self::*"/>
+      <xsl:with-param name="node" select="ancestor::d:funcsynopsis/descendant-or-self::*"/>
     </xsl:call-template>
   </xsl:variable>
 
@@ -263,17 +265,17 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 <!-- ====================================================================== -->
 <!-- funcprototype: kr, non-tabular -->
 
-<xsl:template match="funcprototype" mode="kr-nontabular">
+<xsl:template match="d:funcprototype" mode="kr-nontabular">
   <p>
     <xsl:apply-templates mode="kr-nontabular"/>
-    <xsl:if test="paramdef">
+    <xsl:if test="d:paramdef">
       <br/>
-      <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
+      <xsl:apply-templates select="d:paramdef" mode="kr-funcsynopsis-mode"/>
     </xsl:if>
   </p>
 </xsl:template>
 
-<xsl:template match="funcdef" mode="kr-nontabular">
+<xsl:template match="d:funcdef" mode="kr-nontabular">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -282,7 +284,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </code>
 </xsl:template>
 
-<xsl:template match="funcdef/function" mode="kr-nontabular">
+<xsl:template match="d:funcdef/d:function" mode="kr-nontabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
@@ -293,19 +295,19 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="void" mode="kr-nontabular">
+<xsl:template match="d:void" mode="kr-nontabular">
   <code>)</code>
   <xsl:text>;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varargs" mode="kr-nontabular">
+<xsl:template match="d:varargs" mode="kr-nontabular">
   <xsl:text>...</xsl:text>
   <code>)</code>
   <xsl:text>;</xsl:text>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr-nontabular">
-  <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
+<xsl:template match="d:paramdef" mode="kr-nontabular">
+  <xsl:apply-templates select="d:parameter" mode="kr-nontabular"/>
   <xsl:choose>
     <xsl:when test="following-sibling::*">
       <xsl:text>, </xsl:text>
@@ -317,7 +319,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter" mode="kr-nontabular">
+<xsl:template match="d:paramdef/d:parameter" mode="kr-nontabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <var class="pdparam">
@@ -332,15 +334,15 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
-  <xsl:if test="preceding-sibling::paramdef"><br/></xsl:if>
+<xsl:template match="d:paramdef" mode="kr-funcsynopsis-mode">
+  <xsl:if test="preceding-sibling::d:paramdef"><br/></xsl:if>
   <code>
     <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
   </code>
   <xsl:text>;</xsl:text>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter" mode="kr-funcsynopsis-mode">
+<xsl:template match="d:paramdef/d:parameter" mode="kr-funcsynopsis-mode">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <var class="pdparam">
@@ -355,7 +357,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="funcparams" mode="kr-funcsynopsis-mode">
+<xsl:template match="d:funcparams" mode="kr-funcsynopsis-mode">
   <code>(</code>
   <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
   <code>)</code>
@@ -364,7 +366,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 <!-- ====================================================================== -->
 <!-- funcprototype: kr, tabular -->
 
-<xsl:template match="funcprototype" mode="kr-tabular">
+<xsl:template match="d:funcprototype" mode="kr-tabular">
   <table border="{$table.border.off}" class="funcprototype-table">
     <xsl:if test="$div.element != 'section'">
       <xsl:attribute name="summary">Function synopsis</xsl:attribute>
@@ -374,26 +376,26 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
     </xsl:if>
     <tr>
       <td>
-        <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
+        <xsl:apply-templates select="d:funcdef" mode="kr-tabular"/>
       </td>
-      <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
+      <xsl:apply-templates select="(d:void|d:varargs|d:paramdef)[1]" mode="kr-tabular"/>
     </tr>
-    <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
+    <xsl:for-each select="(d:void|d:varargs|d:paramdef)[preceding-sibling::*[not(self::d:funcdef)]]">
       <tr>
         <td>&#160;</td>
         <xsl:apply-templates select="." mode="kr-tabular"/>
       </tr>
     </xsl:for-each>
   </table>
-  <xsl:if test="paramdef">
+  <xsl:if test="d:paramdef">
     <div class="paramdef-list">
-      <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
+      <xsl:apply-templates select="d:paramdef" mode="kr-funcsynopsis-mode"/>
     </div>
   </xsl:if>
   <div class="funcprototype-spacer">&#160;</div> <!-- hACk: blank div for vertical spacing -->
 </xsl:template>
 
-<xsl:template match="funcdef" mode="kr-tabular">
+<xsl:template match="d:funcdef" mode="kr-tabular">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -402,7 +404,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </code>
 </xsl:template>
 
-<xsl:template match="funcdef/function" mode="kr-tabular">
+<xsl:template match="d:funcdef/d:function" mode="kr-tabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
@@ -413,7 +415,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="void" mode="kr-tabular">
+<xsl:template match="d:void" mode="kr-tabular">
   <td>
     <code>)</code>
     <xsl:text>;</xsl:text>
@@ -421,7 +423,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <td>&#160;</td>
 </xsl:template>
 
-<xsl:template match="varargs" mode="kr-tabular">
+<xsl:template match="d:varargs" mode="kr-tabular">
   <td>
     <xsl:text>...</xsl:text>
     <code>)</code>
@@ -430,9 +432,9 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <td>&#160;</td>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr-tabular">
+<xsl:template match="d:paramdef" mode="kr-tabular">
   <td>
-    <xsl:apply-templates select="parameter" mode="kr-tabular"/>
+    <xsl:apply-templates select="d:parameter" mode="kr-tabular"/>
     <xsl:choose>
       <xsl:when test="following-sibling::*">
        <xsl:text>, </xsl:text>
@@ -446,7 +448,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <td>&#160;</td>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter" mode="kr-tabular">
+<xsl:template match="d:paramdef/d:parameter" mode="kr-tabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <var class="pdparam">
@@ -461,22 +463,22 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
+<xsl:template match="d:paramdef" mode="kr-tabular-funcsynopsis-mode">
   <xsl:variable name="type">
     <xsl:choose>
-      <xsl:when test="type">
-       <xsl:apply-templates select="type"
+      <xsl:when test="d:type">
+       <xsl:apply-templates select="d:type"
                             mode="kr-tabular-funcsynopsis-mode"/>
       </xsl:when>
-      <xsl:when test="normalize-space(parameter/preceding-sibling::node()[not(self::parameter)]) != ''">
-       <xsl:copy-of select="parameter/preceding-sibling::node()[not(self::parameter)]"/>
+      <xsl:when test="normalize-space(d:parameter/preceding-sibling::node()[not(self::d:parameter)]) != ''">
+       <xsl:copy-of select="d:parameter/preceding-sibling::node()[not(self::d:parameter)]"/>
       </xsl:when>
     </xsl:choose>
   </xsl:variable>
 
   <tr>
     <xsl:choose>
-      <xsl:when test="$type != '' and funcparams">
+      <xsl:when test="$type != '' and d:funcparams">
         <td>
          <code>
            <xsl:copy-of select="$type"/>
@@ -486,8 +488,8 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
         <td>
          <code>
            <xsl:choose>
-             <xsl:when test="type">
-               <xsl:apply-templates select="type/following-sibling::*"
+             <xsl:when test="d:type">
+               <xsl:apply-templates select="d:type/following-sibling::*"
                                     mode="kr-tabular-funcsynopsis-mode"/>
              </xsl:when>
              <xsl:otherwise>
@@ -499,7 +501,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
         </td>
       </xsl:when>
 
-      <xsl:when test="funcparams">
+      <xsl:when test="d:funcparams">
         <td colspan="2">
          <code>
            <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
@@ -510,16 +512,16 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
       <xsl:otherwise>
         <td>
          <code>
-           <xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]"
+           <xsl:apply-templates select="d:parameter/preceding-sibling::node()[not(self::d:parameter)]"
                                 mode="kr-tabular-funcsynopsis-mode"/>
          </code>
           <xsl:text>&#160;</xsl:text>
         </td>
         <td>
          <code>
-           <xsl:apply-templates select="parameter"
+           <xsl:apply-templates select="d:parameter"
                                 mode="kr-tabular"/>
-           <xsl:apply-templates select="parameter/following-sibling::*[not(self::parameter)]"
+           <xsl:apply-templates select="d:parameter/following-sibling::*[not(self::d:parameter)]"
                                 mode="kr-tabular-funcsynopsis-mode"/>
            <xsl:text>;</xsl:text>
          </code>
@@ -529,7 +531,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </tr>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
+<xsl:template match="d:paramdef/d:parameter" mode="kr-tabular-funcsynopsis-mode">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <var class="pdparam">
@@ -544,7 +546,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
+<xsl:template match="d:funcparams" mode="kr-tabular-funcsynopsis-mode">
   <code>(</code>
   <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
   <code>)</code>
@@ -554,13 +556,13 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 <!-- ====================================================================== -->
 <!-- funcprototype: ansi, non-tabular -->
 
-<xsl:template match="funcprototype" mode="ansi-nontabular">
+<xsl:template match="d:funcprototype" mode="ansi-nontabular">
   <p>
     <xsl:apply-templates mode="ansi-nontabular"/>
   </p>
 </xsl:template>
 
-<xsl:template match="funcdef" mode="ansi-nontabular">
+<xsl:template match="d:funcdef" mode="ansi-nontabular">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -569,7 +571,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </code>
 </xsl:template>
 
-<xsl:template match="funcdef/function" mode="ansi-nontabular">
+<xsl:template match="d:funcdef/d:function" mode="ansi-nontabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
@@ -580,18 +582,18 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="void" mode="ansi-nontabular">
+<xsl:template match="d:void" mode="ansi-nontabular">
   <code>void)</code>
   <xsl:text>;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varargs" mode="ansi-nontabular">
+<xsl:template match="d:varargs" mode="ansi-nontabular">
   <xsl:text>...</xsl:text>
   <code>)</code>
   <xsl:text>;</xsl:text>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="ansi-nontabular">
+<xsl:template match="d:paramdef" mode="ansi-nontabular">
   <xsl:apply-templates mode="ansi-nontabular"/>
   <xsl:choose>
     <xsl:when test="following-sibling::*">
@@ -604,7 +606,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter" mode="ansi-nontabular">
+<xsl:template match="d:paramdef/d:parameter" mode="ansi-nontabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <var class="pdparam">
@@ -619,7 +621,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="funcparams" mode="ansi-nontabular">
+<xsl:template match="d:funcparams" mode="ansi-nontabular">
   <code>(</code>
   <xsl:apply-templates mode="ansi-nontabular"/>
   <code>)</code>
@@ -628,7 +630,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 <!-- ====================================================================== -->
 <!-- funcprototype: ansi, tabular -->
 
-<xsl:template match="funcprototype" mode="ansi-tabular">
+<xsl:template match="d:funcprototype" mode="ansi-tabular">
   <table border="{$table.border.off}" 
     class="funcprototype-table"
     >
@@ -640,11 +642,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
     </xsl:if>
     <tr>
       <td>
-        <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
+        <xsl:apply-templates select="d:funcdef" mode="ansi-tabular"/>
       </td>
-      <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
+      <xsl:apply-templates select="(d:void|d:varargs|d:paramdef)[1]" mode="ansi-tabular"/>
     </tr>
-    <xsl:for-each select="(void|varargs|paramdef)[preceding-sibling::*[not(self::funcdef)]]">
+    <xsl:for-each select="(d:void|d:varargs|d:paramdef)[preceding-sibling::*[not(self::d:funcdef)]]">
       <tr>
         <td>&#160;</td>
         <xsl:apply-templates select="." mode="ansi-tabular"/>
@@ -654,7 +656,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <div class="funcprototype-spacer">&#160;</div> <!-- hACk: blank div for vertical spacing -->
 </xsl:template>
 
-<xsl:template match="funcdef" mode="ansi-tabular">
+<xsl:template match="d:funcdef" mode="ansi-tabular">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -663,7 +665,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </code>
 </xsl:template>
 
-<xsl:template match="funcdef/function" mode="ansi-tabular">
+<xsl:template match="d:funcdef/d:function" mode="ansi-tabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
@@ -674,7 +676,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="void" mode="ansi-tabular">
+<xsl:template match="d:void" mode="ansi-tabular">
   <td>
     <code>void)</code>
     <xsl:text>;</xsl:text>
@@ -682,7 +684,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <td>&#160;</td>
 </xsl:template>
 
-<xsl:template match="varargs" mode="ansi-tabular">
+<xsl:template match="d:varargs" mode="ansi-tabular">
   <td>
     <xsl:text>...</xsl:text>
     <code>)</code>
@@ -691,7 +693,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <td>&#160;</td>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="ansi-tabular">
+<xsl:template match="d:paramdef" mode="ansi-tabular">
       <td>
         <xsl:apply-templates mode="ansi-tabular"/>
         <xsl:choose>
@@ -706,7 +708,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
       </td>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter" mode="ansi-tabular">
+<xsl:template match="d:paramdef/d:parameter" mode="ansi-tabular">
   <xsl:choose>
     <xsl:when test="$funcsynopsis.decoration != 0">
       <var class="pdparam">
@@ -721,7 +723,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="funcparams" mode="ansi-tabular">
+<xsl:template match="d:funcparams" mode="ansi-tabular">
   <code>(</code>
   <xsl:apply-templates/>
   <code>)</code>
@@ -731,11 +733,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 
 <xsl:variable name="default-classsynopsis-language">java</xsl:variable>
 
-<xsl:template match="classsynopsis
-                     |fieldsynopsis
-                     |methodsynopsis
-                     |constructorsynopsis
-                     |destructorsynopsis">
+<xsl:template match="d:classsynopsis
+                     |d:fieldsynopsis
+                     |d:methodsynopsis
+                     |d:constructorsynopsis
+                     |d:destructorsynopsis">
   <xsl:param name="language">
     <xsl:choose>
       <xsl:when test="@language">
@@ -776,11 +778,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 </xsl:template>
 
 <xsl:template name="synop-break">
-  <xsl:if test="parent::classsynopsis
-                or (following-sibling::fieldsynopsis
-                    |following-sibling::methodsynopsis
-                    |following-sibling::constructorsynopsis
-                    |following-sibling::destructorsynopsis)">
+  <xsl:if test="parent::d:classsynopsis
+                or (following-sibling::d:fieldsynopsis
+                    |following-sibling::d:methodsynopsis
+                    |following-sibling::d:constructorsynopsis
+                    |following-sibling::d:destructorsynopsis)">
     <br/>
   </xsl:if>
 </xsl:template>
@@ -788,47 +790,47 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 
 <!-- ===== Java ======================================================== -->
 
-<xsl:template match="classsynopsis" mode="java">
+<xsl:template match="d:classsynopsis" mode="java">
   <pre>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:apply-templates select="ooclass[1]" mode="java"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:apply-templates select="d:ooclass[1]" mode="java"/>
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text> extends</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="java"/>
-      <xsl:if test="oointerface|ooexception">
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="java"/>
+      <xsl:if test="d:oointerface|d:ooexception">
         <br/>
        <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="oointerface">
+    <xsl:if test="d:oointerface">
       <xsl:text>implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="java"/>
-      <xsl:if test="ooexception">
+      <xsl:apply-templates select="d:oointerface" mode="java"/>
+      <xsl:if test="d:ooexception">
         <br/>
        <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="ooexception">
+    <xsl:if test="d:ooexception">
       <xsl:text>throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="java"/>
+      <xsl:apply-templates select="d:ooexception" mode="java"/>
     </xsl:if>
     <xsl:text>&nbsp;{</xsl:text>
     <br/>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="java"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="java"/>
     <xsl:text>}</xsl:text>
   </pre>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="java">
+<xsl:template match="d:classsynopsisinfo" mode="java">
   <xsl:apply-templates mode="java"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="java">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="java">
   <xsl:choose>
     <xsl:when test="preceding-sibling::*">
       <xsl:text>, </xsl:text>
@@ -844,7 +846,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="java">
+<xsl:template match="d:modifier|d:package" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -855,7 +857,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="classname" mode="java">
+<xsl:template match="d:classname" mode="java">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -866,7 +868,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="java">
+<xsl:template match="d:interfacename" mode="java">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -877,7 +879,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="java">
+<xsl:template match="d:exceptionname" mode="java">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -888,11 +890,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="java">
+<xsl:template match="d:fieldsynopsis" mode="java">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates mode="java"/>
@@ -901,7 +903,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="java">
+<xsl:template match="d:type" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -910,7 +912,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="varname" mode="java">
+<xsl:template match="d:varname" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -919,7 +921,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="initializer" mode="java">
+<xsl:template match="d:initializer" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -928,7 +930,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="void" mode="java">
+<xsl:template match="d:void" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -936,7 +938,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodname" mode="java">
+<xsl:template match="d:methodname" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -944,9 +946,9 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="java">
+<xsl:template match="d:methodparam" mode="java">
   <xsl:param name="indent">0</xsl:param>
-  <xsl:if test="preceding-sibling::methodparam">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>,</xsl:text>
     <br/>
     <xsl:if test="$indent &gt; 0">
@@ -963,7 +965,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="parameter" mode="java">
+<xsl:template match="d:parameter" mode="java">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -972,12 +974,12 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 </xsl:template>
 
 <xsl:template mode="java"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="decl">
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates select="$start-modifiers" mode="java"/>
@@ -987,7 +989,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
       <xsl:apply-templates select="$notmod[1]" mode="java"/>
     </xsl:if>
 
-    <xsl:apply-templates select="methodname" mode="java"/>
+    <xsl:apply-templates select="d:methodname" mode="java"/>
   </xsl:variable>
 
   <code>
@@ -995,16 +997,16 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
     <xsl:call-template name="id.attribute"/>
     <xsl:copy-of select="$decl"/>
     <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="java">
+    <xsl:apply-templates select="d:methodparam" mode="java">
       <xsl:with-param name="indent" select="string-length($decl)"/>
     </xsl:apply-templates>
     <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
+    <xsl:if test="d:exceptionname">
       <br/>
       <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="java"/>
+      <xsl:apply-templates select="d:exceptionname" mode="java"/>
     </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
+    <xsl:if test="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
       <xsl:text> </xsl:text>
       <xsl:apply-templates select="$end-modifiers" mode="java"/>
     </xsl:if>
@@ -1015,47 +1017,47 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 
 <!-- ===== C++ ========================================================= -->
 
-<xsl:template match="classsynopsis" mode="cpp">
+<xsl:template match="d:classsynopsis" mode="cpp">
   <pre>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:apply-templates select="d:ooclass[1]" mode="cpp"/>
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="cpp"/>
-      <xsl:if test="oointerface|ooexception">
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="cpp"/>
+      <xsl:if test="d:oointerface|d:ooexception">
         <br/>
        <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="oointerface">
+    <xsl:if test="d:oointerface">
       <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="cpp"/>
-      <xsl:if test="ooexception">
+      <xsl:apply-templates select="d:oointerface" mode="cpp"/>
+      <xsl:if test="d:ooexception">
         <br/>
        <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="ooexception">
+    <xsl:if test="d:ooexception">
       <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="cpp"/>
+      <xsl:apply-templates select="d:ooexception" mode="cpp"/>
     </xsl:if>
     <xsl:text>&nbsp;{</xsl:text>
     <br/>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="cpp"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="cpp"/>
     <xsl:text>}</xsl:text>
   </pre>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="cpp">
+<xsl:template match="d:classsynopsisinfo" mode="cpp">
   <xsl:apply-templates mode="cpp"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="cpp">
   <xsl:if test="preceding-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1066,7 +1068,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="cpp">
+<xsl:template match="d:modifier|d:package" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1077,7 +1079,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="classname" mode="cpp">
+<xsl:template match="d:classname" mode="cpp">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1088,7 +1090,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="cpp">
+<xsl:template match="d:interfacename" mode="cpp">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1099,7 +1101,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="cpp">
+<xsl:template match="d:exceptionname" mode="cpp">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1110,11 +1112,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="cpp">
+<xsl:template match="d:fieldsynopsis" mode="cpp">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates mode="cpp"/>
@@ -1123,7 +1125,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="cpp">
+<xsl:template match="d:type" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1132,7 +1134,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="varname" mode="cpp">
+<xsl:template match="d:varname" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1141,7 +1143,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="initializer" mode="cpp">
+<xsl:template match="d:initializer" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1150,7 +1152,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="void" mode="cpp">
+<xsl:template match="d:void" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1158,7 +1160,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodname" mode="cpp">
+<xsl:template match="d:methodname" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1166,8 +1168,8 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="cpp">
-  <xsl:if test="preceding-sibling::methodparam">
+<xsl:template match="d:methodparam" mode="cpp">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <span>
@@ -1177,7 +1179,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="parameter" mode="cpp">
+<xsl:template match="d:parameter" mode="cpp">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1186,15 +1188,15 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 </xsl:template>
 
 <xsl:template mode="cpp"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
 
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates select="$start-modifiers" mode="cpp"/>
@@ -1204,16 +1206,16 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
       <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
     </xsl:if>
 
-    <xsl:apply-templates select="methodname" mode="cpp"/>
+    <xsl:apply-templates select="d:methodname" mode="cpp"/>
     <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="cpp"/>
+    <xsl:apply-templates select="d:methodparam" mode="cpp"/>
     <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
+    <xsl:if test="d:exceptionname">
       <br/>
       <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="cpp"/>
+      <xsl:apply-templates select="d:exceptionname" mode="cpp"/>
     </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
+    <xsl:if test="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
       <xsl:text> </xsl:text>
       <xsl:apply-templates select="$end-modifiers" mode="cpp"/>
     </xsl:if>
@@ -1224,48 +1226,48 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 
 <!-- ===== IDL ========================================================= -->
 
-<xsl:template match="classsynopsis" mode="idl">
+<xsl:template match="d:classsynopsis" mode="idl">
   <pre>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:text>interface </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="idl"/>
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:apply-templates select="d:ooclass[1]" mode="idl"/>
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text>: </xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="idl"/>
-      <xsl:if test="oointerface|ooexception">
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="idl"/>
+      <xsl:if test="d:oointerface|d:ooexception">
         <br/>
        <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="oointerface">
+    <xsl:if test="d:oointerface">
       <xsl:text> implements</xsl:text>
-      <xsl:apply-templates select="oointerface" mode="idl"/>
-      <xsl:if test="ooexception">
+      <xsl:apply-templates select="d:oointerface" mode="idl"/>
+      <xsl:if test="d:ooexception">
         <br/>
        <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
       </xsl:if>
     </xsl:if>
-    <xsl:if test="ooexception">
+    <xsl:if test="d:ooexception">
       <xsl:text> throws</xsl:text>
-      <xsl:apply-templates select="ooexception" mode="idl"/>
+      <xsl:apply-templates select="d:ooexception" mode="idl"/>
     </xsl:if>
     <xsl:text>&nbsp;{</xsl:text>
     <br/>
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="idl"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="idl"/>
     <xsl:text>}</xsl:text>
   </pre>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="idl">
+<xsl:template match="d:classsynopsisinfo" mode="idl">
   <xsl:apply-templates mode="idl"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="idl">
   <xsl:if test="preceding-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1276,7 +1278,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="idl">
+<xsl:template match="d:modifier|d:package" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1287,7 +1289,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="classname" mode="idl">
+<xsl:template match="d:classname" mode="idl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1298,7 +1300,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="idl">
+<xsl:template match="d:interfacename" mode="idl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1309,7 +1311,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="idl">
+<xsl:template match="d:exceptionname" mode="idl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1320,11 +1322,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="idl">
+<xsl:template match="d:fieldsynopsis" mode="idl">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates mode="idl"/>
@@ -1333,7 +1335,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="idl">
+<xsl:template match="d:type" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1342,7 +1344,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="varname" mode="idl">
+<xsl:template match="d:varname" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1351,7 +1353,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="initializer" mode="idl">
+<xsl:template match="d:initializer" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1360,7 +1362,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="void" mode="idl">
+<xsl:template match="d:void" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1368,7 +1370,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodname" mode="idl">
+<xsl:template match="d:methodname" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1376,8 +1378,8 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="idl">
-  <xsl:if test="preceding-sibling::methodparam">
+<xsl:template match="d:methodparam" mode="idl">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <span>
@@ -1387,7 +1389,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="parameter" mode="idl">
+<xsl:template match="d:parameter" mode="idl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1396,14 +1398,14 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 </xsl:template>
 
 <xsl:template mode="idl"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates select="$start-modifiers" mode="idl"/>
@@ -1413,17 +1415,17 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
       <xsl:apply-templates select="$notmod[1]" mode="idl"/>
     </xsl:if>
 
-    <xsl:apply-templates select="methodname" mode="idl"/>
+    <xsl:apply-templates select="d:methodname" mode="idl"/>
     <xsl:text>(</xsl:text>
-    <xsl:apply-templates select="methodparam" mode="idl"/>
+    <xsl:apply-templates select="d:methodparam" mode="idl"/>
     <xsl:text>)</xsl:text>
-    <xsl:if test="exceptionname">
+    <xsl:if test="d:exceptionname">
       <br/>
       <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;raises(</xsl:text>
-      <xsl:apply-templates select="exceptionname" mode="idl"/>
+      <xsl:apply-templates select="d:exceptionname" mode="idl"/>
       <xsl:text>)</xsl:text>
     </xsl:if>
-    <xsl:if test="modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
+    <xsl:if test="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]">
       <xsl:text> </xsl:text>
       <xsl:apply-templates select="$end-modifiers" mode="idl"/>
     </xsl:if>
@@ -1434,35 +1436,35 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 
 <!-- ===== Perl ======================================================== -->
 
-<xsl:template match="classsynopsis" mode="perl">
+<xsl:template match="d:classsynopsis" mode="perl">
   <pre>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:text>package </xsl:text>
-    <xsl:apply-templates select="ooclass[1]" mode="perl"/>
+    <xsl:apply-templates select="d:ooclass[1]" mode="perl"/>
     <xsl:text>;</xsl:text>
     <br/>
 
-    <xsl:if test="ooclass[preceding-sibling::*]">
+    <xsl:if test="d:ooclass[preceding-sibling::*]">
       <xsl:text>@ISA = (</xsl:text>
-      <xsl:apply-templates select="ooclass[preceding-sibling::*]" mode="perl"/>
+      <xsl:apply-templates select="d:ooclass[preceding-sibling::*]" mode="perl"/>
       <xsl:text>);</xsl:text>
       <br/>
     </xsl:if>
 
-    <xsl:apply-templates select="constructorsynopsis
-                                 |destructorsynopsis
-                                 |fieldsynopsis
-                                 |methodsynopsis
-                                 |classsynopsisinfo" mode="perl"/>
+    <xsl:apply-templates select="d:constructorsynopsis
+                                 |d:destructorsynopsis
+                                 |d:fieldsynopsis
+                                 |d:methodsynopsis
+                                 |d:classsynopsisinfo" mode="perl"/>
   </pre>
 </xsl:template>
 
-<xsl:template match="classsynopsisinfo" mode="perl">
+<xsl:template match="d:classsynopsisinfo" mode="perl">
   <xsl:apply-templates mode="perl"/>
 </xsl:template>
 
-<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception" mode="perl">
   <xsl:if test="preceding-sibling::*">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1473,7 +1475,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="modifier|package" mode="perl">
+<xsl:template match="d:modifier|d:package" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1484,7 +1486,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="classname" mode="perl">
+<xsl:template match="d:classname" mode="perl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'classname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1495,7 +1497,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="interfacename" mode="perl">
+<xsl:template match="d:interfacename" mode="perl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'interfacename'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1506,7 +1508,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="exceptionname" mode="perl">
+<xsl:template match="d:exceptionname" mode="perl">
   <xsl:if test="local-name(preceding-sibling::*[1]) = 'exceptionname'">
     <xsl:text>, </xsl:text>
   </xsl:if>
@@ -1517,11 +1519,11 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="fieldsynopsis" mode="perl">
+<xsl:template match="d:fieldsynopsis" mode="perl">
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::classsynopsis">
+    <xsl:if test="parent::d:classsynopsis">
       <xsl:text>&nbsp;&nbsp;</xsl:text>
     </xsl:if>
     <xsl:apply-templates mode="perl"/>
@@ -1530,7 +1532,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
-<xsl:template match="type" mode="perl">
+<xsl:template match="d:type" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1539,7 +1541,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="varname" mode="perl">
+<xsl:template match="d:varname" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1548,7 +1550,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="initializer" mode="perl">
+<xsl:template match="d:initializer" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1557,7 +1559,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="void" mode="perl">
+<xsl:template match="d:void" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1565,7 +1567,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodname" mode="perl">
+<xsl:template match="d:methodname" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1573,8 +1575,8 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="methodparam" mode="perl">
-  <xsl:if test="preceding-sibling::methodparam">
+<xsl:template match="d:methodparam" mode="perl">
+  <xsl:if test="preceding-sibling::d:methodparam">
     <xsl:text>, </xsl:text>
   </xsl:if>
   <span>
@@ -1584,7 +1586,7 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
   </span>
 </xsl:template>
 
-<xsl:template match="parameter" mode="perl">
+<xsl:template match="d:parameter" mode="perl">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
@@ -1593,24 +1595,24 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 </xsl:template>
 
 <xsl:template mode="perl"
-  match="constructorsynopsis|destructorsynopsis|methodsynopsis">
-  <xsl:variable name="start-modifiers" select="modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
+  match="d:constructorsynopsis|d:destructorsynopsis|d:methodsynopsis">
+  <xsl:variable name="start-modifiers" select="d:modifier[following-sibling::*[local-name(.) != 'modifier']]"/>
   <xsl:variable name="notmod" select="*[local-name(.) != 'modifier']"/>
-  <xsl:variable name="end-modifiers" select="modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
+  <xsl:variable name="end-modifiers" select="d:modifier[preceding-sibling::*[local-name(.) != 'modifier']]"/>
 
   <code>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:text>sub </xsl:text>
 
-    <xsl:apply-templates select="methodname" mode="perl"/>
+    <xsl:apply-templates select="d:methodname" mode="perl"/>
     <xsl:text> { ... };</xsl:text>
   </code>
   <xsl:call-template name="synop-break"/>
 </xsl:template>
 
 <!-- Used when not occurring as a child of classsynopsis -->
-<xsl:template match="ooclass|oointerface|ooexception">
+<xsl:template match="d:ooclass|d:oointerface|d:ooexception">
   <xsl:apply-templates/>
 </xsl:template>
 
@@ -1623,35 +1625,35 @@ paramdef      ::= (#PCDATA|type|replaceable|parameter|funcparams)*
 <!-- * per-mode matches for those linking elements in order for them -->
 <!-- * to be processed as expected. -->
 
-<xsl:template match="link|olink|xref" mode="java">
+<xsl:template match="d:link|d:olink|d:xref" mode="java">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="cpp">
+<xsl:template match="d:link|d:olink|d:xref" mode="cpp">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="idl">
+<xsl:template match="d:link|d:olink|d:xref" mode="idl">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="perl">
+<xsl:template match="d:link|d:olink|d:xref" mode="perl">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="ansi-nontabular">
+<xsl:template match="d:link|d:olink|d:xref" mode="ansi-nontabular">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="ansi-tabular">
+<xsl:template match="d:link|d:olink|d:xref" mode="ansi-tabular">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="kr-nontabular">
+<xsl:template match="d:link|d:olink|d:xref" mode="kr-nontabular">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="link|olink|xref" mode="kr-tabular">
+<xsl:template match="d:link|d:olink|d:xref" mode="kr-tabular">
   <xsl:apply-templates select="."/>
 </xsl:template>
 
index 7b9ae3056ba2742024fc8601cd5f05d96dc82fac..9e749c4508bd0a74d05b4abc51f0b11b4f117828 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
                 xmlns:xtbl="xalan://com.nwalsh.xalan.Table"
                 xmlns:lxslt="http://xml.apache.org/xslt"
                 xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
-                exclude-result-prefixes="doc stbl xtbl lxslt ptbl"
+                exclude-result-prefixes="doc stbl xtbl lxslt ptbl d"
                 version='1.0'>
 
 <xsl:include href="../common/table.xsl"/>
   <xsl:variable name="rowsep">
     <xsl:choose>
       <!-- If this is the last row, rowsep never applies. -->
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
-                          or ancestor-or-self::thead/following-sibling::tbody
-                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+      <xsl:when test="not(ancestor-or-self::d:row[1]/following-sibling::d:row
+                          or ancestor-or-self::d:thead/following-sibling::d:tbody
+                          or ancestor-or-self::d:tbody/preceding-sibling::d:tfoot)">
         <xsl:value-of select="0"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="inherited.table.attribute">
           <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="row" select="ancestor-or-self::d:row[1]"/>
           <xsl:with-param name="colnum" select="$colnum"/>
           <xsl:with-param name="attribute" select="'rowsep'"/>
         </xsl:call-template>
   <xsl:variable name="colsep">
     <xsl:choose>
       <!-- If this is the last column, colsep never applies. -->
-      <xsl:when test="number($colnum) &gt;= ancestor::tgroup/@cols">0</xsl:when>
+      <xsl:when test="number($colnum) &gt;= ancestor::d:tgroup/@cols">0</xsl:when>
       <xsl:otherwise>
         <xsl:call-template name="inherited.table.attribute">
           <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
-          <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+          <xsl:with-param name="row" select="ancestor-or-self::d:row[1]"/>
           <xsl:with-param name="colnum" select="$colnum"/>
           <xsl:with-param name="attribute" select="'colsep'"/>
         </xsl:call-template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="tgroup" name="tgroup">
+<xsl:template match="d:tgroup" name="tgroup">
   <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'">
     <xsl:message terminate="yes">
       <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
 
     <xsl:choose>
       <!-- If there's a textobject/phrase for the table summary, use it -->
-      <xsl:when test="../textobject/phrase">
+      <xsl:when test="../d:textobject/d:phrase">
         <xsl:attribute name="summary">
-          <xsl:value-of select="../textobject/phrase"/>
+          <xsl:value-of select="../d:textobject/d:phrase"/>
         </xsl:attribute>
       </xsl:when>
 
       </xsl:when>
 
       <!-- Otherwise, if there's a title, use that -->
-      <xsl:when test="../title">
+      <xsl:when test="../d:title">
         <xsl:attribute name="summary">
           <!-- This screws up on inline markup and footnotes, oh well... -->
-          <xsl:value-of select="string(../title)"/>
+          <xsl:value-of select="string(../d:title)"/>
         </xsl:attribute>
       </xsl:when>
 
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:apply-templates select="thead"/>
-    <xsl:apply-templates select="tfoot"/>
-    <xsl:apply-templates select="tbody"/>
+    <xsl:apply-templates select="d:thead"/>
+    <xsl:apply-templates select="d:tfoot"/>
+    <xsl:apply-templates select="d:tbody"/>
 
-    <xsl:if test=".//footnote|../title//footnote">
+    <xsl:if test=".//d:footnote|../d:title//d:footnote">
       <tbody class="footnotes">
         <tr>
           <td colspan="{@cols}">
-            <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/>
+            <xsl:apply-templates select=".//d:footnote|../d:title//d:footnote" mode="table.footnote.mode"/>
           </td>
         </tr>
       </tbody>
   </table>
 </xsl:template>
 
-<xsl:template match="tgroup/processing-instruction('dbhtml')">
+<xsl:template match="d:tgroup/processing-instruction('dbhtml')">
   <xsl:variable name="summary">
     <xsl:call-template name="pi.dbhtml_table-summary"/>
   </xsl:variable>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="colspec"></xsl:template>
+<xsl:template match="d:colspec"></xsl:template>
 
-<xsl:template match="spanspec"></xsl:template>
+<xsl:template match="d:spanspec"></xsl:template>
 
-<xsl:template match="thead|tfoot">
+<xsl:template match="d:thead|d:tfoot">
   <xsl:element name="{local-name(.)}">
     <xsl:if test="@align">
       <xsl:attribute name="align">
 
     <xsl:choose>
       <!-- recurse on rows only if @morerows is present -->
-      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
-        <xsl:apply-templates select="row[1]">
+      <xsl:when test="d:row/d:entry/@morerows|d:row/d:entrytbl/@morerows">
+        <xsl:apply-templates select="d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
         </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="row">
+        <xsl:apply-templates select="d:row">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
   </xsl:element>
 </xsl:template>
 
-<xsl:template match="tbody">
+<xsl:template match="d:tbody">
   <tbody>
     <xsl:if test="@align">
       <xsl:attribute name="align">
     </xsl:if>
 
     <xsl:choose>
-      <xsl:when test="row/entry/@morerows|row/entrytbl/@morerows">
-        <xsl:apply-templates select="row[1]">
+      <xsl:when test="d:row/d:entry/@morerows|d:row/d:entrytbl/@morerows">
+        <xsl:apply-templates select="d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
         </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="row">
+        <xsl:apply-templates select="d:row">
           <xsl:with-param name="spans">
             <xsl:call-template name="blank.spans">
               <xsl:with-param name="cols" select="../@cols"/>
   </tbody>
 </xsl:template>
 
-<xsl:template match="row">
+<xsl:template match="d:row">
   <xsl:param name="spans"/>
   <xsl:param name="browserows"/>
 
       <tr><xsl:comment> This row intentionally left blank </xsl:comment></tr>
 
       <xsl:if test="$browserows = 'recurse'">
-        <xsl:apply-templates select="following-sibling::row[1]">
+        <xsl:apply-templates select="following-sibling::d:row[1]">
           <xsl:with-param name="spans">
             <xsl:call-template name="consume-row">
               <xsl:with-param name="spans" select="$spans"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="tr.attributes">
       <xsl:with-param name="rownum">
-        <xsl:number from="tgroup" count="row"/>
+        <xsl:number from="d:tgroup" count="d:row"/>
       </xsl:with-param>
     </xsl:call-template>
 
     </xsl:if>
 
     <xsl:if test="$table.borders.with.css != 0">
-      <xsl:if test="@rowsep = 1 and following-sibling::row">
+      <xsl:if test="@rowsep = 1 and following-sibling::d:row">
         <xsl:attribute name="style">
           <xsl:call-template name="border">
             <xsl:with-param name="side" select="'bottom'"/>
       </xsl:attribute>
     </xsl:if>
 
-    <xsl:apply-templates select="(entry|entrytbl)[1]">
+    <xsl:apply-templates select="(d:entry|d:entrytbl)[1]">
       <xsl:with-param name="spans" select="$spans"/>
     </xsl:apply-templates>
   </tr>
 
   <xsl:if test="$browserows = 'recurse'">
-    <xsl:if test="following-sibling::row">
+    <xsl:if test="following-sibling::d:row">
       <xsl:variable name="nextspans">
-        <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
+        <xsl:apply-templates select="(d:entry|d:entrytbl)[1]" mode="span">
           <xsl:with-param name="spans" select="$spans"/>
         </xsl:apply-templates>
       </xsl:variable>
   
-      <xsl:apply-templates select="following-sibling::row[1]">
+      <xsl:apply-templates select="following-sibling::d:row[1]">
         <xsl:with-param name="spans" select="$nextspans"/>
         <xsl:with-param name="browserows" select="$browserows"/>
       </xsl:apply-templates>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="entry|entrytbl" name="entry">
+<xsl:template match="d:entry|d:entrytbl" name="entry">
   <xsl:param name="col">
     <xsl:choose>
       <xsl:when test="@revisionflag">
-        <xsl:number from="row"/>
+        <xsl:number from="d:row"/>
       </xsl:when>
       <xsl:otherwise>1</xsl:otherwise>
     </xsl:choose>
 
   <xsl:variable name="cellgi">
     <xsl:choose>
-      <xsl:when test="ancestor::thead">th</xsl:when>
-      <xsl:when test="ancestor::tfoot">th</xsl:when>
-      <xsl:when test="ancestor::tbody and 
-                      (ancestor::table[@rowheader = 'firstcol'] or
-                      ancestor::informaltable[@rowheader = 'firstcol']) and
+      <xsl:when test="ancestor::d:thead">th</xsl:when>
+      <xsl:when test="ancestor::d:tfoot">th</xsl:when>
+      <xsl:when test="ancestor::d:tbody and
+                      (ancestor::d:table[@rowheader = 'firstcol'] or
+                      ancestor::d:informaltable[@rowheader = 'firstcol']) and
                       $entry.colnum = 1">
         <xsl:text>th</xsl:text>
       </xsl:when>
   <xsl:variable name="rowsep">
     <xsl:choose>
       <!-- If this is the last row, rowsep never applies. -->
-      <xsl:when test="ancestor::entrytbl
-                      and not (ancestor-or-self::row[1]/following-sibling::row)
-                      and not (ancestor::thead)">
+      <xsl:when test="ancestor::d:entrytbl
+                      and not (ancestor-or-self::d:row[1]/following-sibling::d:row)
+                      and not (ancestor::d:thead)">
         <xsl:value-of select="0"/>
       </xsl:when>
-      <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
-                          or ancestor-or-self::thead/following-sibling::tbody
-                          or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+      <xsl:when test="not(ancestor-or-self::d:row[1]/following-sibling::d:row
+                          or ancestor-or-self::d:thead/following-sibling::d:tbody
+                          or ancestor-or-self::d:tbody/preceding-sibling::d:tfoot)">
         <xsl:value-of select="0"/>
       </xsl:when>
       <!-- not last row with @morerows (thead is not last row) -->
-      <xsl:when test="not(ancestor::thead) and @morerows and not(@morerows &lt; 
-                 count(ancestor-or-self::row[1]/following-sibling::row))">
+      <xsl:when test="not(ancestor::d:thead) and @morerows and not(@morerows &lt;
+                 count(ancestor-or-self::d:row[1]/following-sibling::d:row))">
         <xsl:value-of select="0"/>
       </xsl:when>
       <xsl:otherwise>
         </xsl:if>
 
         <xsl:if test="not(preceding-sibling::*) and 
-                    (ancestor::row[1]/@id or ancestor::row[1]/@xml:id)">
+                    (ancestor::d:row[1]/@id or ancestor::d:row[1]/@xml:id)">
           <xsl:call-template name="anchor">
-            <xsl:with-param name="node" select="ancestor::row[1]"/>
+            <xsl:with-param name="node" select="ancestor::d:row[1]"/>
           </xsl:call-template>
         </xsl:if>
 
           <xsl:when test="$empty.cell">
             <xsl:text>&#160;</xsl:text>
           </xsl:when>
-          <xsl:when test="self::entrytbl">
+          <xsl:when test="self::d:entrytbl">
             <xsl:call-template name="tgroup"/>
           </xsl:when>
           <xsl:otherwise>
       </xsl:element>
 
       <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry
-                                       |following-sibling::entrytbl)[1]">
+        <xsl:when test="following-sibling::d:entry|following-sibling::d:entrytbl">
+          <xsl:apply-templates select="(following-sibling::d:entry
+                                       |following-sibling::d:entrytbl)[1]">
             <xsl:with-param name="col" select="$col+$entry.colspan"/>
             <xsl:with-param name="spans" select="$following.spans"/>
           </xsl:apply-templates>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="entry|entrytbl" name="sentry" mode="span">
+<xsl:template match="d:entry|d:entrytbl" name="sentry" mode="span">
   <xsl:param name="col" select="1"/>
   <xsl:param name="spans"/>
 
       </xsl:call-template>
 
       <xsl:choose>
-        <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
-          <xsl:apply-templates select="(following-sibling::entry
-                                        |following-sibling::entrytbl)[1]"
+        <xsl:when test="following-sibling::d:entry|following-sibling::d:entrytbl">
+          <xsl:apply-templates select="(following-sibling::d:entry
+                                        |following-sibling::d:entrytbl)[1]"
                                mode="span">
             <xsl:with-param name="col" select="$col+$entry.colspan"/>
             <xsl:with-param name="spans" select="$following.spans"/>
 
 <xsl:template name="generate.col">
   <xsl:param name="countcol">1</xsl:param>
-  <xsl:param name="colspecs" select="./colspec"/>
+  <xsl:param name="colspecs" select="./d:colspec"/>
   <xsl:param name="count">1</xsl:param>
   <xsl:param name="colnum">1</xsl:param>
 
               </xsl:when>
               <!-- pass through to HTML if no * in colspecs -->
               <xsl:when test="$colspec/@colwidth and
-                             not($colspec/parent::*/colspec/@colwidth[contains(.,'*')])">
+                             not($colspec/parent::*/d:colspec/@colwidth[contains(.,'*')])">
                 <xsl:attribute name="width">
                   <xsl:choose>
                     <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
                 </xsl:attribute>
               </xsl:when>
               <!-- Suggested by Pavel ZAMPACH <zampach@nemcb.cz> -->
-              <xsl:when test="$colspecs/ancestor::tgroup/@align">
+              <xsl:when test="$colspecs/ancestor::d:tgroup/@align">
                 <xsl:attribute name="align">
-                  <xsl:value-of select="$colspecs/ancestor::tgroup/@align"/>
+                  <xsl:value-of select="$colspecs/ancestor::d:tgroup/@align"/>
                 </xsl:attribute>
               </xsl:when>
             </xsl:choose>
   <!-- when this macro is called, the current context must be an entry -->
   <xsl:param name="colname"></xsl:param>
   <!-- .. = row, ../.. = thead|tbody, ../../.. = tgroup -->
-  <xsl:param name="colspecs" select="../../../../tgroup/colspec"/>
+  <xsl:param name="colspecs" select="../../../../d:tgroup/d:colspec"/>
   <xsl:param name="count">1</xsl:param>
   <xsl:choose>
     <xsl:when test="$count>count($colspecs)"></xsl:when>
index 69451e2e90d072a0eadf4c5c66c7478b16ae37cc..b504e20848104f44af3e6859f87e90fe4d0c5d11 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="task">
+<xsl:template match="d:task">
   <xsl:variable name="param.placement"
                 select="substring-after(normalize-space($formal.title.placement),
                                         concat(local-name(.), ' '))"/>
   </xsl:variable>
 
   <xsl:variable name="preamble"
-                select="*[not(self::title
-                              or self::titleabbrev)]"/>
+                select="*[not(self::d:title
+                              or self::d:titleabbrev)]"/>
 
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
     <xsl:call-template name="anchor"/>
 
-    <xsl:if test="(title or info/title) and $placement = 'before'">
+    <xsl:if test="(d:title or d:info/d:title) and $placement = 'before'">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
 
     <xsl:apply-templates select="$preamble"/>
 
-    <xsl:if test="(title or info/title) and $placement != 'before'">
+    <xsl:if test="(d:title or d:info/d:title) and $placement != 'before'">
       <xsl:call-template name="formal.object.heading"/>
     </xsl:if>
   </div>
 </xsl:template>
 
-<xsl:template match="task/title">
+<xsl:template match="d:task/d:title">
   <!-- nop -->
 </xsl:template>
 
-<xsl:template match="tasksummary">
+<xsl:template match="d:tasksummary">
   <xsl:call-template name="semiformal.object"/>
 </xsl:template>
 
-<xsl:template match="tasksummary/title"/>
+<xsl:template match="d:tasksummary/d:title"/>
 
-<xsl:template match="taskprerequisites">
+<xsl:template match="d:taskprerequisites">
   <xsl:call-template name="semiformal.object"/>
 </xsl:template>
 
-<xsl:template match="taskprerequisites/title"/>
+<xsl:template match="d:taskprerequisites/d:title"/>
 
-<xsl:template match="taskrelated">
+<xsl:template match="d:taskrelated">
   <xsl:call-template name="semiformal.object"/>
 </xsl:template>
 
-<xsl:template match="taskrelated/title"/>
+<xsl:template match="d:taskrelated/d:title"/>
 
 </xsl:stylesheet>
index 295cea9399651eed844ea580a254fcb10840361c..c091ea20de6c50f596e876620ede07c800dab27d 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="abbrev" mode="titlepage.mode">
+<xsl:template match="d:abbrev" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="abstract" mode="titlepage.mode">
+<xsl:template match="d:abstract" mode="titlepage.mode">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="abstract/title" mode="titlepage.mode">
+<xsl:template match="d:abstract/d:title" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="address" mode="titlepage.mode">
+<xsl:template match="d:address" mode="titlepage.mode">
   <xsl:param name="suppress-numbers" select="'0'"/>
 
   <xsl:variable name="rtf">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="affiliation" mode="titlepage.mode">
+<xsl:template match="d:affiliation" mode="titlepage.mode">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="artpagenums" mode="titlepage.mode">
+<xsl:template match="d:artpagenums" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="author|editor" mode="titlepage.mode">
+<xsl:template match="d:author|d:editor" mode="titlepage.mode">
   <xsl:call-template name="credits.div"/>
 </xsl:template>
 
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="self::editor and 
-                  count(preceding-sibling::editor) = 0 and 
+    <xsl:if test="self::d:editor and
+                  count(preceding-sibling::d:editor) = 0 and
                   not($editedby.enabled = 0)">
       <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
     </xsl:if>
     <h3>
       <xsl:apply-templates select="." mode="common.html.attributes"/>
       <xsl:choose>
-        <xsl:when test="orgname">
+        <xsl:when test="d:orgname">
           <xsl:apply-templates/>
         </xsl:when>
         <xsl:otherwise>
       </xsl:choose>
     </h3>
     <xsl:if test="not($contrib.inline.enabled = 0)">
-      <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+      <xsl:apply-templates mode="titlepage.mode" select="d:contrib"/>
     </xsl:if>
-    <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-    <xsl:apply-templates mode="titlepage.mode" select="email"/>
+    <xsl:apply-templates mode="titlepage.mode" select="d:affiliation"/>
+    <xsl:apply-templates mode="titlepage.mode" select="d:email"/>
     <xsl:if test="not($blurb.on.titlepage.enabled = 0)">
       <xsl:choose>
         <xsl:when test="$contrib.inline.enabled = 0">
           <xsl:apply-templates mode="titlepage.mode"
-                               select="contrib|authorblurb|personblurb"/>
+                               select="d:contrib|d:authorblurb|d:personblurb"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:apply-templates mode="titlepage.mode"
-                               select="authorblurb|personblurb"/>
+                               select="d:authorblurb|d:personblurb"/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:if>
   </div>
 </xsl:template>
 
-<xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
+<xsl:template match="d:authorblurb|d:personblurb" mode="titlepage.mode">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="titlepage.mode">
+<xsl:template match="d:authorgroup" mode="titlepage.mode">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
-    <xsl:if test="parent::refentryinfo">
+    <xsl:if test="parent::d:refentryinfo">
       <h2>Authors</h2>
     </xsl:if>
       
   </div>
 </xsl:template>
 
-<xsl:template match="authorinitials" mode="titlepage.mode">
+<xsl:template match="d:authorinitials" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="bibliomisc" mode="titlepage.mode">
+<xsl:template match="d:bibliomisc" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="bibliomset" mode="titlepage.mode">
+<xsl:template match="d:bibliomset" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="collab" mode="titlepage.mode">
+<xsl:template match="d:collab" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="collabname" mode="titlepage.mode">
+<xsl:template match="d:collabname" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confgroup" mode="titlepage.mode">
+<xsl:template match="d:confgroup" mode="titlepage.mode">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="confdates" mode="titlepage.mode">
+<xsl:template match="d:confdates" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confsponsor" mode="titlepage.mode">
+<xsl:template match="d:confsponsor" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="conftitle" mode="titlepage.mode">
+<xsl:template match="d:conftitle" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="confnum" mode="titlepage.mode">
+<xsl:template match="d:confnum" mode="titlepage.mode">
   <!-- suppress -->
 </xsl:template>
 
-<xsl:template match="contractnum" mode="titlepage.mode">
+<xsl:template match="d:contractnum" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contractsponsor" mode="titlepage.mode">
+<xsl:template match="d:contractsponsor" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="contrib" mode="titlepage.mode">
+<xsl:template match="d:contrib" mode="titlepage.mode">
   <xsl:choose>
     <xsl:when test="not($contrib.inline.enabled = 0)">
       <span>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="copyright" mode="titlepage.mode">
+<xsl:template match="d:copyright" mode="titlepage.mode">
 
-  <xsl:if test="generate-id() = generate-id(//refentryinfo/copyright[1])
+  <xsl:if test="generate-id() = generate-id(//d:refentryinfo/d:copyright[1])
       and ($stylesheet.result.type = 'html' or $stylesheet.result.type = 'xhtml')">
     <h2>Copyright</h2>
   </xsl:if>
     </xsl:call-template>
     <xsl:call-template name="gentext.space"/>
     <xsl:call-template name="copyright.years">
-      <xsl:with-param name="years" select="year"/>
+      <xsl:with-param name="years" select="d:year"/>
       <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
       <xsl:with-param name="single.year.ranges"
                       select="$make.single.year.ranges"/>
     </xsl:call-template>
     <xsl:call-template name="gentext.space"/>
-    <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+    <xsl:apply-templates select="d:holder" mode="titlepage.mode"/>
   </p>
 </xsl:template>
 
-<xsl:template match="year" mode="titlepage.mode">
+<xsl:template match="d:year" mode="titlepage.mode">
   <xsl:choose>
     <xsl:when test="$show.revisionflag != 0 and @revisionflag">
       <span class="{@revisionflag}">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="holder" mode="titlepage.mode">
+<xsl:template match="d:holder" mode="titlepage.mode">
   <xsl:choose>
     <xsl:when test="$show.revisionflag != 0 and @revisionflag">
       <span class="{@revisionflag}">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="titlepage.mode">
+<xsl:template match="d:corpauthor" mode="titlepage.mode">
   <h3>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </h3>
 </xsl:template>
 
-<xsl:template match="corpcredit" mode="titlepage.mode">
+<xsl:template match="d:corpcredit" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="corpname" mode="titlepage.mode">
+<xsl:template match="d:corpname" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="date" mode="titlepage.mode">
+<xsl:template match="d:date" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="edition" mode="titlepage.mode">
+<xsl:template match="d:edition" mode="titlepage.mode">
   <p>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </p>
 </xsl:template>
 
-<xsl:template match="email" mode="titlepage.mode">
+<xsl:template match="d:email" mode="titlepage.mode">
   <!-- use the normal e-mail handling code -->
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="firstname" mode="titlepage.mode">
+<xsl:template match="d:firstname" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="graphic" mode="titlepage.mode">
+<xsl:template match="d:graphic" mode="titlepage.mode">
   <!-- use the normal graphic handling code -->
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="honorific" mode="titlepage.mode">
+<xsl:template match="d:honorific" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="isbn" mode="titlepage.mode">
+<xsl:template match="d:isbn" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="issn" mode="titlepage.mode">
+<xsl:template match="d:issn" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="biblioid" mode="titlepage.mode">
+<xsl:template match="d:biblioid" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="itermset" mode="titlepage.mode">
+<xsl:template match="d:itermset" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="invpartnumber" mode="titlepage.mode">
+<xsl:template match="d:invpartnumber" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="issuenum" mode="titlepage.mode">
+<xsl:template match="d:issuenum" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="jobtitle" mode="titlepage.mode">
+<xsl:template match="d:jobtitle" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="keywordset" mode="titlepage.mode">
+<xsl:template match="d:keywordset" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="titlepage.mode">
+<xsl:template match="d:legalnotice" mode="titlepage.mode">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:choose>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="legalnotice/title" mode="titlepage.mode">
+<xsl:template match="d:legalnotice/d:title" mode="titlepage.mode">
   <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
 </xsl:template>
 
-<xsl:template match="lineage" mode="titlepage.mode">
+<xsl:template match="d:lineage" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="modespec" mode="titlepage.mode">
+<xsl:template match="d:modespec" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="orgdiv" mode="titlepage.mode">
-  <xsl:if test="preceding-sibling::*[1][self::orgname]">
+<xsl:template match="d:orgdiv" mode="titlepage.mode">
+  <xsl:if test="preceding-sibling::*[1][self::d:orgname]">
     <xsl:text> </xsl:text>
   </xsl:if>
   <span>
   </span>
 </xsl:template>
 
-<xsl:template match="orgname" mode="titlepage.mode">
+<xsl:template match="d:orgname" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="titlepage.mode">
+<xsl:template match="d:othercredit" mode="titlepage.mode">
 <xsl:choose>
   <xsl:when test="not($othercredit.like.author.enabled = 0)">
-  <xsl:variable name="contrib" select="string(contrib)"/>
+  <xsl:variable name="contrib" select="string(d:contrib)"/>
   <xsl:choose>
-    <xsl:when test="contrib">
-      <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
+    <xsl:when test="d:contrib">
+      <xsl:if test="not(preceding-sibling::d:othercredit[string(d:contrib)=$contrib])">
         <xsl:call-template name="paragraph">
           <xsl:with-param name="class" select="local-name(.)"/>
           <xsl:with-param name="content">
-            <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+            <xsl:apply-templates mode="titlepage.mode" select="d:contrib"/>
             <xsl:text>: </xsl:text>
             <xsl:call-template name="person.name"/>
-            <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
-            <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
+            <xsl:apply-templates mode="titlepage.mode" select="d:affiliation"/>
+            <xsl:apply-templates select="following-sibling::d:othercredit[string(d:contrib)=$contrib]" mode="titlepage.othercredits"/>
           </xsl:with-param>
         </xsl:call-template>
       </xsl:if>
           <xsl:call-template name="person.name"/>
         </xsl:with-param>
       </xsl:call-template>
-      <xsl:apply-templates mode="titlepage.mode" select="affiliation"/>
+      <xsl:apply-templates mode="titlepage.mode" select="d:affiliation"/>
     </xsl:otherwise>
   </xsl:choose>
   </xsl:when>
 </xsl:choose>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="titlepage.othercredits">
+<xsl:template match="d:othercredit" mode="titlepage.othercredits">
   <xsl:text>, </xsl:text>
   <xsl:call-template name="person.name"/>
 </xsl:template>
 
-<xsl:template match="othername" mode="titlepage.mode">
+<xsl:template match="d:othername" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pagenums" mode="titlepage.mode">
+<xsl:template match="d:pagenums" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="printhistory" mode="titlepage.mode">
+<xsl:template match="d:printhistory" mode="titlepage.mode">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </div>
 </xsl:template>
 
-<xsl:template match="productname" mode="titlepage.mode">
+<xsl:template match="d:productname" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="productnumber" mode="titlepage.mode">
+<xsl:template match="d:productnumber" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="titlepage.mode">
+<xsl:template match="d:pubdate" mode="titlepage.mode">
   <xsl:call-template name="paragraph">
     <xsl:with-param name="class" select="local-name(.)"/>
     <xsl:with-param name="content">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="publisher" mode="titlepage.mode">
+<xsl:template match="d:publisher" mode="titlepage.mode">
   <xsl:call-template name="paragraph">
     <xsl:with-param name="class" select="local-name(.)"/>
     <xsl:with-param name="content">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="publishername" mode="titlepage.mode">
+<xsl:template match="d:publishername" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="pubsnumber" mode="titlepage.mode">
+<xsl:template match="d:pubsnumber" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="titlepage.mode">
+<xsl:template match="d:releaseinfo" mode="titlepage.mode">
   <xsl:call-template name="paragraph">
     <xsl:with-param name="class" select="local-name(.)"/>
     <xsl:with-param name="content">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="titlepage.mode">
+<xsl:template match="d:revhistory" mode="titlepage.mode">
   <xsl:variable name="numcols">
     <xsl:choose>
-      <xsl:when test=".//authorinitials|.//author">3</xsl:when>
+      <xsl:when test=".//d:authorinitials|.//d:author">3</xsl:when>
       <xsl:otherwise>2</xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
               <xsl:call-template name="head.content">
                 <xsl:with-param name="title">
                     <xsl:value-of select="$title"/>
-                    <xsl:if test="../../title">
-                        <xsl:value-of select="concat(' (', ../../title, ')')"/>
+                    <xsl:if test="../../d:title">
+                        <xsl:value-of select="concat(' (', ../../d:title, ')')"/>
                     </xsl:if>
                 </xsl:with-param>
               </xsl:call-template>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="revhistory/revision" mode="titlepage.mode">
+<xsl:template match="d:revhistory/d:revision" mode="titlepage.mode">
   <xsl:param name="numcols" select="'3'"/>
-  <xsl:variable name="revnumber" select="revnumber"/>
-  <xsl:variable name="revdate"   select="date"/>
-  <xsl:variable name="revauthor" select="authorinitials|author"/>
-  <xsl:variable name="revremark" select="revremark|revdescription"/>
+  <xsl:variable name="revnumber" select="d:revnumber"/>
+  <xsl:variable name="revdate"   select="d:date"/>
+  <xsl:variable name="revauthor" select="d:authorinitials|d:author"/>
+  <xsl:variable name="revremark" select="d:revremark|d:revdescription"/>
   <tr>
     <td align="{$direction.align.start}">
       <xsl:if test="$revnumber">
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="revision/revnumber" mode="titlepage.mode">
+<xsl:template match="d:revision/d:revnumber" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/date" mode="titlepage.mode">
+<xsl:template match="d:revision/d:date" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/authorinitials" mode="titlepage.mode">
+<xsl:template match="d:revision/d:authorinitials" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/author" mode="titlepage.mode">
+<xsl:template match="d:revision/d:author" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/revremark" mode="titlepage.mode">
+<xsl:template match="d:revision/d:revremark" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="revision/revdescription" mode="titlepage.mode">
+<xsl:template match="d:revision/d:revdescription" mode="titlepage.mode">
   <xsl:apply-templates mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="seriesvolnums" mode="titlepage.mode">
+<xsl:template match="d:seriesvolnums" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="shortaffil" mode="titlepage.mode">
+<xsl:template match="d:shortaffil" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="subjectset" mode="titlepage.mode">
+<xsl:template match="d:subjectset" mode="titlepage.mode">
 </xsl:template>
 
-<xsl:template match="subtitle" mode="titlepage.mode">
+<xsl:template match="d:subtitle" mode="titlepage.mode">
   <h2>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </h2>
 </xsl:template>
 
-<xsl:template match="surname" mode="titlepage.mode">
+<xsl:template match="d:surname" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
   </span>
 </xsl:template>
 
-<xsl:template match="title" mode="titlepage.mode">
+<xsl:template match="d:title" mode="titlepage.mode">
   <xsl:variable name="id">
     <xsl:choose>
       <!-- if title is in an *info wrapper, get the grandparent -->
   </h1>
 </xsl:template>
 
-<xsl:template match="titleabbrev" mode="titlepage.mode">
+<xsl:template match="d:titleabbrev" mode="titlepage.mode">
   <!-- nop; title abbreviations don't belong on the title page! -->
 </xsl:template>
 
-<xsl:template match="volumenum" mode="titlepage.mode">
+<xsl:template match="d:volumenum" mode="titlepage.mode">
   <span>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:call-template name="id.attribute"/>
index 3032a93eb4816bea78e02a45d9add35111af6700..5c1237c7536854dabffffa78e48ef7a536129520 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,7 +14,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="set/toc | book/toc | part/toc">
+<xsl:template match="d:set/d:toc | d:book/d:toc | d:part/d:toc">
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
       <xsl:with-param name="node" select="parent::*"/>
           <!-- trick to switch context node to parent element -->
           <xsl:for-each select="parent::*">
             <xsl:choose>
-              <xsl:when test="self::set">
+              <xsl:when test="self::d:set">
                 <xsl:call-template name="set.toc">
                   <xsl:with-param name="toc.title.p" 
                                   select="contains($toc.params, 'title')"/>
                 </xsl:call-template>
               </xsl:when>
-              <xsl:when test="self::book">
+              <xsl:when test="self::d:book">
                 <xsl:call-template name="division.toc">
                   <xsl:with-param name="toc.title.p" 
                                   select="contains($toc.params, 'title')"/>
                 </xsl:call-template>
               </xsl:when>
-              <xsl:when test="self::part">
+              <xsl:when test="self::d:part">
                 <xsl:call-template name="division.toc">
                   <xsl:with-param name="toc.title.p" 
                                   select="contains($toc.params, 'title')"/>
@@ -64,7 +66,7 @@
   </xsl:if>
 </xsl:template>
   
-<xsl:template match="chapter/toc | appendix/toc | preface/toc | article/toc">
+<xsl:template match="d:chapter/d:toc | d:appendix/d:toc | d:preface/d:toc | d:article/d:toc">
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
       <xsl:with-param name="node" select="parent::*"/>
         <div>
           <xsl:apply-templates select="." mode="common.html.attributes"/>
           <xsl:call-template name="id.attribute"/>
-          <xsl:apply-templates select="title"/> 
+          <xsl:apply-templates select="d:title"/>
           <dl>
             <xsl:apply-templates select="." mode="common.html.attributes"/>
-            <xsl:apply-templates select="*[not(self::title)]"/> 
+            <xsl:apply-templates select="*[not(self::d:title)]"/>
           </dl>
         </div>
         <xsl:call-template name="component.toc.separator"/>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="section/toc
-                    |sect1/toc
-                    |sect2/toc
-                    |sect3/toc
-                    |sect4/toc
-                    |sect5/toc">
+<xsl:template match="d:section/d:toc
+                    |d:sect1/d:toc
+                    |d:sect2/d:toc
+                    |d:sect3/d:toc
+                    |d:sect4/d:toc
+                    |d:sect5/d:toc">
 
   <xsl:variable name="toc.params">
     <xsl:call-template name="find.path.params">
         <div>
           <xsl:apply-templates select="." mode="common.html.attributes"/>
           <xsl:call-template name="id.attribute"/>
-          <xsl:apply-templates select="title"/> 
+          <xsl:apply-templates select="d:title"/>
           <dl>
             <xsl:apply-templates select="." mode="common.html.attributes"/>
-            <xsl:apply-templates select="*[not(self::title)]"/> 
+            <xsl:apply-templates select="*[not(self::d:title)]"/>
           </dl>
         </div>
         <xsl:call-template name="section.toc.separator"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="tocpart|tocchap
-                     |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+<xsl:template match="d:tocpart|d:tocchap
+                     |d:toclevel1|d:toclevel2|d:toclevel3|d:toclevel4|d:toclevel5">
   <xsl:variable name="sub-toc">
-    <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+    <xsl:if test="d:tocchap|d:toclevel1|d:toclevel2|d:toclevel3|d:toclevel4|d:toclevel5">
       <xsl:choose>
         <xsl:when test="$toc.list.type = 'dl'">
           <dd>
             <xsl:apply-templates select="." mode="common.html.attributes"/>
             <xsl:element name="{$toc.list.type}">
               <xsl:apply-templates select="." mode="common.html.attributes"/>
-              <xsl:apply-templates select="tocchap|toclevel1|toclevel2|
-                                           toclevel3|toclevel4|toclevel5"/>
+              <xsl:apply-templates select="d:tocchap|d:toclevel1|d:toclevel2|
+                                           d:toclevel3|d:toclevel4|d:toclevel5"/>
             </xsl:element>
           </dd>
         </xsl:when>
         <xsl:otherwise>
           <xsl:element name="{$toc.list.type}">
             <xsl:apply-templates select="." mode="common.html.attributes"/>
-            <xsl:apply-templates select="tocchap|toclevel1|toclevel2|
-                                         toclevel3|toclevel4|toclevel5"/>
+            <xsl:apply-templates select="d:tocchap|d:toclevel1|d:toclevel2|
+                                         d:toclevel3|d:toclevel4|d:toclevel5"/>
           </xsl:element>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:if>
   </xsl:variable>
 
-  <xsl:apply-templates select="tocentry[position() != last()]"/>
+  <xsl:apply-templates select="d:tocentry[position() != last()]"/>
 
   <xsl:choose>
     <xsl:when test="$toc.list.type = 'dl'">
       <dt>
         <xsl:apply-templates select="." mode="common.html.attributes"/>
-        <xsl:apply-templates select="tocentry[position() = last()]"/>
+        <xsl:apply-templates select="d:tocentry[position() = last()]"/>
       </dt>
       <xsl:copy-of select="$sub-toc"/>
     </xsl:when>
     <xsl:otherwise>
       <li>
         <xsl:apply-templates select="." mode="common.html.attributes"/>
-        <xsl:apply-templates select="tocentry[position() = last()]"/>
+        <xsl:apply-templates select="d:tocentry[position() = last()]"/>
         <xsl:copy-of select="$sub-toc"/>
       </li>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="tocentry|tocdiv|lotentry|tocfront|tocback">
+<xsl:template match="d:tocentry|d:tocdiv|d:lotentry|d:tocfront|d:tocback">
   <xsl:choose>
     <xsl:when test="$toc.list.type = 'dl'">
       <dt>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="tocentry[position() = last()]" priority="2">
+<xsl:template match="d:tocentry[position() = last()]" priority="2">
   <xsl:call-template name="tocentry-content"/>
 </xsl:template>
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="toc/title | tocdiv/title">
+<xsl:template match="d:toc/d:title | d:tocdiv/d:title">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="toc/subtitle | tocdiv/subtitle">
+<xsl:template match="d:toc/d:subtitle | d:tocdiv/d:subtitle">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="toc/titleabbrev | tocdiv/titleabbrev">
+<xsl:template match="d:toc/d:titleabbrev | d:tocdiv/d:titleabbrev">
 </xsl:template>
 
 <!-- ==================================================================== -->
 
 <!-- A lot element must have content, because there is no attribute
      to select what kind of list should be generated -->
-<xsl:template match="book/lot | part/lot">
+<xsl:template match="d:book/d:lot | d:part/d:lot">
   <!-- Don't generate a page sequence unless there is content -->
   <xsl:variable name="content">
     <xsl:choose>
   </xsl:if>
 </xsl:template>
   
-<xsl:template match="chapter/lot | appendix/lot | preface/lot | article/lot">
+<xsl:template match="d:chapter/d:lot | d:appendix/d:lot | d:preface/d:lot | d:article/d:lot">
   <xsl:choose>
     <xsl:when test="* and $process.source.toc != 0">
       <div>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="section/lot
-                    |sect1/lot
-                    |sect2/lot
-                    |sect3/lot
-                    |sect4/lot
-                    |sect5/lot">
+<xsl:template match="d:section/d:lot
+                    |d:sect1/d:lot
+                    |d:sect2/d:lot
+                    |d:sect3/d:lot
+                    |d:sect4/d:lot
+                    |d:sect5/d:lot">
   <xsl:choose>
     <xsl:when test="* and $process.source.toc != 0">
       <div>
   </xsl:message>
 </xsl:template>
 
-<xsl:template match="lot/title">
+<xsl:template match="d:lot/d:title">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="lot/subtitle">
+<xsl:template match="d:lot/d:subtitle">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="lot/titleabbrev">
+<xsl:template match="d:lot/d:titleabbrev">
 </xsl:template>
 
 </xsl:stylesheet>
index 491960a09f2312687e2cfbd071f5ff8697d47933..178825c06e4cd68391e1818102db3ff1590afef0 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
                 xmlns:xverb="xalan://com.nwalsh.xalan.Verbatim"
                 xmlns:lxslt="http://xml.apache.org/xslt"
                 xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="sverb xverb lxslt exsl"
+                exclude-result-prefixes="sverb xverb lxslt exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -24,7 +25,7 @@
 <lxslt:component prefix="xverb"
                  functions="numberLines"/>
 
-<xsl:template match="programlisting|screen|synopsis">
+<xsl:template match="d:programlisting|d:screen|d:synopsis">
   <xsl:param name="suppress-numbers" select="'0'"/>
 
   <xsl:call-template name="anchor"/>
@@ -93,7 +94,7 @@
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="literallayout">
+<xsl:template match="d:literallayout">
   <xsl:param name="suppress-numbers" select="'0'"/>
 
   <xsl:variable name="rtf">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="address">
+<xsl:template match="d:address">
   <xsl:param name="suppress-numbers" select="'0'"/>
 
   <xsl:variable name="rtf">
       <xsl:when test="$pi.context/@continuation='continues'">
         <xsl:variable name="lastLine">
           <xsl:choose>
-            <xsl:when test="$pi.context/self::programlisting">
+            <xsl:when test="$pi.context/self::d:programlisting">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::programlisting[@linenumbering='numbered']"/>
+                     select="preceding::d:programlisting[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::screen">
+            <xsl:when test="$pi.context/self::d:screen">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::screen[@linenumbering='numbered']"/>
+                     select="preceding::d:screen[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::literallayout">
+            <xsl:when test="$pi.context/self::d:literallayout">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::literallayout[@linenumbering='numbered']"/>
+                     select="preceding::d:literallayout[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::address">
+            <xsl:when test="$pi.context/self::d:address">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::address[@linenumbering='numbered']"/>
+                     select="preceding::d:address[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
-            <xsl:when test="$pi.context/self::synopsis">
+            <xsl:when test="$pi.context/self::d:synopsis">
               <xsl:call-template name="lastLineNumber">
                 <xsl:with-param name="listings"
-                     select="preceding::synopsis[@linenumbering='numbered']"/>
+                     select="preceding::d:synopsis[@linenumbering='numbered']"/>
               </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
index 88a96d6c718effd4010917379d1f65296a5b222c..6b85b5e29adb7c5cd169674d37b00260221eb9cb 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:xlink='http://www.w3.org/1999/xlink'
-                exclude-result-prefixes="suwl exsl xlink"
+                exclude-result-prefixes="suwl exsl xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -20,7 +21,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="anchor">
+<xsl:template match="d:anchor">
   <xsl:choose>
     <xsl:when test="$generate.id.attributes = 0">
       <xsl:call-template name="anchor"/>
@@ -35,7 +36,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="xref" name="xref">
+<xsl:template match="d:xref" name="xref">
   <xsl:param name="xhref" select="@xlink:href"/>
   <!-- is the @xlink:href a local idref link? -->
   <xsl:param name="xlink.idref">
@@ -89,7 +90,7 @@
       </xsl:when>
   
       <xsl:when test="$target">
-        <xsl:if test="not(parent::citation)">
+        <xsl:if test="not(parent::d:citation)">
           <xsl:apply-templates select="$target" mode="xref-to-prefix">
             <xsl:with-param name="referrer" select="."/>
             <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
           <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
         </xsl:apply-templates>
   
-        <xsl:if test="not(parent::citation)">
+        <xsl:if test="not(parent::d:citation)">
           <xsl:apply-templates select="$target" mode="xref-to-suffix">
             <xsl:with-param name="referrer" select="."/>
             <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
 
 <!-- biblioref handled largely like an xref -->
 <!-- To be done: add support for begin, end, and units attributes -->
-<xsl:template match="biblioref">
+<xsl:template match="d:biblioref">
   <xsl:variable name="targets" select="key('id',@linkend)"/>
   <xsl:variable name="target" select="$targets[1]"/>
   <xsl:variable name="refelem" select="local-name($target)"/>
         </xsl:call-template>
       </xsl:variable>
 
-      <xsl:if test="not(parent::citation)">
+      <xsl:if test="not(parent::d:citation)">
         <xsl:apply-templates select="$target" mode="xref-to-prefix">
           <xsl:with-param name="referrer" select="."/>
           <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
 
       <a href="{$href}">
         <xsl:apply-templates select="." mode="class.attribute"/>
-        <xsl:if test="$target/title or $target/info/title">
+        <xsl:if test="$target/d:title or $target/d:info/d:title">
           <xsl:attribute name="title">
             <xsl:apply-templates select="$target" mode="xref-title"/>
           </xsl:attribute>
         </xsl:apply-templates>
       </a>
 
-      <xsl:if test="not(parent::citation)">
+      <xsl:if test="not(parent::d:citation)">
         <xsl:apply-templates select="$target" mode="xref-to-suffix">
           <xsl:with-param name="referrer" select="."/>
           <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
   <xsl:text>???</xsl:text>
 </xsl:template>
 
-<xsl:template match="title" mode="xref-to">
+<xsl:template match="d:title" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset
-                     |biblioset|blockquote|calloutlist|caution|colophon
-                     |constraintdef|formalpara|glossdiv|important|indexdiv
-                     |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
-                     |msgrel|msgset|msgsub|note|orderedlist|partintro
-                     |productionset|qandadiv|refsynopsisdiv|screenshot|segmentedlist
-                     |set|setindex|sidebar|tip|toc|variablelist|warning"
+<xsl:template match="d:abstract|d:authorblurb|d:personblurb|d:bibliodiv|d:bibliomset
+                     |d:biblioset|d:blockquote|d:calloutlist|d:caution|d:colophon
+                     |d:constraintdef|d:formalpara|d:glossdiv|d:important|d:indexdiv
+                     |d:itemizedlist|d:legalnotice|d:lot|d:msg|d:msgexplan|d:msgmain
+                     |d:msgrel|d:msgset|d:msgsub|d:note|d:orderedlist|d:partintro
+                     |d:productionset|d:qandadiv|d:refsynopsisdiv|d:screenshot|d:segmentedlist
+                     |d:set|d:setindex|d:sidebar|d:tip|d:toc|d:variablelist|d:warning"
               mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
+<xsl:template match="d:author|d:editor|d:othercredit|d:personname" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   <xsl:call-template name="person.name"/>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="xref-to">
+<xsl:template match="d:authorgroup" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   <xsl:call-template name="person.name.list"/>
 </xsl:template>
 
-<xsl:template match="figure|example|table|equation" mode="xref-to">
+<xsl:template match="d:figure|d:example|d:table|d:equation" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="procedure" mode="xref-to">
+<xsl:template match="d:procedure" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="task" mode="xref-to">
+<xsl:template match="d:task" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis" mode="xref-to">
-  <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+<xsl:template match="d:cmdsynopsis" mode="xref-to">
+  <xsl:apply-templates select="(.//d:command)[1]" mode="xref"/>
 </xsl:template>
 
-<xsl:template match="funcsynopsis" mode="xref-to">
-  <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+<xsl:template match="d:funcsynopsis" mode="xref-to">
+  <xsl:apply-templates select="(.//d:function)[1]" mode="xref"/>
 </xsl:template>
 
-<xsl:template match="dedication|acknowledgements|preface|chapter|appendix|article" mode="xref-to">
+<xsl:template match="d:dedication|d:acknowledgements|d:preface|d:chapter|d:appendix|d:article" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="bibliography" mode="xref-to">
+<xsl:template match="d:bibliography" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-to-prefix">
   <xsl:text>[</xsl:text>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-to-suffix">
   <xsl:text>]</xsl:text>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
     <xsl:when test="string(.) = ''">
       <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
       <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
-      <xsl:variable name="entry" select="$bib/bibliography/
+      <xsl:variable name="entry" select="$bib/d:bibliography/
                                     *[@id=$id or @xml:id=$id][1]"/>
       <xsl:choose>
         <xsl:when test="$entry">
           <xsl:choose>
             <xsl:when test="$bibliography.numbered != 0">
-              <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+              <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
                           level="any" format="1"/>
             </xsl:when>
             <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
     <xsl:otherwise>
       <xsl:choose>
         <xsl:when test="$bibliography.numbered != 0">
-          <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+          <xsl:number from="d:bibliography" count="d:biblioentry|d:bibliomixed"
                       level="any" format="1"/>
         </xsl:when>
         <xsl:when test="local-name(*[1]) = 'abbrev'">
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossary" mode="xref-to">
+<xsl:template match="d:glossary" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="glossentry" mode="xref-to">
+<xsl:template match="d:glossentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:choose>
     <xsl:when test="$glossentry.show.acronym = 'primary'">
       <xsl:choose>
-        <xsl:when test="acronym|abbrev">
-          <xsl:apply-templates select="(acronym|abbrev)[1]" mode="no.anchor.mode"/>
+        <xsl:when test="d:acronym|d:abbrev">
+          <xsl:apply-templates select="(d:acronym|d:abbrev)[1]" mode="no.anchor.mode"/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:apply-templates select="glossterm[1]" mode="xref-to">
+          <xsl:apply-templates select="d:glossterm[1]" mode="xref-to">
             <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
             <xsl:with-param name="referrer" select="$referrer"/>
             <xsl:with-param name="verbose" select="$verbose"/>
       </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates select="glossterm[1]" mode="xref-to">
+      <xsl:apply-templates select="d:glossterm[1]" mode="xref-to">
         <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
         <xsl:with-param name="referrer" select="$referrer"/>
         <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="glossterm|firstterm" mode="xref-to">
+<xsl:template match="d:glossterm|d:firstterm" mode="xref-to">
   <xsl:apply-templates mode="no.anchor.mode"/>
 </xsl:template>
 
-<xsl:template match="index" mode="xref-to">
+<xsl:template match="d:index" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="listitem" mode="xref-to">
+<xsl:template match="d:listitem" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="section|simplesect
-                     |sect1|sect2|sect3|sect4|sect5
-                     |refsect1|refsect2|refsect3|refsection" mode="xref-to">
+<xsl:template match="d:section|d:simplesect
+                     |d:sect1|d:sect2|d:sect3|d:sect4|d:sect5
+                     |d:refsect1|d:refsect2|d:refsect3|d:refsection" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <!-- FIXME: What about "in Chapter X"? -->
 </xsl:template>
 
-<xsl:template match="topic" mode="xref-to">
+<xsl:template match="d:topic" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="bridgehead" mode="xref-to">
+<xsl:template match="d:bridgehead" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <!-- FIXME: What about "in Chapter X"? -->
 </xsl:template>
 
-<xsl:template match="qandaset" mode="xref-to">
+<xsl:template match="d:qandaset" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="qandaentry" mode="xref-to">
+<xsl:template match="d:qandaentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="question[1]" mode="xref-to">
+  <xsl:apply-templates select="d:question[1]" mode="xref-to">
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="question|answer" mode="xref-to">
+<xsl:template match="d:question|d:answer" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
   <xsl:choose>
-    <xsl:when test="string-length(label) != 0">
+    <xsl:when test="string-length(d:label) != 0">
       <xsl:apply-templates select="." mode="label.markup"/>
     </xsl:when>
     <xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="part|reference" mode="xref-to">
+<xsl:template match="d:part|d:reference" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="refentry" mode="xref-to">
+<xsl:template match="d:refentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   <xsl:choose>
-    <xsl:when test="refmeta/refentrytitle">
-      <xsl:apply-templates select="refmeta/refentrytitle" mode="no.anchor.mode"/>
+    <xsl:when test="d:refmeta/d:refentrytitle">
+      <xsl:apply-templates select="d:refmeta/d:refentrytitle" mode="no.anchor.mode"/>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:apply-templates select="refnamediv/refname[1]" mode="no.anchor.mode"/>
+      <xsl:apply-templates select="d:refnamediv/d:refname[1]" mode="no.anchor.mode"/>
     </xsl:otherwise>
   </xsl:choose>
-  <xsl:apply-templates select="refmeta/manvolnum" mode="no.anchor.mode"/>
+  <xsl:apply-templates select="d:refmeta/d:manvolnum" mode="no.anchor.mode"/>
 </xsl:template>
 
-<xsl:template match="refnamediv" mode="xref-to">
+<xsl:template match="d:refnamediv" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="refname[1]" mode="xref-to">
+  <xsl:apply-templates select="d:refname[1]" mode="xref-to">
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="refname" mode="xref-to">
+<xsl:template match="d:refname" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
   <xsl:apply-templates mode="xref-to"/>
 </xsl:template>
 
-<xsl:template match="step" mode="xref-to">
+<xsl:template match="d:step" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   <xsl:apply-templates select="." mode="number"/>
 </xsl:template>
 
-<xsl:template match="varlistentry" mode="xref-to">
+<xsl:template match="d:varlistentry" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:apply-templates select="term[1]" mode="xref-to">
+  <xsl:apply-templates select="d:term[1]" mode="xref-to">
     <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
     <xsl:with-param name="referrer" select="$referrer"/>
     <xsl:with-param name="verbose" select="$verbose"/>
   </xsl:apply-templates>
 </xsl:template>
 
-<xsl:template match="primary|secondary|tertiary" mode="xref-to">
+<xsl:template match="d:primary|d:secondary|d:tertiary" mode="xref-to">
   <xsl:value-of select="."/>
 </xsl:template>
 
-<xsl:template match="indexterm" mode="xref-to">
-  <xsl:value-of select="primary"/>
+<xsl:template match="d:indexterm" mode="xref-to">
+  <xsl:value-of select="d:primary"/>
 </xsl:template>
 
-<xsl:template match="varlistentry/term" mode="xref-to">
+<xsl:template match="d:varlistentry/d:term" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   <xsl:apply-templates mode="no.anchor.mode"/>
 </xsl:template>
 
-<xsl:template match="co" mode="xref-to">
+<xsl:template match="d:co" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   <xsl:apply-templates select="." mode="callout-bug"/>
 </xsl:template>
 
-<xsl:template match="area|areaset" mode="xref-to">
+<xsl:template match="d:area|d:areaset" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
 
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="book" mode="xref-to">
+<xsl:template match="d:book" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 <!-- These are elements for which no link text exists, so an xref to one
      uses the xrefstyle attribute if specified, or if not it falls back
      to the container element's link text -->
-<xsl:template match="para|phrase|simpara|anchor|quote" mode="xref-to">
+<xsl:template match="d:para|d:phrase|d:simpara|d:anchor|d:quote" mode="xref-to">
   <xsl:param name="referrer"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="verbose" select="1"/>
 
-  <xsl:variable name="context" select="(ancestor::simplesect
-                                       |ancestor::section
-                                       |ancestor::sect1
-                                       |ancestor::sect2
-                                       |ancestor::sect3
-                                       |ancestor::sect4
-                                       |ancestor::sect5
-                                       |ancestor::topic
-                                       |ancestor::refsection
-                                       |ancestor::refsect1
-                                       |ancestor::refsect2
-                                       |ancestor::refsect3
-                                       |ancestor::chapter
-                                       |ancestor::appendix
-                                       |ancestor::preface
-                                       |ancestor::partintro
-                                       |ancestor::dedication
-                                       |ancestor::acknowledgements
-                                       |ancestor::colophon
-                                       |ancestor::bibliography
-                                       |ancestor::index
-                                       |ancestor::glossary
-                                       |ancestor::glossentry
-                                       |ancestor::listitem
-                                       |ancestor::varlistentry)[last()]"/>
+  <xsl:variable name="context" select="(ancestor::d:simplesect
+                                       |ancestor::d:section
+                                       |ancestor::d:sect1
+                                       |ancestor::d:sect2
+                                       |ancestor::d:sect3
+                                       |ancestor::d:sect4
+                                       |ancestor::d:sect5
+                                       |ancestor::d:topic
+                                       |ancestor::d:refsection
+                                       |ancestor::d:refsect1
+                                       |ancestor::d:refsect2
+                                       |ancestor::d:refsect3
+                                       |ancestor::d:chapter
+                                       |ancestor::d:appendix
+                                       |ancestor::d:preface
+                                       |ancestor::d:partintro
+                                       |ancestor::d:dedication
+                                       |ancestor::d:acknowledgements
+                                       |ancestor::d:colophon
+                                       |ancestor::d:bibliography
+                                       |ancestor::d:index
+                                       |ancestor::d:glossary
+                                       |ancestor::d:glossentry
+                                       |ancestor::d:listitem
+                                       |ancestor::d:varlistentry)[last()]"/>
 
   <xsl:choose>
     <xsl:when test="$xrefstyle != ''">
   <xsl:value-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="author" mode="xref-title">
+<xsl:template match="d:author" mode="xref-title">
   <xsl:variable name="title">
     <xsl:call-template name="person.name"/>
   </xsl:variable>
   <xsl:value-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="xref-title">
+<xsl:template match="d:authorgroup" mode="xref-title">
   <xsl:variable name="title">
     <xsl:call-template name="person.name.list"/>
   </xsl:variable>
   <xsl:value-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis" mode="xref-title">
+<xsl:template match="d:cmdsynopsis" mode="xref-title">
   <xsl:variable name="title">
-    <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+    <xsl:apply-templates select="(.//d:command)[1]" mode="xref"/>
   </xsl:variable>
 
   <xsl:value-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="funcsynopsis" mode="xref-title">
+<xsl:template match="d:funcsynopsis" mode="xref-title">
   <xsl:variable name="title">
-    <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+    <xsl:apply-templates select="(.//d:function)[1]" mode="xref"/>
   </xsl:variable>
 
   <xsl:value-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="biblioentry|bibliomixed" mode="xref-title">
+<xsl:template match="d:biblioentry|d:bibliomixed" mode="xref-title">
   <!-- handles both biblioentry and bibliomixed -->
   <xsl:variable name="title">
     <xsl:text>[</xsl:text>
   <xsl:value-of select="$title"/>
 </xsl:template>
 
-<xsl:template match="step" mode="xref-title">
+<xsl:template match="d:step" mode="xref-title">
   <xsl:call-template name="gentext">
     <xsl:with-param name="key" select="'Step'"/>
   </xsl:call-template>
   <xsl:apply-templates select="." mode="number"/>
 </xsl:template>
 
-<xsl:template match="step[not(./title)]" mode="title.markup">
+<xsl:template match="d:step[not(./d:title)]" mode="title.markup">
   <xsl:call-template name="gentext">
     <xsl:with-param name="key" select="'Step'"/>
   </xsl:call-template>
   <xsl:apply-templates select="." mode="number"/>
 </xsl:template>
 
-<xsl:template match="co" mode="xref-title">
+<xsl:template match="d:co" mode="xref-title">
   <xsl:variable name="title">
     <xsl:apply-templates select="." mode="callout-bug"/>
   </xsl:variable>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="link" name="link">
+<xsl:template match="d:link" name="link">
   <xsl:param name="linkend" select="@linkend"/>
   <xsl:param name="a.target"/>
   <xsl:param name="xhref" select="@xlink:href"/>
 
 </xsl:template>
 
-<xsl:template match="ulink" name="ulink">
+<xsl:template match="d:ulink" name="ulink">
   <xsl:param name="url" select="@url"/>
   <xsl:variable name="link">
     <a>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="olink" name="olink">
+<xsl:template match="d:olink" name="olink">
   <!-- olink content may be passed in from xlink olink -->
   <xsl:param name="content" select="NOTANELEMENT"/>
 
 
 <!-- ==================================================================== -->
 
-<xsl:template match="title" mode="xref">
+<xsl:template match="d:title" mode="xref">
   <xsl:apply-templates mode="no.anchor.mode"/>
 </xsl:template>
 
-<xsl:template match="command" mode="xref">
+<xsl:template match="d:command" mode="xref">
   <xsl:call-template name="inline.boldseq"/>
 </xsl:template>
 
-<xsl:template match="function" mode="xref">
+<xsl:template match="d:function" mode="xref">
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="chapter|appendix" mode="insert.title.markup">
+<xsl:template match="d:chapter|d:appendix" mode="insert.title.markup">
   <xsl:param name="purpose"/>
   <xsl:param name="xrefstyle"/>
   <xsl:param name="title"/>
index 1f1d2e37d81020f6a846cd10eb56367f31396b80..9ad1801d28fb109e51da4308cf302ee6ae8d6ee3 100644 (file)
@@ -3,6 +3,7 @@
 <!ENTITY lf '<xsl:text xmlns:xsl="http://www.w3.org/1999/XSL/Transform">&#xA;</xsl:text>'>
 ]>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
   xmlns:exsl="http://exslt.org/common"
   xmlns:set="http://exslt.org/sets"
@@ -10,7 +11,7 @@
   xmlns:ng="http://docbook.org/docbook-ng"
   xmlns:db="http://docbook.org/ns/docbook"
   version="1.0"
-  exclude-result-prefixes="doc exsl set h db ng">
+  exclude-result-prefixes="doc exsl set h db ng d">
 
 <!-- ==================================================================== -->
 <!-- Customizations of standard HTML stylesheet parameters -->
@@ -23,7 +24,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:param name="htmlhelp.generate.index" select="//indexterm[1]|//db:indexterm[1]|//ng:indexterm[1]"/>
+<xsl:param name="htmlhelp.generate.index" select="//d:indexterm[1]|//db:indexterm[1]|//ng:indexterm[1]"/>
   
 <!-- Set up HTML Help flag -->
 <xsl:variable name="htmlhelp.output" select="1"/>
 be created as a global variable here.
 Used by docbook.xsl, chunk-common.xsl, chunktoc.xsl, and
 chunk-code.xsl; and in $chunk.hierarchy used in chunkfast.xsl -->
-<xsl:variable name="no.namespace">
+<xsl:variable name="with.namespace">
   <xsl:if test="$exsl.node.set.available != 0 and 
-                namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
-      <xsl:apply-templates select="/*" mode="stripNS"/>
+                namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
+      <xsl:apply-templates select="/*" mode="addNS"/>
   </xsl:if>
 </xsl:variable>
 
@@ -51,15 +52,15 @@ chunk-code.xsl; and in $chunk.hierarchy used in chunkfast.xsl -->
   <xsl:choose>
     <!-- fix namespace if necessary -->
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
       <!-- DEBUG: uncomment to save namespace-fixed document.
@@ -68,16 +69,16 @@ chunk-code.xsl; and in $chunk.hierarchy used in chunkfast.xsl -->
         <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
         <xsl:with-param name="method" select="'xml'"/>
         <xsl:with-param name="content">
-          <xsl:copy-of select="exsl:node-set($no.namespace)"/>
+          <xsl:copy-of select="exsl:node-set($with.namespace)"/>
         </xsl:with-param>
       </xsl:call-template>
       -->
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
@@ -342,7 +343,7 @@ Enhanced decompilation=</xsl:text>
 <!-- 
   Needs more investigation to generate propetly all fields 
 <xsl:text>search="</xsl:text>
-<xsl:value-of select="normalize-space(//title[1])"/>
+<xsl:value-of select="normalize-space(//d:title[1])"/>
 <xsl:text>","toc.hhc","index.hhk","</xsl:text>
 <xsl:value-of select="$root.filename"/>
 <xsl:text>.html","</xsl:text>
@@ -390,7 +391,7 @@ Enhanced decompilation=</xsl:text>
   <xsl:choose>
     <xsl:when test="$exsl.node.set.available != 0
                     and function-available('set:distinct')">
-      <xsl:for-each select="set:distinct(exsl:node-set($imagelist)/filename)">
+      <xsl:for-each select="set:distinct(exsl:node-set($imagelist)/d:filename)">
         <xsl:value-of select="."/>
         <xsl:text>&#10;</xsl:text>
       </xsl:for-each>
@@ -418,7 +419,7 @@ Enhanced decompilation=</xsl:text>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="graphic|inlinegraphic[@format!='linespecific']" mode="enumerate-images">
+<xsl:template match="d:graphic|d:inlinegraphic[@format!='linespecific']" mode="enumerate-images">
   <xsl:call-template name="write.filename.enumerate-images">
     <xsl:with-param name="filename">
       <xsl:call-template name="mediaobject.filename.enumerate-images">
@@ -428,14 +429,14 @@ Enhanced decompilation=</xsl:text>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="mediaobject|inlinemediaobject" mode="enumerate-images">
+<xsl:template match="d:mediaobject|d:inlinemediaobject" mode="enumerate-images">
   <xsl:call-template name="select.mediaobject.enumerate-images"/>
 </xsl:template>
 
 <xsl:template name="select.mediaobject.enumerate-images">
   <xsl:param name="olist"
-             select="imageobject|imageobjectco
-                     |videoobject|audioobject|textobject"/>
+             select="d:imageobject|d:imageobjectco
+                     |d:videoobject|d:audioobject|d:textobject"/>
   <xsl:param name="count">1</xsl:param>
 
   <xsl:if test="$count &lt;= count($olist)">
@@ -444,7 +445,7 @@ Enhanced decompilation=</xsl:text>
     <xsl:variable name="useobject">
       <xsl:choose>
         <!-- The phrase is never used -->
-        <xsl:when test="name($object)='textobject' and $object/phrase">
+        <xsl:when test="name($object)='textobject' and $object/d:phrase">
           <xsl:text>0</xsl:text>
         </xsl:when>
         <!-- The first textobject is a reasonable fallback (but not for image in HH) -->
@@ -461,7 +462,7 @@ Enhanced decompilation=</xsl:text>
             <!-- peek inside imageobjectco to simplify the test -->
             <xsl:when test="local-name($object) = 'imageobjectco'">
               <xsl:call-template name="is.acceptable.mediaobject">
-                <xsl:with-param name="object" select="$object/imageobject"/>
+                <xsl:with-param name="object" select="$object/d:imageobject"/>
               </xsl:call-template>
             </xsl:when>
             <xsl:otherwise>
@@ -618,11 +619,11 @@ Enhanced decompilation=</xsl:text>
   </OBJECT></LI>&lf;
 </xsl:template>
 
-<xsl:template match="set" mode="hhc">
+<xsl:template match="d:set" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="book">
+  <xsl:if test="d:book">
     <xsl:variable name="toc.params">
       <xsl:call-template name="find.path.params">
         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
@@ -656,16 +657,16 @@ Enhanced decompilation=</xsl:text>
           </param>
       </OBJECT></LI>&lf;
       </xsl:if>
-      <xsl:apply-templates select="book" mode="hhc"/>
+      <xsl:apply-templates select="d:book" mode="hhc"/>
     </UL>&lf;
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="book" mode="hhc">
+<xsl:template match="d:book" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="part|reference|preface|chapter|appendix|bibliography|article|colophon|glossary">
+  <xsl:if test="d:part|d:reference|d:preface|d:chapter|d:appendix|d:bibliography|d:article|d:colophon|d:glossary">
     <xsl:variable name="toc.params">
       <xsl:call-template name="find.path.params">
         <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
@@ -699,92 +700,92 @@ Enhanced decompilation=</xsl:text>
             </param>
         </OBJECT></LI>&lf;
       </xsl:if>
-      <xsl:apply-templates select="part|reference|preface|chapter|bibliography|appendix|article|colophon|glossary"
+      <xsl:apply-templates select="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:colophon|d:glossary"
                            mode="hhc"/>
     </UL>&lf;
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="part|reference|preface|chapter|bibliography|appendix|article|glossary"
+<xsl:template match="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:glossary"
               mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="article|reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv">
+  <xsl:if test="d:article|d:reference|d:preface|d:chapter|d:appendix|d:refentry|d:section|d:sect1|d:bibliodiv">
     <UL>&lf;
       <xsl:apply-templates
-        select="article|reference|preface|chapter|appendix|refentry|section|sect1|bibliodiv"
+        select="d:article|d:reference|d:preface|d:chapter|d:appendix|d:refentry|d:section|d:sect1|d:bibliodiv"
         mode="hhc"/>
     </UL>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="section" mode="hhc">
+<xsl:template match="d:section" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="section[count(ancestor::section) &lt; $htmlhelp.hhc.section.depth]|refentry">
+  <xsl:if test="d:section[count(ancestor::d:section) &lt; $htmlhelp.hhc.section.depth]|d:refentry">
     <UL>&lf;
-      <xsl:apply-templates select="section|refentry" mode="hhc"/>
+      <xsl:apply-templates select="d:section|d:refentry" mode="hhc"/>
     </UL>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect1" mode="hhc">
+<xsl:template match="d:sect1" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="sect2[$htmlhelp.hhc.section.depth > 1]|refentry">
+  <xsl:if test="d:sect2[$htmlhelp.hhc.section.depth > 1]|d:refentry">
     <UL>&lf;
-      <xsl:apply-templates select="sect2|refentry"
+      <xsl:apply-templates select="d:sect2|d:refentry"
                            mode="hhc"/>
     </UL>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect2" mode="hhc">
+<xsl:template match="d:sect2" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="sect3[$htmlhelp.hhc.section.depth > 2]|refentry">
+  <xsl:if test="d:sect3[$htmlhelp.hhc.section.depth > 2]|d:refentry">
     <UL>&lf;
-      <xsl:apply-templates select="sect3|refentry"
+      <xsl:apply-templates select="d:sect3|d:refentry"
                            mode="hhc"/>
     </UL>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect3" mode="hhc">
+<xsl:template match="d:sect3" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="sect4[$htmlhelp.hhc.section.depth > 3]|refentry">
+  <xsl:if test="d:sect4[$htmlhelp.hhc.section.depth > 3]|d:refentry">
     <UL>&lf;
-      <xsl:apply-templates select="sect4|refentry"
+      <xsl:apply-templates select="d:sect4|d:refentry"
                            mode="hhc"/>
     </UL>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect4" mode="hhc">
+<xsl:template match="d:sect4" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="sect5[$htmlhelp.hhc.section.depth > 4]|refentry">
+  <xsl:if test="d:sect5[$htmlhelp.hhc.section.depth > 4]|d:refentry">
     <UL>&lf;
-      <xsl:apply-templates select="sect5|refentry"
+      <xsl:apply-templates select="d:sect5|d:refentry"
                            mode="hhc"/>
     </UL>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="sect5|refentry|colophon|bibliodiv" mode="hhc">
+<xsl:template match="d:sect5|d:refentry|d:colophon|d:bibliodiv" mode="hhc">
   <xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
     <xsl:call-template name="hhc.entry"/>
   </xsl:if>
-  <xsl:if test="refentry">
+  <xsl:if test="d:refentry">
     <UL>&lf;
-      <xsl:apply-templates select="refentry"
+      <xsl:apply-templates select="d:refentry"
                            mode="hhc"/>
     </UL>
   </xsl:if>
@@ -792,37 +793,37 @@ Enhanced decompilation=</xsl:text>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="indexterm">
+<xsl:template match="d:indexterm">
   <xsl:choose>
     <xsl:when test="$htmlhelp.use.hhk = 0">
   
-      <xsl:variable name="primary" select="normalize-space(primary)"/>
-      <xsl:variable name="secondary" select="normalize-space(secondary)"/>
-      <xsl:variable name="tertiary" select="normalize-space(tertiary)"/>
+      <xsl:variable name="primary" select="normalize-space(d:primary)"/>
+      <xsl:variable name="secondary" select="normalize-space(d:secondary)"/>
+      <xsl:variable name="tertiary" select="normalize-space(d:tertiary)"/>
       
       <xsl:variable name="text">
         <xsl:value-of select="$primary"/>
-        <xsl:if test="secondary">
+        <xsl:if test="d:secondary">
           <xsl:text>, </xsl:text>
           <xsl:value-of select="$secondary"/>
         </xsl:if>
-        <xsl:if test="tertiary">
+        <xsl:if test="d:tertiary">
           <xsl:text>, </xsl:text>
           <xsl:value-of select="$tertiary"/>
         </xsl:if>
       </xsl:variable>
       
-      <xsl:if test="secondary">
-        <xsl:if test="not(//indexterm[normalize-space(primary)=$primary and not(secondary)])">
+      <xsl:if test="d:secondary">
+        <xsl:if test="not(//d:indexterm[normalize-space(d:primary)=$primary and not(d:secondary)])">
           <xsl:call-template name="write.indexterm">
             <xsl:with-param name="text" select="$primary"/>
           </xsl:call-template>
         </xsl:if>
       </xsl:if>
 
-      <xsl:if test="tertiary">
-        <xsl:if test="not(//indexterm[normalize-space(primary)=$primary and 
-                                      normalize-space(secondary)=$secondary and not(tertiary)])">
+      <xsl:if test="d:tertiary">
+        <xsl:if test="not(//d:indexterm[normalize-space(d:primary)=$primary and
+                                      normalize-space(d:secondary)=$secondary and not(d:tertiary)])">
           <xsl:call-template name="write.indexterm">
             <xsl:with-param name="text" select="concat($primary, ', ', $secondary)"/>
           </xsl:call-template>
@@ -892,20 +893,20 @@ Enhanced decompilation=</xsl:text>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="indexterm[@class='endofrange']" mode="hhk"/>
+<xsl:template match="d:indexterm[@class='endofrange']" mode="hhk"/>
 
-<xsl:template match="indexterm" mode="hhk">
-  <xsl:variable name="primary" select="normalize-space(primary)"/>
-  <xsl:variable name="secondary" select="normalize-space(secondary)"/>
-  <xsl:variable name="tertiary" select="normalize-space(tertiary)"/>
+<xsl:template match="d:indexterm" mode="hhk">
+  <xsl:variable name="primary" select="normalize-space(d:primary)"/>
+  <xsl:variable name="secondary" select="normalize-space(d:secondary)"/>
+  <xsl:variable name="tertiary" select="normalize-space(d:tertiary)"/>
 
   <xsl:call-template name="write.indexterm.hhk">
     <xsl:with-param name="text" select="$primary"/>
-    <xsl:with-param name="seealso" select="seealso"/>
+    <xsl:with-param name="seealso" select="d:seealso"/>
   </xsl:call-template>
 
-  <xsl:if test="secondary">
-    <xsl:if test="not(//indexterm[normalize-space(primary)=$primary and not(secondary)])">
+  <xsl:if test="d:secondary">
+    <xsl:if test="not(//d:indexterm[normalize-space(d:primary)=$primary and not(d:secondary)])">
       <xsl:call-template name="write.indexterm.hhk">
         <!-- We must create fake entry when there is secondary without primary --> 
         <xsl:with-param name="text" select="$primary"/>
@@ -915,13 +916,13 @@ Enhanced decompilation=</xsl:text>
     <UL>
     <xsl:call-template name="write.indexterm.hhk">
       <xsl:with-param name="text" select="$secondary"/>
-      <xsl:with-param name="seealso" select="secondary/seealso"/>
+      <xsl:with-param name="seealso" select="d:secondary/d:seealso"/>
     </xsl:call-template>
-    <xsl:if test="tertiary">
+    <xsl:if test="d:tertiary">
       <UL>&lf;
       <xsl:call-template name="write.indexterm.hhk">
         <xsl:with-param name="text" select="$tertiary"/>
-        <xsl:with-param name="seealso" select="tertiary/seealso"/>
+        <xsl:with-param name="seealso" select="d:tertiary/d:seealso"/>
       </xsl:call-template>
       </UL>
     </xsl:if>
@@ -941,7 +942,7 @@ Enhanced decompilation=</xsl:text>
       </xsl:attribute>
     </param>&lf;
 
-      <xsl:if test="not(seealso)">
+      <xsl:if test="not(d:seealso)">
         <xsl:variable name="href">
           <xsl:call-template name="href.target.with.base.dir"/>
         </xsl:variable>
@@ -963,7 +964,7 @@ Enhanced decompilation=</xsl:text>
         </param>&lf;
       </xsl:if>
 
-      <xsl:if test="seealso">
+      <xsl:if test="d:seealso">
         <param name="See Also">
           <xsl:attribute name="value">
           <xsl:value-of select="$seealso"/>
@@ -977,7 +978,7 @@ Enhanced decompilation=</xsl:text>
 
 <xsl:template name="nearest.title">
   <xsl:param name="object"/>
-  <xsl:apply-templates select="$object/ancestor-or-self::*[title][1]" mode="title.markup"/>
+  <xsl:apply-templates select="$object/ancestor-or-self::*[d:title][1]" mode="title.markup"/>
 </xsl:template>
 
 <!-- ==================================================================== -->
@@ -1117,7 +1118,7 @@ Enhanced decompilation=</xsl:text>
 <!-- Modification to standard HTML stylesheets -->
 
 <!-- There are links from ToC pane to bibliodivs, so there must be anchor -->
-<xsl:template match="bibliodiv/title">
+<xsl:template match="d:bibliodiv/d:title">
   <h3 class="{name(.)}">
     <xsl:call-template name="anchor">
       <xsl:with-param name="node" select=".."/>
index f3380656c4c3daf095c8d3c554a88cf4403c2094..da6e3bb301528550952db06f2a69746fc78c6108 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:set="http://exslt.org/sets"
                version="1.0"
-                exclude-result-prefixes="doc exsl set">
+                exclude-result-prefixes="doc exsl set d">
 
 <!-- ********************************************************************
 
index 2391af78247c9cce188068c9f67e9eb4c3a56e2a..2ee5c6c25292c4bd3939a96b7aec27f2d1adba07 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:set="http://exslt.org/sets"
                version="1.0"
-                exclude-result-prefixes="doc exsl set">
+                exclude-result-prefixes="doc exsl set d">
 
 <!-- ********************************************************************
 
index 00c00cab9c951a79f8076aa28c91f515ffe7471b..7ab1c6149e0b7cd7ab0f9caf23501b035ed25b28 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
-  xmlns:ng="http://docbook.org/docbook-ng"
-  xmlns:db="http://docbook.org/ns/docbook"
-  xmlns:exsl="http://exslt.org/common"
-  version="1.0"
-  exclude-result-prefixes="doc ng db exsl">
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+               xmlns:ng="http://docbook.org/docbook-ng"
+               xmlns:db="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               version="1.0"
+               exclude-result-prefixes="doc ng db exsl d">
 
 <xsl:import href="../html/chunk.xsl"/>
 
 
 <!-- ==================================================================== -->
 
-<xsl:variable name="no.namespace">
+<xsl:variable name="with.namespace">
   <xsl:if test="$exsl.node.set.available != 0 and 
-                namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
-      <xsl:apply-templates select="/*" mode="stripNS"/>
+                namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
+      <xsl:apply-templates select="/*" mode="addNS"/>
   </xsl:if>
 </xsl:variable>
 
   <xsl:choose>
     <!-- fix namespace if necessary -->
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
       <!-- DEBUG: uncomment to save namespace-fixed document.
         <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
         <xsl:with-param name="method" select="'xml'"/>
         <xsl:with-param name="content">
-          <xsl:copy-of select="exsl:node-set($no.namespace)"/>
+          <xsl:copy-of select="exsl:node-set($with.namespace)"/>
         </xsl:with-param>
       </xsl:call-template>
       -->
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
   </toc>
 </xsl:template>
 
-<xsl:template match="set" mode="jhtoc">
+<xsl:template match="d:set" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id">
       <xsl:with-param name="object" select="."/>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="book" mode="jhtoc"/>
+    <xsl:apply-templates select="d:book" mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="book" mode="jhtoc">
+<xsl:template match="d:book" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon|glossary|bibliography"
+    <xsl:apply-templates select="d:part|d:reference|d:preface|d:chapter|d:appendix|d:article|d:colophon|d:glossary|d:bibliography"
                          mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="part|reference|preface|chapter|appendix|article"
+<xsl:template match="d:part|d:reference|d:preface|d:chapter|d:appendix|d:article"
               mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
     <xsl:apply-templates
-      select="article|preface|chapter|appendix|refentry|section|sect1|glossary|bibliography"
+      select="d:article|d:preface|d:chapter|d:appendix|d:refentry|d:section|d:sect1|d:glossary|d:bibliography"
       mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="section" mode="jhtoc">
+<xsl:template match="d:section" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="section" mode="jhtoc"/>
+    <xsl:apply-templates select="d:section" mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="sect1" mode="jhtoc">
+<xsl:template match="d:sect1" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="sect2" mode="jhtoc"/>
+    <xsl:apply-templates select="d:sect2" mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="sect2" mode="jhtoc">
+<xsl:template match="d:sect2" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="sect3" mode="jhtoc"/>
+    <xsl:apply-templates select="d:sect3" mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="sect3" mode="jhtoc">
+<xsl:template match="d:sect3" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="sect4" mode="jhtoc"/>
+    <xsl:apply-templates select="d:sect4" mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="sect4" mode="jhtoc">
+<xsl:template match="d:sect4" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
     <xsl:attribute name="text">
       <xsl:value-of select="normalize-space($title)"/>
     </xsl:attribute>
-    <xsl:apply-templates select="sect5" mode="jhtoc"/>
+    <xsl:apply-templates select="d:sect5" mode="jhtoc"/>
   </tocitem>
 </xsl:template>
 
-<xsl:template match="sect5|colophon|refentry" mode="jhtoc">
+<xsl:template match="d:sect5|d:colophon|d:refentry" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 </xsl:template>
 
 
-<xsl:template match="glossary" mode="jhtoc">
+<xsl:template match="d:glossary" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
 </xsl:template>
 
-<xsl:template match="bibliography" mode="jhtoc">
+<xsl:template match="d:bibliography" mode="jhtoc">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   <map version="1.0">
     <xsl:choose>
       <xsl:when test="$rootid != ''">
-        <xsl:apply-templates select="key('id',$rootid)//set
-                                     | key('id',$rootid)//book
-                                     | key('id',$rootid)//part
-                                     | key('id',$rootid)//reference
-                                     | key('id',$rootid)//preface
-                                     | key('id',$rootid)//chapter
-                                     | key('id',$rootid)//appendix
-                                     | key('id',$rootid)//article
-                                     | key('id',$rootid)//colophon
-                                     | key('id',$rootid)//refentry
-                                     | key('id',$rootid)//section
-                                     | key('id',$rootid)//sect1
-                                     | key('id',$rootid)//sect2
-                                     | key('id',$rootid)//sect3
-                                     | key('id',$rootid)//sect4
-                                     | key('id',$rootid)//sect5
-                                     | key('id',$rootid)//indexterm 
-                                     | key('id',$rootid)//glossary
-                                     | key('id',$rootid)//bibliography
+        <xsl:apply-templates select="key('id',$rootid)//d:set
+                                     | key('id',$rootid)//d:book
+                                     | key('id',$rootid)//d:part
+                                     | key('id',$rootid)//d:reference
+                                     | key('id',$rootid)//d:preface
+                                     | key('id',$rootid)//d:chapter
+                                     | key('id',$rootid)//d:appendix
+                                     | key('id',$rootid)//d:article
+                                     | key('id',$rootid)//d:colophon
+                                     | key('id',$rootid)//d:refentry
+                                     | key('id',$rootid)//d:section
+                                     | key('id',$rootid)//d:sect1
+                                     | key('id',$rootid)//d:sect2
+                                     | key('id',$rootid)//d:sect3
+                                     | key('id',$rootid)//d:sect4
+                                     | key('id',$rootid)//d:sect5
+                                     | key('id',$rootid)//d:indexterm
+                                     | key('id',$rootid)//d:glossary
+                                     | key('id',$rootid)//d:bibliography
                                     | key('id',$rootid)//*[@id]"
                              mode="map"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="//set
-                                     | //book
-                                     | //part
-                                     | //reference
-                                     | //preface
-                                     | //chapter
-                                     | //appendix
-                                     | //article
-                                     | //colophon
-                                     | //refentry
-                                     | //section
-                                     | //sect1
-                                     | //sect2
-                                     | //sect3
-                                     | //sect4
-                                     | //sect5
-                                     | //indexterm
-                                     | //glossary
-                                     | //bibliography
+        <xsl:apply-templates select="//d:set
+                                     | //d:book
+                                     | //d:part
+                                     | //d:reference
+                                     | //d:preface
+                                     | //d:chapter
+                                     | //d:appendix
+                                     | //d:article
+                                     | //d:colophon
+                                     | //d:refentry
+                                     | //d:section
+                                     | //d:sect1
+                                     | //d:sect2
+                                     | //d:sect3
+                                     | //d:sect4
+                                     | //d:sect5
+                                     | //d:indexterm
+                                     | //d:glossary
+                                     | //d:bibliography
                                     | //*[@id]"
                              mode="map"/>
       </xsl:otherwise>
   </map>
 </xsl:template>
 
-<xsl:template match="set" mode="map">
+<xsl:template match="d:set" mode="map">
   <xsl:variable name="id">
     <xsl:call-template name="object.id">
       <xsl:with-param name="object" select="."/>
   </mapID>
 </xsl:template>
 
-<xsl:template match="book" mode="map">
+<xsl:template match="d:book" mode="map">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </mapID>
 </xsl:template>
 
-<xsl:template match="part|reference|preface|chapter|appendix|refentry|article|glossary|bibliography"
+<xsl:template match="d:part|d:reference|d:preface|d:chapter|d:appendix|d:refentry|d:article|d:glossary|d:bibliography"
               mode="map">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </mapID>
 </xsl:template>
 
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5|colophon" mode="map">
+<xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:colophon" mode="map">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   </mapID>
 </xsl:template>
 
-<xsl:template match="indexterm[@class='endofrange']" mode="map"/>
+<xsl:template match="d:indexterm[@class='endofrange']" mode="map"/>
 
-<xsl:template match="indexterm" mode="map">
+<xsl:template match="d:indexterm" mode="map">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
   <index version="1.0">
     <xsl:choose>
       <xsl:when test="$rootid != ''">
-        <xsl:apply-templates select="key('id',$rootid)//indexterm" mode="idx">
-         <xsl:sort select="primary"/>
-         <xsl:sort select="secondary"/>
-         <xsl:sort select="tertiary"/>
+        <xsl:apply-templates select="key('id',$rootid)//d:indexterm" mode="idx">
+         <xsl:sort select="d:primary"/>
+         <xsl:sort select="d:secondary"/>
+         <xsl:sort select="d:tertiary"/>
        </xsl:apply-templates>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:apply-templates select="//indexterm" mode="idx">
-          <xsl:sort select="primary"/>
-         <xsl:sort select="secondary"/>
-         <xsl:sort select="tertiary"/>
+        <xsl:apply-templates select="//d:indexterm" mode="idx">
+          <xsl:sort select="d:primary"/>
+         <xsl:sort select="d:secondary"/>
+         <xsl:sort select="d:tertiary"/>
         </xsl:apply-templates>
       </xsl:otherwise>
     </xsl:choose>
   </index>
 </xsl:template>
 
-<xsl:template match="indexterm[@class='endofrange']" mode="idx"/>
+<xsl:template match="d:indexterm[@class='endofrange']" mode="idx"/>
 
-<xsl:template match="indexterm" mode="idx">
+<xsl:template match="d:indexterm" mode="idx">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>
 
   <xsl:variable name="text">
-    <xsl:value-of select="normalize-space(primary)"/>
-    <xsl:if test="secondary">
+    <xsl:value-of select="normalize-space(d:primary)"/>
+    <xsl:if test="d:secondary">
       <xsl:text>, </xsl:text>
-      <xsl:value-of select="normalize-space(secondary)"/>
+      <xsl:value-of select="normalize-space(d:secondary)"/>
     </xsl:if>
-    <xsl:if test="tertiary">
+    <xsl:if test="d:tertiary">
       <xsl:text>, </xsl:text>
-      <xsl:value-of select="normalize-space(tertiary)"/>
+      <xsl:value-of select="normalize-space(d:tertiary)"/>
     </xsl:if>
   </xsl:variable>
 
   <xsl:choose>
-    <xsl:when test="see">
-      <xsl:variable name="see"><xsl:value-of select="normalize-space(see)"/></xsl:variable>
+    <xsl:when test="d:see">
+      <xsl:variable name="see"><xsl:value-of select="normalize-space(d:see)"/></xsl:variable>
       <indexitem text="{$text} see '{$see}'"/>
     </xsl:when>
     <xsl:otherwise>
index b12d4e05a63b34c9ea73de05ecc214d1b0aa62d3..ea5e76428e9c5c06e958b16d20f96b3da5be0801 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -14,7 +15,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="caution|important|note|tip|warning">
+<xsl:template match="d:caution|d:important|d:note|d:tip|d:warning">
   <xsl:call-template name="roff-if-start">
     <xsl:with-param name="condition">n</xsl:with-param>
   </xsl:call-template>
@@ -37,9 +38,9 @@
   <xsl:text>.RE&#10;</xsl:text>
 </xsl:template> 
 
-<xsl:template match="formalpara">
+<xsl:template match="d:formalpara">
   <xsl:variable name="title.wrapper">
-    <xsl:value-of select="normalize-space(title[1])"/>
+    <xsl:value-of select="normalize-space(d:title[1])"/>
   </xsl:variable>
   <xsl:text>.PP&#10;</xsl:text>
   <!-- * don't put linebreak after head; instead render it as a "run in" -->
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="formalpara/para">
+<xsl:template match="d:formalpara/d:para">
   <xsl:call-template name="mixed-block"/>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="para">
+<xsl:template match="d:para">
   <!-- * FIXME: Need to extract the ancestor::footnote, etc. checking and -->
   <!-- * move to named template so that we can call it from templates for -->
   <!-- * other block elements also -->
     <!-- * anything at all to mark its start). -->
     <!-- * FIXME: *blurb checking should not be munged in here the way -->
     <!-- * it currently is; this probably breaks blurb indenting. -->
-    <xsl:when test="ancestor::footnote or
-                    ancestor::annotation or
-                    ancestor::authorblurb or
-                    ancestor::personblurb or
-                    ancestor::callout">
+    <xsl:when test="ancestor::d:footnote or
+                    ancestor::d:annotation or
+                    ancestor::d:authorblurb or
+                    ancestor::d:personblurb or
+                    ancestor::d:callout">
       <xsl:if test="preceding-sibling::*[not(name() ='')]">
         <xsl:text>.sp</xsl:text>
         <xsl:text>&#10;</xsl:text>
     </xsl:otherwise>
   </xsl:choose>
   <xsl:call-template name="mixed-block"/>
-    <xsl:if test="ancestor::footnote or
-                  ancestor::annotation or
-                  ancestor::authorblurb or
-                  ancestor::personblurb">
+    <xsl:if test="ancestor::d:footnote or
+                  ancestor::d:annotation or
+                  ancestor::d:authorblurb or
+                  ancestor::d:personblurb">
       <xsl:if test="preceding-sibling::*[not(name() ='')]">
         <xsl:text>&#10;</xsl:text>
         <xsl:text>.RE</xsl:text>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="simpara">
+<xsl:template match="d:simpara">
   <xsl:choose>
-    <xsl:when test="ancestor::footnote or
-                    ancestor::annotation or
-                    ancestor::authorblurb or
-                    ancestor::personblurb or
-                    ancestor::callout">
+    <xsl:when test="ancestor::d:footnote or
+                    ancestor::d:annotation or
+                    ancestor::d:authorblurb or
+                    ancestor::d:personblurb or
+                    ancestor::d:callout">
       <xsl:if test="preceding-sibling::*[not(name() ='')]">
         <xsl:text>.sp</xsl:text>
         <xsl:text>&#10;</xsl:text>
 <!-- ==================================================================== -->
 
 <!-- * Yes, address, synopsis, and funcsynopsisinfo are verbatim environments. -->
-<xsl:template match="literallayout|programlisting|screen|
-                     address|synopsis|funcsynopsisinfo">
+<xsl:template match="d:literallayout|d:programlisting|d:screen|
+                     d:address|d:synopsis|d:funcsynopsisinfo">
   <xsl:param name="indent">
     <!-- * Only indent this verbatim if $man.indent.verbatims is -->
     <!-- * non-zero and it is not a child of a *synopsis element or a -->
     <!-- * -->
     <!-- * If it is not within a mixed-content parent, then we need to add a -->
     <!-- * line space before it. -->
-    <xsl:when test="parent::caption|parent::entry|parent::para|
-                    parent::td|parent::th" /> <!-- do nothing -->
+    <xsl:when test="parent::d:caption|parent::d:entry|parent::d:para|
+                    parent::d:td|parent::d:th" /> <!-- do nothing -->
     <xsl:otherwise>
       <xsl:text>&#10;</xsl:text>
       <xsl:text>.sp&#10;</xsl:text>
     <xsl:call-template name="roff-if-end"/>
   </xsl:if>
   <xsl:choose>
-    <xsl:when test="self::funcsynopsisinfo">
+    <xsl:when test="self::d:funcsynopsisinfo">
       <!-- * All Funcsynopsisinfo content is by default rendered in bold, -->
       <!-- * because the man(7) man page says this: -->
       <!-- * -->
       <xsl:call-template name="verbatim-block-start"/>
       <xsl:text>.nf&#10;</xsl:text>
       <xsl:choose>
-        <xsl:when test="self::literallayout|self::programlisting|self::screen
+        <xsl:when test="self::d:literallayout|self::d:programlisting|self::d:screen
           and not(ancestor::*[local-name() = 'refsynopsisdiv'])
           and not($man.output.better.ps.enabled = 0)
           ">
   <!-- * if this verbatim environment has a following sibling node, -->
   <!-- * output a line of space to separate the content -->
   <xsl:if test="following-sibling::text()
-    |following-sibling::para
-    |following-sibling::simpara">
+    |following-sibling::d:para
+    |following-sibling::d:simpara">
     <xsl:text>.sp&#10;</xsl:text>
   </xsl:if>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="table|informaltable">
+<xsl:template match="d:table|d:informaltable">
   <xsl:apply-templates select="." mode="to.tbl">
     <!--* we call the to.tbl mode with the "source" param so that we can -->
     <!--* preserve the context information and pass it down to the -->
     <!--* named templates that do the actual table processing -->
-    <xsl:with-param name="source" select="ancestor::refentry/refnamediv[1]/refname[1]"/>
+    <xsl:with-param name="source" select="ancestor::d:refentry/d:refnamediv[1]/d:refname[1]"/>
   </xsl:apply-templates>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="informalexample">
+<xsl:template match="d:informalexample">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="figure|example">
+<xsl:template match="d:figure|d:example">
   <xsl:variable name="param.placement"
                 select="substring-after(normalize-space($formal.title.placement),
                         concat(local-name(.), ' '))"/>
 
 <!-- ==================================================================== -->
 
-<xsl:template match="mediaobject">
+<xsl:template match="d:mediaobject">
   <xsl:text>.sp</xsl:text>
   <xsl:text>&#10;</xsl:text>
   <xsl:text>.RS</xsl:text> 
   <xsl:text>.RE&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="imageobject">
+<xsl:template match="d:imageobject">
   <xsl:text>[IMAGE]</xsl:text>
   <xsl:apply-templates/>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="textobject[parent::inlinemediaobject]">
+<xsl:template match="d:textobject[parent::d:inlinemediaobject]">
   <xsl:text>[</xsl:text>
   <xsl:value-of select="."/>
   <xsl:text>]</xsl:text>
 </xsl:template>
 
-<xsl:template match="textobject">
+<xsl:template match="d:textobject">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- ==================================================================== -->
 
 <!-- * suppress abstract -->
-<xsl:template match="abstract"/>
+<xsl:template match="d:abstract"/>
 
 </xsl:stylesheet>
index 693d56728d828e88873b561c87a3411573fd4f99..0e2d784f4b4899af2157439262f1358c53a55196 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="US-ASCII"?>
 <xsl:stylesheet version="2.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:u="http://docbook.sf.net/xmlns/unichar/1.0"
-                exclude-result-prefixes="u">
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:u="http://docbook.sf.net/xmlns/unichar/1.0"
+                exclude-result-prefixes="u d">
 
 <!-- ********************************************************************
 
index 74e234b3c404281ffaf0dda9fc69ec24bfb63116..242701083e963aa452212d9d099be3d67e0d4000 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:ng="http://docbook.org/docbook-ng"
                 xmlns:db="http://docbook.org/ns/docbook"
-                exclude-result-prefixes="exsl"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
   <xsl:import href="../html/docbook.xsl"/>
   <xsl:choose>
     <!-- fix namespace if necessary -->
     <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:call-template name="log.message">
         <xsl:with-param name="level">Note</xsl:with-param>
         <xsl:with-param name="source" select="$doc.title"/>
         <xsl:with-param name="context-desc">
-          <xsl:text>namesp. cut</xsl:text>
+          <xsl:text>namesp. add</xsl:text>
         </xsl:with-param>
         <xsl:with-param name="message">
-          <xsl:text>stripped namespace before processing</xsl:text>
+          <xsl:text>added namespace before processing</xsl:text>
         </xsl:with-param>
       </xsl:call-template>
       <!-- DEBUG: uncomment to save namespace-fixed document.
         <xsl:with-param name="filename" select="'namespace-fixed.debug.xml'"/>
         <xsl:with-param name="method" select="'xml'"/>
         <xsl:with-param name="content">
-          <xsl:copy-of select="$no.namespace"/>
+          <xsl:copy-of select="$with.namespace"/>
         </xsl:with-param>
       </xsl:call-template>
       -->
-      <xsl:apply-templates select="exsl:node-set($no.namespace)"/>
+      <xsl:apply-templates select="exsl:node-set($with.namespace)"/>
     </xsl:when>
     <!-- Can't process unless namespace fixed with exsl node-set()-->
-    <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+    <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
       <xsl:message terminate="yes">
-        <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+        <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
         <xsl:text> cannot proceed.</xsl:text>
       </xsl:message>
     </xsl:when>
@@ -97,7 +98,7 @@
       <!-- * manpages/profile-docbook.xsl, and the refentry child check -->
       <!-- * in the profile-docbook.xsl stylesheet won't work if we do -->
       <!-- * a simple //refentry check. -->
-      <xsl:apply-templates select="//refentry"/>
+      <xsl:apply-templates select="//d:refentry"/>
       <!-- * if $man.output.manifest.enabled is non-zero, -->
       <!-- * generate a manifest file -->
       <xsl:if test="not($man.output.manifest.enabled = 0)">
 
   <!-- ============================================================== -->
 
-  <xsl:template match="refentry">
+  <xsl:template match="d:refentry">
     <xsl:param name="lang">
       <xsl:call-template name="l10n.language"/>
     </xsl:param>
     <!-- * Just use the first refname found as the "name" of the man -->
     <!-- * page (which may different from the "title"...) -->
-    <xsl:variable name="first.refname" select="refnamediv[1]/refname[1]"/>
+    <xsl:variable name="first.refname" select="d:refnamediv[1]/d:refname[1]"/>
 
     <xsl:call-template name="root.messages">
       <xsl:with-param name="refname" select="$first.refname"/>
index 76f45da6680b22fe721eae7f64ba0967f545c52c..87ceae80a2fb0317b9602bca1807b6c445c3fc3c 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:ng="http://docbook.org/docbook-ng"
                 xmlns:db="http://docbook.org/ns/docbook"
                 xmlns:ear="http://fake.namespace"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="db ng exsl xlink"
+                exclude-result-prefixes="db ng exsl xlink d"
                 version='1.0'>
 
 <!-- ********************************************************************
   <!-- * multiple indexes. -->
   <xsl:if test="$man.endnotes.are.numbered != 0">
     <!-- * Only create earmark indexes if user wants numbered endnotes -->
-    <xsl:for-each select="//refentry">
+    <xsl:for-each select="//d:refentry">
       <ear:earmark.index>
         <xsl:attribute name="idref">
           <xsl:value-of select="generate-id()"/>
         </xsl:attribute>
         <xsl:for-each
             select=".//*[self::*[@xlink:href]
-                    or self::ulink
-                    or self::imagedata
-                    or self::audiodata
-                    or self::videodata
-                    or self::footnote[not(ancestor::table)]
-                    or self::annotation
-                    or self::alt]
+                    or self::d:ulink
+                    or self::d:imagedata
+                    or self::d:audiodata
+                    or self::d:videodata
+                    or self::d:footnote[not(ancestor::d:table)]
+                    or self::d:annotation
+                    or self::d:alt]
                     [(node()
-                      or self::imagedata
-                      or self::audiodata
-                      or self::videodata
+                      or self::d:imagedata
+                      or self::d:audiodata
+                      or self::d:videodata
                       )
-                    and not(ancestor::refentryinfo)
-                    and not(ancestor::info)
-                    and not(ancestor::docinfo)
-                    and not(ancestor::refmeta)
-                    and not(ancestor::refnamediv)
-                    and not(ancestor::indexterm)
+                    and not(ancestor::d:refentryinfo)
+                    and not(ancestor::d:info)
+                    and not(ancestor::d:docinfo)
+                    and not(ancestor::d:refmeta)
+                    and not(ancestor::d:refnamediv)
+                    and not(ancestor::d:indexterm)
                     and not(. = @url)
                     and not(. = @xlink:href)
                     and not(@url =
-                    preceding::ulink[node()
-                    and not(ancestor::refentryinfo)
-                    and not(ancestor::info)
-                    and not(ancestor::docinfo)
-                    and not(ancestor::refmeta)
-                    and not(ancestor::refnamediv)
-                    and not(ancestor::indexterm)
-                    and (generate-id(ancestor::refentry)
+                    preceding::d:ulink[node()
+                    and not(ancestor::d:refentryinfo)
+                    and not(ancestor::d:info)
+                    and not(ancestor::d:docinfo)
+                    and not(ancestor::d:refmeta)
+                    and not(ancestor::d:refnamediv)
+                    and not(ancestor::d:indexterm)
+                    and (generate-id(ancestor::d:refentry)
                     = generate-id(current()))]/@url)
                     and not(@xlink:href =
                     preceding::*[@xlink:href][node()
-                    and not(ancestor::refentryinfo)
-                    and not(ancestor::info)
-                    and not(ancestor::docinfo)
-                    and not(ancestor::refmeta)
-                    and not(ancestor::refnamediv)
-                    and not(ancestor::indexterm)
-                    and (generate-id(ancestor::refentry)
+                    and not(ancestor::d:refentryinfo)
+                    and not(ancestor::d:info)
+                    and not(ancestor::d:docinfo)
+                    and not(ancestor::d:refmeta)
+                    and not(ancestor::d:refnamediv)
+                    and not(ancestor::d:indexterm)
+                    and (generate-id(ancestor::d:refentry)
                     = generate-id(current()))]/@xlink:href)
                     and not(@fileref =
                     preceding::*[@fileref][
-                    not(ancestor::refentryinfo)
-                    and not(ancestor::info)
-                    and not(ancestor::docinfo)
-                    and not(ancestor::refmeta)
-                    and not(ancestor::refnamediv)
-                    and not(ancestor::indexterm)
-                    and (generate-id(ancestor::refentry)
+                    not(ancestor::d:refentryinfo)
+                    and not(ancestor::d:info)
+                    and not(ancestor::d:docinfo)
+                    and not(ancestor::d:refmeta)
+                    and not(ancestor::d:refnamediv)
+                    and not(ancestor::d:indexterm)
+                    and (generate-id(ancestor::d:refentry)
                     = generate-id(current()))]/@fileref)]">
           <ear:earmark>
             <xsl:attribute name="id">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="*[@xlink:href]|ulink
-  |imagedata|audiodata|videodata
-  |footnote[not(ancestor::table)]
-  |annotation|alt">
-  <xsl:variable name="refname" select="ancestor::refentry/refnamediv[1]/refname[1]"/>
+<xsl:template match="*[@xlink:href]|d:ulink
+  |d:imagedata|d:audiodata|d:videodata
+  |d:footnote[not(ancestor::d:table)]
+  |d:annotation|d:alt">
+  <xsl:variable name="refname" select="ancestor::d:refentry/d:refnamediv[1]/d:refname[1]"/>
   <xsl:variable name="all.earmark.indexes.in.current.document.rtf">
     <xsl:call-template name="get.all.earmark.indexes.in.current.document"/>
   </xsl:variable>
     <xsl:copy-of
         select="$all.earmark.indexes.in.current.document/ear:earmark.index
                 [@idref =
-                generate-id(current()/ancestor::refentry)]/ear:earmark"/>
+                generate-id(current()/ancestor::d:refentry)]/ear:earmark"/>
   </xsl:variable>
   <xsl:variable name="all.earmarks.in.current.refentry"
                 select="exsl:node-set($all.earmarks.in.current.refentry.rtf)"/>
     <!-- * equal to the value of its url or xlink:href attribute (if -->
     <!-- * it has one) AND user wants endnotes numbered, only then -->
     <!-- * do we output a number for it -->
-    <xsl:if test="(self::imagedata or
-      self::audiodata or
-      self::videodata or
+    <xsl:if test="(self::d:imagedata or
+      self::d:audiodata or
+      self::d:videodata or
       (node()
       and not(. = @url)
       and not(. = @xlink:href))
       <!-- * numbered earmark; in that case, they get the same number. -->
       <!-- * -->
       <xsl:choose>
-        <xsl:when test="self::ulink or
+        <xsl:when test="self::d:ulink or
           self::*[@xlink:href] or
-          self::imagedata or
-          self::audiodata or
-          self::videodata">
+          self::d:imagedata or
+          self::d:audiodata or
+          self::d:videodata">
           <xsl:value-of select="$all.earmarks.in.current.refentry/ear:earmark[@uri = $earmark]/@number"/>
         </xsl:when>
         <xsl:otherwise>
       <xsl:when test="node()">
         <!-- * this is a non-empty node, so process its contents -->
         <xsl:apply-templates/>
-        <xsl:if test="../footnote or ../annotation">
+        <xsl:if test="../d:footnote or ../d:annotation">
           <!-- * if this element is a footnote or annotation, we need to -->
           <!-- * do some further checking on it, so we can emit warnings -->
           <!-- * about potential problems -->
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:if test="self::ulink or self::*[@xlink:href]">
+  <xsl:if test="self::d:ulink or self::*[@xlink:href]">
     <xsl:variable name="link.wrapper">
       <xsl:value-of select="normalize-space($notesource.contents)"/>
     </xsl:variable>
index 1890794af723f6c3d9964aaa47d68738743e581d..07e283d8eedb3fc16b4fb87b7d3ec01c246d2dc0 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:date="http://exslt.org/dates-and-times"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:date="http://exslt.org/dates-and-times"
                 xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="date exsl"
+                exclude-result-prefixes="date exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
     <xsl:param name="info"/>
     <xsl:param name="refname"/>
     <xsl:choose>
-      <xsl:when test="$info//author">
+      <xsl:when test="$info//d:author">
         <xsl:apply-templates
-            select="(($info[//author])[last()]//author)[1]"
+            select="(($info[//d:author])[last()]//d:author)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//corpauthor">
+      <xsl:when test="$info//d:corpauthor">
         <xsl:apply-templates
-            select="(($info[//corpauthor])[last()]//corpauthor)[1]"
+            select="(($info[//d:corpauthor])[last()]//d:corpauthor)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//editor">
+      <xsl:when test="$info//d:editor">
         <xsl:apply-templates
-            select="(($info[//editor])[last()]//editor)[1]"
+            select="(($info[//d:editor])[last()]//d:editor)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//corpcredit">
+      <xsl:when test="$info//d:corpcredit">
         <xsl:apply-templates
-            select="(($info[//corpcredit])[last()]//corpcredit)[1]"
+            select="(($info[//d:corpcredit])[last()]//d:corpcredit)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//othercredit">
+      <xsl:when test="$info//d:othercredit">
         <xsl:apply-templates
-            select="(($info[//othercredit])[last()]//othercredit)[1]"
+            select="(($info[//d:othercredit])[last()]//d:othercredit)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//collab">
+      <xsl:when test="$info//d:collab">
         <xsl:apply-templates
-            select="(($info[//collab])[last()]//collab)[1]"
+            select="(($info[//d:collab])[last()]//d:collab)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//orgname">
+      <xsl:when test="$info//d:orgname">
         <xsl:apply-templates
-            select="(($info[//orgname])[last()]//orgname)[1]"
+            select="(($info[//d:orgname])[last()]//d:orgname)[1]"
             mode="metadata.author"/>
       </xsl:when>
-      <xsl:when test="$info//publishername">
+      <xsl:when test="$info//d:publishername">
         <xsl:apply-templates
-            select="(($info[//publishername])[last()]//publishername)[1]"
+            select="(($info[//d:publishername])[last()]//d:publishername)[1]"
             mode="metadata.author"/>
       </xsl:when>
       <xsl:otherwise>
         <!-- * instances, delimit each with double quotes, and put them -->
         <!-- * into a single refsect1.titles string -->
         <xsl:variable name="refsect1.titles">
-          <xsl:for-each select="refsect1/title">
+          <xsl:for-each select="d:refsect1/d:title">
             <xsl:text>"</xsl:text>
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:text>"</xsl:text>
             <xsl:text> </xsl:text>
           </xsl:for-each>
-          <xsl:for-each select="refsection/title">
+          <xsl:for-each select="d:refsection/d:title">
             <xsl:text>"</xsl:text>
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:text>"</xsl:text>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="author|editor|othercredit|collab" mode="metadata.author">
+  <xsl:template match="d:author|d:editor|d:othercredit|d:collab" mode="metadata.author">
     <xsl:choose>
-      <xsl:when test="collabname">
+      <xsl:when test="d:collabname">
         <!-- * If this node is a Collab, then it should have a -->
         <!-- * Collabname child, so get that. -->
         <xsl:variable name="contents">
-          <xsl:apply-templates select="collabname"/>
+          <xsl:apply-templates select="d:collabname"/>
         </xsl:variable>
         <xsl:value-of select="normalize-space($contents)"/>
       </xsl:when>
         <xsl:call-template name="person.name.normalized"/>
       </xsl:otherwise>
     </xsl:choose>
-    <xsl:if test=".//email|address/otheraddr/ulink">
+    <xsl:if test=".//d:email|d:address/d:otheraddr/d:ulink">
       <xsl:text> </xsl:text>
       <!-- * For each attribution found, use only the first e-mail -->
       <!-- * address or ulink value found -->
-      <xsl:apply-templates select="(.//email|address/otheraddr/ulink)[1]"
+      <xsl:apply-templates select="(.//d:email|d:address/d:otheraddr/d:ulink)[1]"
                            mode="metadata.author"/>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match="email|address/otheraddr/ulink" mode="metadata.author">
+  <xsl:template match="d:email|d:address/d:otheraddr/d:ulink" mode="metadata.author">
     <xsl:text>&lt;</xsl:text>
     <xsl:choose>
-      <xsl:when test="self::email">
+      <xsl:when test="self::d:email">
         <xsl:variable name="contents">
           <xsl:apply-templates/>
         </xsl:variable>
         <xsl:value-of select="normalize-space($contents)"/>
       </xsl:when>
-      <xsl:when test="self::ulink">
+      <xsl:when test="self::d:ulink">
         <xsl:variable name="contents">
           <xsl:apply-templates select="."/>
         </xsl:variable>
     <xsl:text>&gt;</xsl:text>
   </xsl:template>
 
-  <xsl:template match="corpauthor|corpcredit|orgname|publishername" mode="metadata.author">
+  <xsl:template match="d:corpauthor|d:corpcredit|d:orgname|d:publishername" mode="metadata.author">
     <xsl:variable name="contents">
       <xsl:apply-templates/>
     </xsl:variable>
     <!-- * Refentry, plus the entire contents of the *info children of -->
     <!-- * all ancestors of the current Refentry, in document order. -->
     <xsl:choose>
-      <xsl:when test="$info//author|$info//editor|$info//collab|
-                      $info//corpauthor|$info//corpcredit|
-                      $info//othercredit|$info/orgname|
-                      $info/publishername|$info/publisher">
+      <xsl:when test="$info//d:author|$info//d:editor|$info//d:collab|
+                      $info//d:corpauthor|$info//d:corpcredit|
+                      $info//d:othercredit|$info/d:orgname|
+                      $info/d:publishername|$info/d:publisher">
         <xsl:variable name="authorcount">
           <xsl:value-of
               select="count(
-                      $info//author|$info//editor|$info//collab|
-                      $info//corpauthor|$info//corpcredit|
-                      $info//othercredit)">
+                      $info//d:author|$info//d:editor|$info//d:collab|
+                      $info//d:corpauthor|$info//d:corpcredit|
+                      $info//d:othercredit)">
           </xsl:value-of>
         </xsl:variable>
         <xsl:call-template name="make.subheading">
         </xsl:call-template>
         <!-- * Now output all the actual author, editor, etc. content -->
         <xsl:for-each
-          select="$info//author|$info//editor|$info//collab|
-          $info//corpauthor|$info//corpcredit|
-          $info//othercredit|$info/orgname|
-          $info/publishername|$info/publisher">
+          select="$info//d:author|$info//d:editor|$info//d:collab|
+          $info//d:corpauthor|$info//d:corpcredit|
+          $info//d:othercredit|$info/d:orgname|
+          $info/d:publishername|$info/d:publisher">
           <xsl:apply-templates select="." mode="authorsect"/>
         </xsl:for-each>
       </xsl:when>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match="author|editor|othercredit" mode="authorsect">
+  <xsl:template match="d:author|d:editor|d:othercredit" mode="authorsect">
     <xsl:variable name="person-name">
       <xsl:call-template name="person.name.normalized"/>
     </xsl:variable>
     <!-- * If we have a person-name or email or ulink content, then -->
     <!-- * output name and email or ulink content on the same line -->
     <xsl:choose>
-      <xsl:when test="not($person-name = '') or .//email or address/otheraddr/ulink">
+      <xsl:when test="not($person-name = '') or .//d:email or d:address/d:otheraddr/d:ulink">
         <xsl:text>.PP&#10;</xsl:text>
         <!-- * Display person name in bold -->
         <xsl:call-template name="bold">
           <xsl:with-param name="context" select="."/>
         </xsl:call-template>
         <!-- * Display e-mail address(es) and ulink(s) on same line as name -->
-        <xsl:apply-templates select=".//email|address/otheraddr/ulink" mode="authorsect"/>
+        <xsl:apply-templates select=".//d:email|d:address/d:otheraddr/d:ulink" mode="authorsect"/>
         <xsl:text>&#10;</xsl:text>
       </xsl:when>
       <xsl:otherwise>
       </xsl:otherwise>
     </xsl:choose>
     <!-- * Display affiliation(s) on separate lines -->
-    <xsl:apply-templates select="affiliation" mode="authorsect"/>
+    <xsl:apply-templates select="d:affiliation" mode="authorsect"/>
     <!-- * Display direct-child addresses on separate lines -->
-    <xsl:apply-templates select="address" mode="authorsect"/>
+    <xsl:apply-templates select="d:address" mode="authorsect"/>
     <!-- * Call template for handling various attribution possibilities -->
     <xsl:call-template name="attribution">
       <xsl:with-param name="person-name" select="$person-name"/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match="collab" mode="authorsect">
+  <xsl:template match="d:collab" mode="authorsect">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
-      <xsl:with-param name="node" select="collabname"/>
+      <xsl:with-param name="node" select="d:collabname"/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <!-- * Display e-mail address(es) and ulink(s) on same line as name -->
-    <xsl:apply-templates select=".//email|address/otheraddr/ulink" mode="authorsect"/>
+    <xsl:apply-templates select=".//d:email|d:address/d:otheraddr/d:ulink" mode="authorsect"/>
     <xsl:text>&#10;</xsl:text>
     <!-- * Display affilition(s) on separate lines -->
-    <xsl:apply-templates select="affiliation" mode="authorsect"/>
+    <xsl:apply-templates select="d:affiliation" mode="authorsect"/>
   </xsl:template>
 
-  <xsl:template match="corpauthor|corpcredit|orgname|publishername" mode="authorsect">
+  <xsl:template match="d:corpauthor|d:corpcredit|d:orgname|d:publishername" mode="authorsect">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
       <xsl:with-param name="node" select="."/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <xsl:text>&#10;</xsl:text>
-    <xsl:if test="self::publishername">
+    <xsl:if test="self::d:publishername">
       <!-- * Display localized "Publisher" gentext -->
       <xsl:call-template name="publisher.attribution"/>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match="publisher" mode="authorsect">
+  <xsl:template match="d:publisher" mode="authorsect">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
-      <xsl:with-param name="node" select="publishername"/>
+      <xsl:with-param name="node" select="d:publishername"/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <!-- * Display e-mail address(es) and ulink(s) on same line as name -->
-    <xsl:apply-templates select=".//email|address/otheraddr/ulink" mode="authorsect"/>
+    <xsl:apply-templates select=".//d:email|d:address/d:otheraddr/d:ulink" mode="authorsect"/>
     <!-- * Display addresses on separate lines -->
-    <xsl:apply-templates select="address" mode="authorsect"/>
+    <xsl:apply-templates select="d:address" mode="authorsect"/>
     <!-- * Display localized "Publisher" literal -->
     <xsl:call-template name="publisher.attribution"/>
   </xsl:template>
     <xsl:text>.RE&#10;</xsl:text> 
   </xsl:template>
 
-  <xsl:template match="email|address/otheraddr/ulink" mode="authorsect">
+  <xsl:template match="d:email|d:address/d:otheraddr/d:ulink" mode="authorsect">
     <xsl:choose>
-      <xsl:when test="preceding-sibling::*[descendant-or-self::email]
-                      or preceding-sibling::address/otheraddr/ulink
-                      or ancestor::address[preceding-sibling::*[descendant-or-self::email]]
-                      or ancestor::address[preceding-sibling::address/otheraddr/ulink]">
+      <xsl:when test="preceding-sibling::*[descendant-or-self::d:email]
+                      or preceding-sibling::d:address/d:otheraddr/d:ulink
+                      or ancestor::d:address[preceding-sibling::*[descendant-or-self::d:email]]
+                      or ancestor::d:address[preceding-sibling::d:address/d:otheraddr/d:ulink]">
         <!-- * This is not the first instance, so do nothing. -->
       </xsl:when>
       <xsl:otherwise>
     <!-- * outputting a hyphen character where the break occurs -->
     <xsl:text>&lt;\&amp;</xsl:text>
     <xsl:choose>
-      <xsl:when test="self::email">
+      <xsl:when test="self::d:email">
         <xsl:variable name="contents">
           <xsl:apply-templates/>
         </xsl:variable>
         <xsl:value-of select="normalize-space($contents)"/>
       </xsl:when>
-      <xsl:when test="self::ulink">
+      <xsl:when test="self::d:ulink">
         <xsl:variable name="contents">
           <xsl:apply-templates select="."/>
         </xsl:variable>
     </xsl:choose>
     <xsl:text>\&amp;&gt;</xsl:text>
     <xsl:choose>
-      <xsl:when test="not(following-sibling::*[descendant-or-self::email]
-                      or following-sibling::address/otheraddr/ulink
-                      or ancestor::address[following-sibling::*[descendant-or-self::email]]
-                      or ancestor::address[following-sibling::address/otheraddr/ulink])">
+      <xsl:when test="not(following-sibling::*[descendant-or-self::d:email]
+                      or following-sibling::d:address/d:otheraddr/d:ulink
+                      or ancestor::d:address[following-sibling::*[descendant-or-self::d:email]]
+                      or ancestor::d:address[following-sibling::d:address/d:otheraddr/d:ulink])">
         <!-- * This is the final instance, so do nothing. -->
       </xsl:when>
       <xsl:otherwise>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="affiliation" mode="authorsect">
+  <xsl:template match="d:affiliation" mode="authorsect">
     <!-- * Get the string value of the contents of this Affiliation. If the -->
     <!-- * affiliation only contains an Address child whose only content is -->
     <!-- * an email address or ulink, then these contents will end up empty. -->
     <!-- * or ulink, then output nothing. -->
     <xsl:if test="$contents != ''">
       <xsl:text>.br&#10;</xsl:text>
-      <xsl:for-each select="shortaffil|jobtitle|orgname|orgdiv|address">
+      <xsl:for-each select="d:shortaffil|d:jobtitle|d:orgname|d:orgdiv|d:address">
         <!-- * only display output of nodes other than email or ulink -->
-        <xsl:apply-templates select="node()[not(self::email) and not(self::otheraddr/ulink)]"/>
+        <xsl:apply-templates select="node()[not(self::d:email) and not(self::d:otheraddr/d:ulink)]"/>
         <xsl:choose>
           <xsl:when test="position() = last()"/> <!-- do nothing -->
           <xsl:otherwise>
             <!-- * only add comma if the node has a child node other than -->
             <!-- * an email address or ulink -->
-            <xsl:if test="child::node()[not(self::email) and not(self::otheraddr/ulink)]">
+            <xsl:if test="child::node()[not(self::d:email) and not(self::d:otheraddr/d:ulink)]">
               <xsl:text>, </xsl:text>
             </xsl:if>
           </xsl:otherwise>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match="address" mode="authorsect">
+  <xsl:template match="d:address" mode="authorsect">
     <xsl:variable name="contents"
-                  select="normalize-space(node()[not(self::email)
-                          and not(self::otheraddr/ulink)])"/>
+                  select="normalize-space(node()[not(self::d:email)
+                          and not(self::d:otheraddr/d:ulink)])"/>
     <!-- * If this contents of this Address do not contain anything except -->
     <!-- * an email address or ulink, then output nothing. -->
     <xsl:if test="$contents != ''">
       <xsl:text>&#10;</xsl:text>
       <xsl:text>.br&#10;</xsl:text>
       <!--* Skip email and ulink descendants of Address (rendered elsewhere) -->
-      <xsl:apply-templates select="node()[not(self::email) and not(self::otheraddr/ulink)]"/>
+      <xsl:apply-templates select="node()[not(self::d:email) and not(self::d:otheraddr/d:ulink)]"/>
     </xsl:if>
   </xsl:template>
 
   <xsl:template name="attribution">
     <xsl:param name="person-name"/>
-    <xsl:param name="refname" select="ancestor::refentry/refnamediv[1]/refname[1]"/>
+    <xsl:param name="refname" select="ancestor::d:refentry/d:refnamediv[1]/d:refname[1]"/>
     <!-- * Determine appropriate attribution for a particular person's role. -->
     <xsl:choose>
       <!-- * if we have a *blurb or contrib, just use that -->
-      <xsl:when test="contrib|personblurb|authorblurb">
-        <xsl:apply-templates select="contrib|personblurb|authorblurb" mode="authorsect"/>
+      <xsl:when test="d:contrib|d:personblurb|d:authorblurb">
+        <xsl:apply-templates select="d:contrib|d:personblurb|d:authorblurb" mode="authorsect"/>
         <xsl:text>&#10;</xsl:text>
       </xsl:when>
       <xsl:otherwise>
         <xsl:choose>
           <!-- * If we have no *blurb or contrib, but this is an Author or -->
           <!-- * Editor, then render the corresponding localized gentext -->
-          <xsl:when test="self::author">
+          <xsl:when test="self::d:author">
             <xsl:text>&#10;</xsl:text>
             <xsl:text>.RS</xsl:text> 
             <xsl:if test="not($blurb-indent = '')">
             <xsl:text>.&#10;</xsl:text>
             <xsl:text>.RE&#10;</xsl:text> 
           </xsl:when>
-          <xsl:when test="self::editor">
+          <xsl:when test="self::d:editor">
             <xsl:text>&#10;</xsl:text>
             <xsl:text>.RS</xsl:text> 
             <xsl:if test="not($blurb-indent = '')">
           </xsl:when>
           <!-- * If we have no *blurb or contrib, but this is an Othercredit, -->
           <!-- * check value of Class attribute and use corresponding gentext. -->
-          <xsl:when test="self::othercredit">
+          <xsl:when test="self::d:othercredit">
             <xsl:choose>
               <xsl:when test="@class and @class != 'other'">
                 <xsl:text>&#10;</xsl:text>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="personblurb|authorblurb" mode="authorsect">
+  <xsl:template match="d:personblurb|d:authorblurb" mode="authorsect">
     <xsl:call-template name="mark.up.blurb.or.contrib"/>
     <!-- * yeah, it's possible for a *blurb to have a "title" -->
-    <xsl:apply-templates select="title"/>
-    <xsl:apply-templates select="*[not(self::title)]"/>
+    <xsl:apply-templates select="d:title"/>
+    <xsl:apply-templates select="*[not(self::d:title)]"/>
     <!-- * If this *blurb has a sibling "name" element of some kind, then -->
     <!-- * the mark.up.blurb.or.contrib template will generated an "RS" -->
     <!-- * call that will cause it to be indented; so we need to call -->
     <!-- * "RE" to restore the previous indent level -->
-    <xsl:if test="../personname|../surname|../firstname
-      |../othername|../lineage|../honorific
-      |../affiliation|../email|../address">
+    <xsl:if test="../d:personname|../d:surname|../d:firstname
+      |../d:othername|../d:lineage|../d:honorific
+      |../d:affiliation|../d:email|../d:address">
       <xsl:text>.RE&#10;</xsl:text> 
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match="personblurb/title|authorblurb/title">
+  <xsl:template match="d:personblurb/d:title|d:authorblurb/d:title">
     <!-- * always render period after title -->
     <xsl:variable name="contents">
       <xsl:apply-templates/>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match="contrib" mode="authorsect">
+  <xsl:template match="d:contrib" mode="authorsect">
     <xsl:call-template name="mark.up.blurb.or.contrib"/>
     <xsl:variable name="contents">
       <xsl:apply-templates/>
     </xsl:variable>
     <xsl:value-of select="normalize-space($contents)"/>
     <xsl:text>&#10;</xsl:text>
-    <xsl:if test="../personname|../surname|../firstname
-      |../othername|../lineage|../honorific
-      |../affiliation|../email|../address">
+    <xsl:if test="../d:personname|../d:surname|../d:firstname
+      |../d:othername|../d:lineage|../d:honorific
+      |../d:affiliation|../d:email|../d:address">
       <xsl:text>.RE&#10;</xsl:text> 
     </xsl:if>
   </xsl:template>
       <!-- * we are already outputting the name content, and we need to -->
       <!-- * indent the *blurb content after that. -->
       <xsl:when
-          test="../personname|../surname|../firstname
-                |../othername|../lineage|../honorific
-                |../affiliation|../email|../address">
+          test="../d:personname|../d:surname|../d:firstname
+                |../d:othername|../d:lineage|../d:honorific
+                |../d:affiliation|../d:email|../d:address">
         <xsl:text>&#10;</xsl:text>
         <xsl:text>.RS</xsl:text> 
         <xsl:if test="not($blurb-indent = '')">
   <xsl:template name="copyright.section">
     <xsl:param name="info"/>
     <xsl:choose>
-      <xsl:when test="$info//copyright|$info//legalnotice">
+      <xsl:when test="$info//d:copyright|$info//d:legalnotice">
         <xsl:call-template name="make.subheading">
           <xsl:with-param name="title">
             <xsl:call-template name="gentext">
         <!-- * the copyright mode="titlepage.mode" template is -->
         <!-- * imported from the HTML stylesheets -->
         <xsl:for-each select="
-          (($info[//copyright])[last()]//copyright)
-          | (($info[//legalnotice])[last()]//legalnotice)">
+          (($info[//d:copyright])[last()]//d:copyright)
+          | (($info[//d:legalnotice])[last()]//d:legalnotice)">
           <xsl:choose>
             <xsl:when test="local-name(.) = 'copyright'">
               <xsl:variable name="contents">
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="legalnotice">
+  <xsl:template match="d:legalnotice">
     <xsl:apply-templates/>
   </xsl:template>
 
   <!-- * suppress refmeta and all *info (we grab what we need from them -->
   <!-- * elsewhere) -->
 
-  <xsl:template match="refmeta"/>
+  <xsl:template match="d:refmeta"/>
 
-  <xsl:template match="info|refentryinfo|referenceinfo|refsynopsisdivinfo
-                       |refsectioninfo|refsect1info|refsect2info|refsect3info
-                       |setinfo|bookinfo|articleinfo|chapterinfo|sectioninfo
-                       |sect1info|sect2info|sect3info|sect4info|sect5info
-                       |partinfo|prefaceinfo|appendixinfo|docinfo"/>
+  <xsl:template match="d:info|d:refentryinfo|d:referenceinfo|d:refsynopsisdivinfo
+                       |d:refsectioninfo|d:refsect1info|d:refsect2info|d:refsect3info
+                       |d:setinfo|d:bookinfo|d:articleinfo|d:chapterinfo|d:sectioninfo
+                       |d:sect1info|d:sect2info|d:sect3info|d:sect4info|d:sect5info
+                       |d:partinfo|d:prefaceinfo|d:appendixinfo|d:docinfo"/>
 
   <!-- ============================================================== -->
   
index bf059d763c1062c38687e68af3a13118f90550ed..85c0dec8feceeb37aa503169dadfebdcc7273fb8 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -13,7 +15,7 @@
 
 <!-- ==================================================================== -->
 
-<xsl:template match="replaceable|varname|structfield">
+<xsl:template match="d:replaceable|d:varname|d:structfield">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
@@ -23,7 +25,7 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="option|userinput|envar|errorcode|constant|markup">
+<xsl:template match="d:option|d:userinput|d:envar|d:errorcode|d:constant|d:markup">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="classname">
+<xsl:template match="d:classname">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="command">
+<xsl:template match="d:command">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
@@ -50,8 +52,8 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="type[not(ancestor::cmdsynopsis) and
-                     not(ancestor::funcsynopsis)]">
+<xsl:template match="d:type[not(ancestor::d:cmdsynopsis) and
+                     not(ancestor::d:funcsynopsis)]">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
@@ -61,8 +63,8 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="function[not(ancestor::cmdsynopsis) and
-                     not(ancestor::funcsynopsis)]">
+<xsl:template match="d:function[not(ancestor::d:cmdsynopsis) and
+                     not(ancestor::d:funcsynopsis)]">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
@@ -72,8 +74,8 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="parameter[not(ancestor::cmdsynopsis) and
-                     not(ancestor::funcsynopsis)]">
+<xsl:template match="d:parameter[not(ancestor::d:cmdsynopsis) and
+                     not(ancestor::d:funcsynopsis)]">
   <xsl:if test="$man.hyphenate.computer.inlines = 0">
     <xsl:call-template name="suppress.hyphenation"/>
   </xsl:if>
@@ -83,7 +85,7 @@
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="filename">
+<xsl:template match="d:filename">
   <!-- * add hyphenation suppression in Filename output only if -->
   <!-- * break.after.slash is also non-zero -->
   <xsl:if test="$man.hyphenate.filenames = 0 and
   <xsl:call-template name="inline.monoseq"/>
 </xsl:template>
 
-<xsl:template match="emphasis">
+<xsl:template match="d:emphasis">
   <xsl:choose>
     <xsl:when test="
       @role = 'bold' or
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="optional">
+<xsl:template match="d:optional">
   <xsl:value-of select="$arg.choice.opt.open.str"/>
   <xsl:apply-templates/>
   <xsl:value-of select="$arg.choice.opt.close.str"/>
   <xsl:text>)</xsl:text>
 </xsl:template>
 
-<xsl:template match="citerefentry">
+<xsl:template match="d:citerefentry">
   <xsl:call-template name="do-citerefentry">
-    <xsl:with-param name="refentrytitle" select="refentrytitle"/>
-    <xsl:with-param name="manvolnum" select="manvolnum"/>
+    <xsl:with-param name="refentrytitle" select="d:refentrytitle"/>
+    <xsl:with-param name="manvolnum" select="d:manvolnum"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="trademark|productname">
+<xsl:template match="d:trademark|d:productname">
   <xsl:apply-templates/>
   <xsl:choose>
     <!-- * Just use true Unicode chars for copyright, trademark, etc., -->
     </xsl:when>
     <!-- * for Trademark element, render a trademark symbol by default -->
     <!-- * even if no "class" value is specified -->
-    <xsl:when test="self::trademark" >
+    <xsl:when test="self::d:trademark" >
       <xsl:text>&#x2122;</xsl:text>
     </xsl:when>
     <xsl:otherwise>
 
 <!-- * span seems to sneak through into output sometimes, possibly due -->
 <!-- * to failed Olink processing; so we need to catch it -->
-<xsl:template match="span">
+<xsl:template match="d:span">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="inlinemediaobject">
+<xsl:template match="d:inlinemediaobject">
   <xsl:apply-templates/>
 </xsl:template>
 
 <!-- * indexterm instances are omitted from output since there 
 is no nroff markup to handle them. -->
-<xsl:template match="indexterm"/>
+<xsl:template match="d:indexterm"/>
 
-<xsl:template match="primary">
+<xsl:template match="d:primary">
   <xsl:value-of select="normalize-space(.)"/>
 </xsl:template>
 
-<xsl:template match="secondary|tertiary">
+<xsl:template match="d:secondary|d:tertiary">
   <xsl:text>: </xsl:text>
   <xsl:value-of select="normalize-space(.)"/>
 </xsl:template>
 
 <!-- * remark instances are omitted from output since they
 can mess up whitespace management. -->
-<xsl:template match="remark"/>
+<xsl:template match="d:remark"/>
 
 </xsl:stylesheet>
index a259356b167958a1f22201740f8f5043d23067a7..a28b4dc2105d2bf9071e3e457b1944d734f46238 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
 
 <!-- ================================================================== -->
 
-<xsl:template match="para[ancestor::listitem or ancestor::step or ancestor::glossdef]|
-  simpara[ancestor::listitem or ancestor::step or ancestor::glossdef]|
-  remark[ancestor::listitem or ancestor::step or ancestor::glossdef]"
+<xsl:template match="d:para[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]|
+  d:simpara[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]|
+  d:remark[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]"
   priority="1">
   <xsl:call-template name="mixed-block"/>
   <xsl:text>&#10;</xsl:text>
   <xsl:if test="following-sibling::*[1][
-    self::para or
-    self::simpara or
-    self::remark
+    self::d:para or
+    self::d:simpara or
+    self::d:remark
     ]">
     <!-- * Make sure multiple paragraphs within a list item don't -->
     <!-- * merge together.                                        -->
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="bibliolist">
+<xsl:template match="d:bibliolist">
   <xsl:apply-templates/>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="variablelist|glosslist">
+<xsl:template match="d:variablelist|d:glosslist">
   <xsl:text>&#10;</xsl:text>
-  <xsl:if test="title">
+  <xsl:if test="d:title">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
-      <xsl:with-param name="node" select="title"/>
+      <xsl:with-param name="node" select="d:title"/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <xsl:text>&#10;</xsl:text>
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="varlistentry|glossentry">
+<xsl:template match="d:varlistentry|d:glossentry">
   <xsl:text>.PP&#10;</xsl:text> 
-  <xsl:for-each select="term|glossterm">
+  <xsl:for-each select="d:term|d:glossterm">
     <xsl:variable name="content">
       <xsl:apply-templates/>
     </xsl:variable>
     <xsl:choose>
       <!-- don't normalize verbatim synopsis -->
-      <xsl:when test="child::synopsis">
+      <xsl:when test="child::d:synopsis">
         <xsl:value-of select="$content"/>
       </xsl:when>
       <xsl:otherwise>
   <xsl:text>.RE&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="varlistentry/term"/>
-<xsl:template match="glossentry/glossterm"/>
+<xsl:template match="d:varlistentry/d:term"/>
+<xsl:template match="d:glossentry/d:glossterm"/>
 
-<xsl:template match="variablelist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
-  glosslist[ancestor::listitem or ancestor::step or ancestor::glossdef]">
+<xsl:template match="d:variablelist[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]|
+  d:glosslist[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]">
   <xsl:apply-templates/>
   <xsl:if test="following-sibling::node() or
-    parent::para[following-sibling::node()] or
-    parent::simpara[following-sibling::node()] or
-    parent::remark[following-sibling::node()]">
+    parent::d:para[following-sibling::node()] or
+    parent::d:simpara[following-sibling::node()] or
+    parent::d:remark[following-sibling::node()]">
     <xsl:text>.sp</xsl:text> 
     <xsl:text>&#10;</xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="varlistentry/listitem|glossentry/glossdef">
+<xsl:template match="d:varlistentry/d:listitem|d:glossentry/d:glossdef">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="itemizedlist/listitem">
+<xsl:template match="d:itemizedlist/d:listitem">
   <!-- * We output a real bullet here (rather than, "\(bu", -->
   <!-- * the roff bullet) because, when we do character-map -->
   <!-- * processing before final output, the character-map will -->
   <xsl:text>.RE&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem/title|
-                     procedure/step/title">
+<xsl:template match="d:orderedlist/d:listitem/d:title|
+                     d:procedure/d:step/d:title">
   <xsl:call-template name="bold">
     <xsl:with-param name="node" select="."/>
     <xsl:with-param name="context" select=".."/>
   <xsl:text>.PP&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="orderedlist/listitem|procedure/step">
+<xsl:template match="d:orderedlist/d:listitem|d:procedure/d:step">
   <xsl:text>&#10;</xsl:text>
   <xsl:text>.sp</xsl:text>
   <xsl:text>&#10;</xsl:text>
     </xsl:otherwise>
   </xsl:choose>
   <xsl:text>'</xsl:text>
-  <xsl:if test="count(preceding-sibling::listitem) &lt; 9">
+  <xsl:if test="count(preceding-sibling::d:listitem) &lt; 9">
     <xsl:text> </xsl:text>
   </xsl:if>
   <xsl:number format="1."/>
   <!-- * line up to compensate for that -->
   <xsl:text>.sp -1&#10;</xsl:text>
   <xsl:text>.IP "</xsl:text>
-  <xsl:if test="count(preceding-sibling::listitem) &lt; 9">
+  <xsl:if test="count(preceding-sibling::d:listitem) &lt; 9">
     <xsl:text>  </xsl:text>
   </xsl:if>
   <xsl:number format="1."/>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="itemizedlist|orderedlist|procedure">
-  <xsl:if test="title">
+<xsl:template match="d:itemizedlist|d:orderedlist|d:procedure">
+  <xsl:if test="d:title">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
-      <xsl:with-param name="node" select="title"/>
+      <xsl:with-param name="node" select="d:title"/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <xsl:text>&#10;</xsl:text>
   <!-- * lists before the actual list items, so we need to get that -->
   <!-- * content (if any) before getting the list items -->
   <xsl:apply-templates
-    select="*[not(self::listitem) and not(self::title)]"/>
-  <xsl:apply-templates select="listitem"/>
+    select="*[not(self::d:listitem) and not(self::d:title)]"/>
+  <xsl:apply-templates select="d:listitem"/>
   <!-- * If this list is a child of para and has content following -->
   <!-- * it, within the same para, then add a blank line and move -->
   <!-- * the left margin back to where it was -->
-  <xsl:if test="parent::para and following-sibling::node()">
+  <xsl:if test="parent::d:para and following-sibling::node()">
     <xsl:text>.sp</xsl:text>
     <xsl:text>&#10;</xsl:text>
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="itemizedlist[ancestor::listitem or ancestor::step  or ancestor::glossdef]|
-  orderedlist[ancestor::listitem or ancestor::step or ancestor::glossdef]|
-  procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]">
-  <xsl:if test="title">
+<xsl:template match="d:itemizedlist[ancestor::d:listitem or ancestor::d:step  or ancestor::d:glossdef]|
+  d:orderedlist[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]|
+  d:procedure[ancestor::d:listitem or ancestor::d:step or ancestor::d:glossdef]">
+  <xsl:if test="d:title">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
-      <xsl:with-param name="node" select="title"/>
+      <xsl:with-param name="node" select="d:title"/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <xsl:text>&#10;</xsl:text>
   </xsl:if>
   <xsl:apply-templates/>
   <xsl:if test="following-sibling::node() or
-    parent::para[following-sibling::node()] or
-    parent::simpara[following-sibling::node()] or
-    parent::remark[following-sibling::node()]">
+    parent::d:para[following-sibling::node()] or
+    parent::d:simpara[following-sibling::node()] or
+    parent::d:remark[following-sibling::node()]">
     <xsl:text>.sp</xsl:text> 
     <xsl:text>&#10;</xsl:text>
   </xsl:if>
 <!-- ================================================================== -->
   
 <!-- * for simplelist type="inline", render it as a comma-separated list -->
-<xsl:template match="simplelist[@type='inline']">
+<xsl:template match="d:simplelist[@type='inline']">
   <!-- * if dbchoice PI exists, use that to determine the choice separator -->
   <!-- * (that is, equivalent of "and" or "or" in current locale), or literal -->
   <!-- * value of "choice" otherwise -->
     </xsl:choose>
   </xsl:variable>
 
-  <xsl:for-each select="member">
+  <xsl:for-each select="d:member">
     <xsl:apply-templates/>
     <xsl:choose>
       <xsl:when test="position() = last()"/> <!-- do nothing -->
 
 <!-- * if simplelist type is not inline, render it as a one-column vertical -->
 <!-- * list (ignoring the values of the type and columns attributes) -->
-<xsl:template match="simplelist">
-  <xsl:for-each select="member">
+<xsl:template match="d:simplelist">
+  <xsl:for-each select="d:member">
     <xsl:text>.RS</xsl:text> 
     <xsl:if test="not($list-indent = '')">
       <xsl:text> </xsl:text>
 
 <!-- * We output Segmentedlist as a table, using tbl(1) markup. There -->
 <!-- * is no option for outputting it in manpages in "list" form. -->
-<xsl:template match="segmentedlist">
-  <xsl:if test="title">
+<xsl:template match="d:segmentedlist">
+  <xsl:if test="d:title">
     <xsl:text>.PP&#10;</xsl:text>
     <xsl:call-template name="bold">
-      <xsl:with-param name="node" select="title"/>
+      <xsl:with-param name="node" select="d:title"/>
       <xsl:with-param name="context" select="."/>
     </xsl:call-template>
     <xsl:text>&#10;</xsl:text>
   <xsl:text>.TS&#10;</xsl:text>
   <!-- * first output the table "format" spec, which tells tbl(1) how -->
   <!-- * how to format each row and column. -->
-  <xsl:for-each select=".//segtitle">
+  <xsl:for-each select=".//d:segtitle">
     <!-- * l = "left", which hard-codes left-alignment for tabular -->
     <!-- * output of all segmentedlist content -->
     <xsl:text>l</xsl:text>
     </xsl:when>
     <xsl:otherwise>
       <!-- * "0" = "do not suppress", so output the segtitle(s) -->
-      <xsl:apply-templates select=".//segtitle" mode="table-title"/>
+      <xsl:apply-templates select=".//d:segtitle" mode="table-title"/>
       <xsl:text>&#10;</xsl:text>
     </xsl:otherwise>
   </xsl:choose>
   <xsl:text>.sp&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="segmentedlist/segtitle" mode="table-title">
+<xsl:template match="d:segmentedlist/d:segtitle" mode="table-title">
   <xsl:call-template name="italic">
     <xsl:with-param name="node" select="."/>
     <xsl:with-param name="context" select="."/>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="segmentedlist/seglistitem">
+<xsl:template match="d:segmentedlist/d:seglistitem">
   <xsl:apply-templates/>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="segmentedlist/seglistitem/seg">
+<xsl:template match="d:segmentedlist/d:seglistitem/d:seg">
   <!-- * the T{ and T} stuff are delimiters to tell tbl(1) that -->
   <!-- * the delimited contents are "text blocks" that groff(1) -->
   <!-- * needs to process -->
 
 <!-- ==================================================================== -->
 
-<xsl:template match="calloutlist">
-  <xsl:if test="title|info/title">
+<xsl:template match="d:calloutlist">
+  <xsl:if test="d:title|d:info/d:title">
     <xsl:call-template name="formal.object.heading"/>
   </xsl:if>
   <!-- * This template was originally copied over from the HTML -->
   <!-- * better way to do it, but anyway, I’m preserving it here for -->
   <!-- * consistency. -->
   <xsl:apply-templates 
-    select="*[not(self::callout or self::title or self::titleabbrev)]
-    |comment()[not(preceding-sibling::callout)]
-    |processing-instruction()[not(preceding-sibling::callout)]"/>
+    select="*[not(self::d:callout or self::d:title or self::d:titleabbrev)]
+    |comment()[not(preceding-sibling::d:callout)]
+    |processing-instruction()[not(preceding-sibling::d:callout)]"/>
   <!-- * put callout list into a table -->
   <xsl:text>.TS&#10;</xsl:text>
   <xsl:text>tab(:);&#10;</xsl:text>
   <!-- * with the first cell in each row right-aligned, and the second -->
   <!-- * cell left aligned with a width of 75% of the line length -->
   <xsl:text>r lw(\n(.lu*75u/100u).&#10;</xsl:text>
-  <xsl:apply-templates select="callout
-    |comment()[preceding-sibling::callout]
-    |processing-instruction()[preceding-sibling::callout]"/>
+  <xsl:apply-templates select="d:callout
+    |comment()[preceding-sibling::d:callout]
+    |processing-instruction()[preceding-sibling::d:callout]"/>
   <xsl:text>.TE&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="calloutlist/title"/>
+<xsl:template match="d:calloutlist/d:title"/>
 
-<xsl:template match="callout">
+<xsl:template match="d:callout">
   <!-- * first cell of each row is the set of callout numbers for this -->
   <!-- * particular callout -->
   <xsl:call-template name="callout.arearefs">
     </xsl:when>
     <xsl:when test="local-name($target)='area'">
       <xsl:choose>
-        <xsl:when test="$target/parent::areaset">
+        <xsl:when test="$target/parent::d:areaset">
           <xsl:call-template name="callout-bug">
             <xsl:with-param name="conum">
               <xsl:apply-templates
-                select="$target/parent::areaset" mode="conumber"/>
+                select="$target/parent::d:areaset" mode="conumber"/>
             </xsl:with-param>
           </xsl:call-template>
         </xsl:when>
   <xsl:text>.\fR</xsl:text>
 </xsl:template>
 
-<xsl:template match="co" mode="calloutlist-callout-number">
+<xsl:template match="d:co" mode="calloutlist-callout-number">
   <xsl:call-template name="calloutlist-callout-number">
     <xsl:with-param name="conum">
-      <xsl:number count="co"
+      <xsl:number count="d:co"
         level="any"
-        from="programlisting|screen|literallayout|synopsis"
+        from="d:programlisting|d:screen|d:literallayout|d:synopsis"
         format="1"/>
     </xsl:with-param>
   </xsl:call-template>
index 5c2fb0d620c24362d409453822f43472abcd8f31..435b578d65c97281570102c378e557eaa2a10289 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:ng="http://docbook.org/docbook-ng"
                 xmlns:db="http://docbook.org/ns/docbook"
                 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
-                exclude-result-prefixes="exsl"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -44,7 +45,7 @@
     <xsl:if test="$man.charmap.enabled != 0">
       <xsl:variable name="lang">
         <xsl:call-template name="l10n.language">
-          <xsl:with-param name="target" select="//refentry[1]"/>
+          <xsl:with-param name="target" select="//d:refentry[1]"/>
         </xsl:call-template>
       </xsl:variable>
       <xsl:call-template name="read-character-map">
@@ -80,7 +81,7 @@
   <!-- redefine this any way you'd like to output messages -->
   <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
   <!-- Example:
-  <xsl:if test="//foo">
+  <xsl:if test="//d:foo">
     <xsl:call-template name="log.message">
       <xsl:with-param name="level">Warn</xsl:with-param>
       <xsl:with-param name="source" select="$refname"/>
 <!-- *  -->
 <!-- ******************************************************************** -->
 
-<xsl:template match="//refentry//text()">
+<xsl:template match="//d:refentry//text()">
   <xsl:call-template name="escape.roff.specials">
     <xsl:with-param name="content">
       <xsl:value-of select="."/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="//refentry//text()" mode="no.anchor.mode">
+<xsl:template match="//d:refentry//text()" mode="no.anchor.mode">
   <xsl:call-template name="escape.roff.specials">
     <xsl:with-param name="content">
       <xsl:value-of select="."/>
     <xsl:param name="first.refname"/>
     <xsl:param name="section"/>
     <xsl:param name="lang"/>
-    <xsl:for-each select="refnamediv/refname">
+    <xsl:for-each select="d:refnamediv/d:refname">
       <xsl:if test=". != $first.refname">
         <xsl:call-template name="write.text.chunk">
           <xsl:with-param name="filename">
   <!-- *  generated, including any "stub" pages. -->
   <xsl:template name="generate.manifest">
     <xsl:variable name="filelist">
-      <xsl:for-each select="//refentry">
+      <xsl:for-each select="//d:refentry">
         <!-- * all refname instances in a Refentry inherit their section -->
         <!-- * numbers from the parent Refentry; so we only need to get -->
         <!-- * the section once per Refentry, not once per Refname -->
         <xsl:variable name="lang">
           <xsl:call-template name="l10n.language"/>
         </xsl:variable>
-        <xsl:for-each select="refnamediv/refname">
+        <xsl:for-each select="d:refnamediv/d:refname">
           <xsl:call-template name="make.adjusted.man.filename">
             <xsl:with-param name="name" select="."/>
             <xsl:with-param name="section" select="$section"/>
index 3853bdd1916a5b135120970b79418f4b8366fff0..669f22881cfe2cb4b35e3a74d3f91ba5162e9c34 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:xlink="http://www.w3.org/1999/xlink"
-                exclude-result-prefixes="doc"
+                exclude-result-prefixes="doc d"
                 version='1.0'>
 
 <!-- ********************************************************************
index 723bb45ce52f9d4eb28d741e69d8adc85b9c2bb7..dccce4af98181f3f9e801f0ea8eec654d7dcf5d4 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version='1.0'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version='1.0'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version='1.0'>
 
 <!-- ********************************************************************
 
@@ -12,9 +14,9 @@
 
 <!-- ==================================================================== -->
 
-  <xsl:template match="refnamediv">
+  <xsl:template match="d:refnamediv">
     <xsl:choose>
-      <xsl:when test="preceding-sibling::refnamediv">
+      <xsl:when test="preceding-sibling::d:refnamediv">
         <!-- * No title on secondary refnamedivs! -->
         <!-- * Just put a single line break instead -->
         <xsl:text>.br&#10;</xsl:text>
@@ -30,7 +32,7 @@
     <xsl:call-template name="mark.subheading"/>
     <!-- * if we have multiple Refname instances, separate the names -->
     <!-- * with commas -->
-    <xsl:for-each select="refname">
+    <xsl:for-each select="d:refname">
       <xsl:if test="position()>1">
         <xsl:text>, </xsl:text>
       </xsl:if>
     <!-- *   command descriptions for the whatis(1) and apropos(1) -->
     <!-- *   commands. -->
     <!-- * -->
-    <xsl:if test="refpurpose/node()">
+    <xsl:if test="d:refpurpose/node()">
       <xsl:text> \- </xsl:text>
       <xsl:variable name="refpurpose">
-        <xsl:apply-templates select="refpurpose/node()"/>
+        <xsl:apply-templates select="d:refpurpose/node()"/>
       </xsl:variable>
       <xsl:value-of select="normalize-space($refpurpose)"/>
     </xsl:if>
     <xsl:text>&#10;</xsl:text>
   </xsl:template>
 
-  <xsl:template match="refsynopsisdiv">
+  <xsl:template match="d:refsynopsisdiv">
     <xsl:call-template name="make.subheading">
       <xsl:with-param name="title">
         <xsl:apply-templates select="." mode="subheading.markup"/>
@@ -78,7 +80,7 @@
     <xsl:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="refsect1|refentry/refsection">
+  <xsl:template match="d:refsect1|d:refentry/d:refsection">
     <xsl:variable name="title">
       <xsl:apply-templates select="." mode="subheading.markup"/>
     </xsl:variable>
     <xsl:apply-templates/>
   </xsl:template>
 
-  <xsl:template match="refsect2|refentry/refsection/refsection">
+  <xsl:template match="d:refsect2|d:refentry/d:refsection/d:refsection">
     <xsl:call-template name="mark.subheading"/>
     <xsl:variable name="title">
       <xsl:apply-templates
-          select="(info/title
-                  |refsectioninfo/title
-                  |refsect1info/title
-                  |title)[1]/node()"/>
+          select="(d:info/d:title
+                  |d:refsectioninfo/d:title
+                  |d:refsect1info/d:title
+                  |d:title)[1]/node()"/>
     </xsl:variable>
     <xsl:text>.SS "</xsl:text>
     <xsl:value-of select="normalize-space($title)"/>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="refsect3|refentry/refsection/refsection/refsection">
+  <xsl:template match="d:refsect3|d:refentry/d:refsection/d:refsection/d:refsection">
     <xsl:variable name="title">
-      <xsl:value-of select="(info/title
-                            |refsectioninfo/title
-                            |refsect1info/title
-                            |title)[1]"/>
+      <xsl:value-of select="(d:info/d:title
+                            |d:refsectioninfo/d:title
+                            |d:refsect1info/d:title
+                            |d:title)[1]"/>
     </xsl:variable>
     <xsl:choose>
       <!-- * If default-indentation adjustment is on, then indent the -->
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="refsection">
+  <xsl:template match="d:refsection">
     <!-- * This template is used for a nested Refsection that is -->
     <!-- * is a child of a Refsect3-level section (The numberd -->
     <!-- * Refsect hierarchy in DocBook ends with Refsect3, so -->
     <!-- * there is not actually a Refsect4 element.) -->
     <xsl:variable name="title">
-      <xsl:value-of select="(info/title
-                            |refsectioninfo/title
-                            |refsect1info/title
-                            |title)[1]"/>
+      <xsl:value-of select="(d:info/d:title
+                            |d:refsectioninfo/d:title
+                            |d:refsect1info/d:title
+                            |d:title)[1]"/>
     </xsl:variable>
     <xsl:variable name="indent-width">
       <xsl:if test="not($man.indent.refsect = 0)">
 
   <!-- ==================================================================== -->
 
-  <xsl:template match="refsect1|refentry/refsection"
+  <xsl:template match="d:refsect1|d:refentry/d:refsection"
                 mode="subheading.markup">
-    <xsl:variable name="title" select="(info/title
-      |refsectioninfo/title
-      |refsect1info/title
-      |title)[1]"/>
+    <xsl:variable name="title" select="(d:info/d:title
+      |d:refsectioninfo/d:title
+      |d:refsect1info/d:title
+      |d:title)[1]"/>
     <xsl:apply-templates select="$title" mode="title.markup"/>
   </xsl:template>
 
-  <xsl:template match="refsect1|refentry/refsection"
+  <xsl:template match="d:refsect1|d:refentry/d:refsection"
     mode="title.markup">
     <!-- * Note: This template is used just for generating the text for -->
     <!-- * cross-references to Refsect1 or top-level Refsection instances. -->
-    <xsl:variable name="title" select="(info/title
-      |refsectioninfo/title
-      |refsect1info/title
-      |title)[1]"/>
+    <xsl:variable name="title" select="(d:info/d:title
+      |d:refsectioninfo/d:title
+      |d:refsect1info/d:title
+      |d:title)[1]"/>
     <xsl:call-template name="process.SH.xref">
       <xsl:with-param name="title">
         <xsl:apply-templates select="$title" mode="title.markup"/>
 
   <!-- * Output of Titles from Xref with Endterm needs to be handled -->
   <!-- * separately from output for Endterm-less Xref -->
-  <xsl:template match="refsect1/title
-    |refentry/refsection/title
-    |refsynopsisdiv/title"
+  <xsl:template match="d:refsect1/d:title
+    |d:refentry/d:refsection/d:title
+    |d:refsynopsisdiv/d:title"
     mode="endterm">
     <xsl:call-template name="process.SH.xref">
       <xsl:with-param name="title">
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match="refsynopsisdiv" mode="subheading.markup">
+  <xsl:template match="d:refsynopsisdiv" mode="subheading.markup">
     <xsl:param name="allow-anchors" select="0"/>
     <xsl:variable name="title">
       <xsl:call-template name="get.refsynopsisdiv.title">
     <xsl:value-of select="$title"/>
   </xsl:template>
 
-  <xsl:template match="refsynopsisdiv" mode="title.markup">
+  <xsl:template match="d:refsynopsisdiv" mode="title.markup">
     <!-- * Note: This template is used just for generating the text for -->
     <!-- * cross-references to Refsynopsisdiv instances. -->
     <xsl:param name="allow-anchors" select="0"/>
   <xsl:template name="get.refsynopsisdiv.title">
     <xsl:param name="allow-anchors"/>
     <xsl:choose>
-      <xsl:when test="info/title
-        |refsynopsisdivinfo/title
-        |title">
+      <xsl:when test="d:info/d:title
+        |d:refsynopsisdivinfo/d:title
+        |d:title">
         <xsl:apply-templates
-          select="(info/title
-          |refsynopsisdivinfo/title
-          |title)[1]" mode="title.markup">
+          select="(d:info/d:title
+          |d:refsynopsisdivinfo/d:title
+          |d:title)[1]" mode="title.markup">
           <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
         </xsl:apply-templates>
       </xsl:when>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match="refnamediv" mode="subheading.markup">
+  <xsl:template match="d:refnamediv" mode="subheading.markup">
     <xsl:call-template name="gentext">
       <xsl:with-param name="key" select="'RefName'"/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match="refnamediv" mode="title.markup">
+  <xsl:template match="d:refnamediv" mode="title.markup">
     <xsl:call-template name="process.SH.xref">
       <xsl:with-param name="title">
         <xsl:call-template name="gentext">
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match="refnamediv" mode="xref-to">
+  <xsl:template match="d:refnamediv" mode="xref-to">
     <xsl:apply-templates select="." mode="title.markup"/>
   </xsl:template>
 
   <!-- * suppress any title we don't otherwise process elsewhere -->
-  <xsl:template match="title"/>
+  <xsl:template match="d:title"/>
 
   <!-- ==================================================================== -->
 
index 0dac071786006764fbdc9f7998e10392a702d59b..284534abd4f14171c35dfab85e537d33bf46b347 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -18,7 +19,7 @@
 <!-- * find any code here for handling it. It's a "verbatim" -->
 <!-- * environment; see the block.xsl file instead. -->
 
-<xsl:template match="synopfragmentref">
+<xsl:template match="d:synopfragmentref">
   <xsl:variable name="target" select="key('id',@linkend)"/>
   <xsl:variable name="snum">
     <xsl:apply-templates select="$target" mode="synopfragment.number"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="synopfragment" mode="synopfragment.number">
+<xsl:template match="d:synopfragment" mode="synopfragment.number">
   <xsl:number format="1"/>
 </xsl:template>
 
-<xsl:template match="synopfragment">
+<xsl:template match="d:synopfragment">
   <xsl:variable name="snum">
     <xsl:apply-templates select="." mode="synopfragment.number"/>
   </xsl:variable>
@@ -47,7 +48,7 @@
   <!-- * which has another Synopfragment as a following sibling, we use-->
   <!-- * the pinch-together template to close up the line of space -->
   <!-- * that would otherwise be generated by the .HP macro -->
-  <xsl:if test="following-sibling::*[self::synopfragment]">
+  <xsl:if test="following-sibling::*[self::d:synopfragment]">
     <xsl:call-template name="pinch.together"/>
   </xsl:if>
   <xsl:text>.HP </xsl:text>
@@ -64,7 +65,7 @@
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="group|arg" name="group-or-arg">
+<xsl:template match="d:group|d:arg" name="group-or-arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:variable name="sepchar">
@@ -78,7 +79,7 @@
     </xsl:choose>
   </xsl:variable>
   <xsl:if test="position()>1 and
-                not(preceding-sibling::*[1][self::sbr])"
+                not(preceding-sibling::*[1][self::d:sbr])"
           ><xsl:value-of select="$sepchar"/></xsl:if>
   <xsl:choose>
     <xsl:when test="$choice='plain'">
@@ -98,7 +99,7 @@
     <xsl:apply-templates/>
   </xsl:variable>
   <xsl:choose>
-    <xsl:when test="local-name(.) = 'arg' and not(ancestor::arg)">
+    <xsl:when test="local-name(.) = 'arg' and not(ancestor::d:arg)">
       <!-- * Prevent arg contents from getting wrapped and broken up -->
       <xsl:variable name="arg.wrapper">
         <Arg><xsl:value-of select="normalize-space($arg)"/></Arg>
   </xsl:choose>
   <xsl:choose>
     <xsl:when test="$choice='plain'">
-      <xsl:if test='arg'>
+      <xsl:if test='d:arg'>
       <xsl:value-of select="$arg.choice.plain.close.str"/>
       </xsl:if>
     </xsl:when>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="group/arg">
+<xsl:template match="d:group/d:arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
   <xsl:call-template name="group-or-arg"/>
 </xsl:template>
 
-<xsl:template match="sbr">
+<xsl:template match="d:sbr">
   <xsl:text>&#x2592;</xsl:text>
   <xsl:text>.br&#x2592;</xsl:text>
 </xsl:template>
 
-<xsl:template match="cmdsynopsis">
+<xsl:template match="d:cmdsynopsis">
   <!-- * if justification is enabled by default, turn it off temporarily -->
   <xsl:if test="$man.justify != 0">
     <xsl:text>.ad l&#10;</xsl:text>
   <xsl:text>.HP </xsl:text>
   <xsl:text>\w'</xsl:text>
   <xsl:variable name="command">
-    <xsl:apply-templates select="command"/>
+    <xsl:apply-templates select="d:command"/>
   </xsl:variable>
   <xsl:call-template name="string.subst">
     <xsl:with-param name="string" select="normalize-space($command)"/>
 <!-- * Within funcsynopis output, disable hyphenation, and use -->
 <!-- * left-aligned filling for the duration of the synopsis, so that -->
 <!-- * line breaks only occur between separate paramdefs. -->
-<xsl:template match="funcsynopsis">
+<xsl:template match="d:funcsynopsis">
   <!-- * if justification is enabled by default, turn it off temporarily -->
   <xsl:if test="$man.justify != 0">
     <xsl:text>.ad l&#10;</xsl:text>
 <!-- * functions, and we need to follow it by default, like it or no. -->
 <!-- * ***************************************************************** -->
 
-<xsl:template match="funcprototype">
+<xsl:template match="d:funcprototype">
   <xsl:variable name="man-funcprototype-style">
     <xsl:call-template name="pi.dbman_funcsynopsis-style">
-      <xsl:with-param name="node" select="ancestor::funcsynopsis/descendant-or-self::*"/>
+      <xsl:with-param name="node" select="ancestor::d:funcsynopsis/descendant-or-self::*"/>
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="style">
     </xsl:choose>
   </xsl:variable>
   <xsl:variable name="funcprototype.string.value">
-    <xsl:value-of select="funcdef"/>
+    <xsl:value-of select="d:funcdef"/>
   </xsl:variable>
   <xsl:variable name="funcprototype">
-    <xsl:apply-templates select="funcdef"/>
+    <xsl:apply-templates select="d:funcdef"/>
   </xsl:variable>
   <xsl:call-template name="synopsis-block-start"/>
   <xsl:text>.HP </xsl:text>
   <xsl:text>\w'</xsl:text>
   <xsl:variable name="funcdef">
-    <xsl:apply-templates select="funcdef"/>
+    <xsl:apply-templates select="d:funcdef"/>
   </xsl:variable>
   <xsl:call-template name="string.subst">
     <xsl:with-param name="string" select="normalize-space($funcdef)"/>
   </xsl:choose>
   <xsl:text>"</xsl:text>
   <xsl:text>&#10;</xsl:text>
-  <xsl:if test="paramdef and not($style = 'ansi')">
+  <xsl:if test="d:paramdef and not($style = 'ansi')">
     <!-- * if we have any paramdef instances in this funcprototype and -->
     <!-- * the user has chosen K&R style output (by specifying some style -->
     <!-- * value other than the default 'ansi'), then we need to generate -->
       <xsl:value-of select="$list-indent"/>
     </xsl:if>
     <xsl:text>&#10;</xsl:text>
-    <xsl:apply-templates select="paramdef" mode="kr-paramdef-list"/>
+    <xsl:apply-templates select="d:paramdef" mode="kr-paramdef-list"/>
     <xsl:text>.RE&#10;</xsl:text>
   </xsl:if>
   <xsl:call-template name="synopsis-block-end"/>
 </xsl:template>
 
-<xsl:template match="funcdef">
+<xsl:template match="d:funcdef">
   <xsl:apply-templates mode="prevent.line.breaking"/>
 </xsl:template>
 
-<xsl:template match="funcdef/function">
+<xsl:template match="d:funcdef/d:function">
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="void" mode="kr">
+<xsl:template match="d:void" mode="kr">
   <xsl:text>);</xsl:text>
 </xsl:template>
 
-<xsl:template match="varargs" mode="kr">
+<xsl:template match="d:varargs" mode="kr">
   <xsl:text>...);</xsl:text>
 </xsl:template>
 
-<xsl:template match="void" mode="ansi">
+<xsl:template match="d:void" mode="ansi">
   <xsl:text>void);</xsl:text>
 </xsl:template>
 
-<xsl:template match="varargs" mode="ansi">
+<xsl:template match="d:varargs" mode="ansi">
   <xsl:text>...);</xsl:text>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr">
+<xsl:template match="d:paramdef" mode="kr">
   <!-- * in K&R-style output, the prototype just contains the parameter -->
   <!-- * names - because the parameter definitions for each parameter -->
   <!-- * (including the type information) are displayed in a separate -->
   <!-- * prototype, not the separate list), we first just want to grab -->
   <!-- * the parameter for each paramdef -->
   <xsl:variable name="contents">
-    <xsl:apply-templates select="parameter"/>
+    <xsl:apply-templates select="d:parameter"/>
   </xsl:variable>
   <xsl:apply-templates mode="prevent.line.breaking" select="exsl:node-set($contents)"/>
   <xsl:choose>
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="ansi">
+<xsl:template match="d:paramdef" mode="ansi">
   <!-- * in ANSI-style output, the prototype contains the complete -->
   <!-- * parameter definitions for each parameter (there is no separate -->
   <!-- * list of parameter definitions like the one for K&R style -->
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="paramdef" mode="kr-paramdef-list">
+<xsl:template match="d:paramdef" mode="kr-paramdef-list">
   <!-- * this mode is for generating the separate list of parameter -->
   <!-- * definitions in K&R-style output -->
   <xsl:text>.br&#10;</xsl:text>
   <xsl:text>&#10;</xsl:text>
 </xsl:template>
 
-<xsl:template match="paramdef/parameter">
+<xsl:template match="d:paramdef/d:parameter">
   <!-- * We use U+2591 here in place of a normal space, because if we -->
   <!-- * were to just use a normal space, it would get replaced with a -->
   <!-- * non-breaking space when we run the whole Paramdef through the -->
   <xsl:text>"&#x2591;"</xsl:text>
 </xsl:template>
 
-<xsl:template match="funcparams">
+<xsl:template match="d:funcparams">
   <xsl:text>(</xsl:text>
   <xsl:apply-templates/>
   <xsl:text>)</xsl:text>
index af4eeba83ee73fcdf5f2e129d42878aa1c4a63e1..c4d8c3bec767de35d165060c4e4112580e25913a 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="exsl"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+                exclude-result-prefixes="exsl d"
                 version='1.0'>
 
   <!-- ********************************************************************
@@ -36,7 +37,7 @@
   <!-- *   http://cm.bell-labs.com/cm/cs/doc/76/tbl.ps.gz -->
   <!-- *   http://www.snake.net/software/troffcvt/tbl.html -->
 
-  <xsl:template match="table|informaltable" mode="to.tbl">
+  <xsl:template match="d:table|d:informaltable" mode="to.tbl">
     <!--* the "source" param is an optional param; it can be any -->
     <!--* string you want to use that gives some indication of the -->
     <!--* source context for a table; it gets passed down to the named -->
@@ -65,7 +66,7 @@
     <!-- * If align="center", center the table. Otherwise, tbl(1) -->
     <!-- * left-aligns it by default; note that there is no support -->
     <!-- * in tbl(1) for specifying right alignment. -->
-    <xsl:if test="@align = 'center' or tgroup/@align = 'center'">
+    <xsl:if test="@align = 'center' or d:tgroup/@align = 'center'">
       <xsl:text>center </xsl:text>
     </xsl:if>
     </xsl:param>
     <!-- * used to process those. -->
     <xsl:param name="html-table-output">
       <xsl:choose>
-        <xsl:when test=".//tr">
+        <xsl:when test=".//d:tr">
           <!-- * If this table has a TR child, it means that it's an -->
           <!-- * HTML table in the DocBook source, instead of a CALS -->
           <!-- * table. So we just copy it as-is, while wrapping it -->
           <!-- * in an element with same name as its original parent. -->
-          <xsl:for-each select="descendant-or-self::table|descendant-or-self::informaltable">
+          <xsl:for-each select="descendant-or-self::d:table|descendant-or-self::d:informaltable">
             <xsl:element name="{local-name(..)}">
               <table>
                 <xsl:apply-templates mode="strip.namespace" select="*"/>
index de7c36969a46fac653493883257efe993a74eed0..1f1feccdf173128262e907f2e1ae67c9d9cd55a5 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:exsl="http://exslt.org/common"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
                 xmlns:dyn="http://exslt.org/dynamic"
                 xmlns:saxon="http://icl.com/saxon"
-                exclude-result-prefixes="exsl dyn saxon"
+                exclude-result-prefixes="exsl dyn saxon d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -37,7 +38,7 @@
     <xsl:param name="node"/>
     <xsl:param name="context"/>
     <xsl:choose>
-      <xsl:when test="not($context[ancestor::title])">
+      <xsl:when test="not($context[ancestor::d:title])">
         <xsl:for-each select="$node/node()">
           <xsl:text>\fB</xsl:text>
           <xsl:apply-templates select="."/>
     <!-- * actually on, and even then only outside of Cmdsynopsis and -->
     <!-- * Funcsynopsis, where it is already always turned off -->
     <xsl:if test="$man.hyphenate != 0 and
-                  not(ancestor::cmdsynopsis) and
-                  not(ancestor::funcsynopsis)">
+                  not(ancestor::d:cmdsynopsis) and
+                  not(ancestor::d:funcsynopsis)">
       <xsl:text>\%</xsl:text>
     </xsl:if>
   </xsl:template>
     <!-- * character formatting to it -->
     <xsl:variable name="title.wrapper">
       <xsl:choose>
-        <xsl:when test="title">
-          <xsl:value-of select="normalize-space(title[1])"/>
+        <xsl:when test="d:title">
+          <xsl:value-of select="normalize-space(d:title[1])"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
         <!-- * -->
         <!-- * The code here previously also treated informaltable as a -->
         <!-- * verbatim, presumably to support some kludge; I removed it -->
-        <xsl:when test="self::address|self::literallayout|self::programlisting|
-                        self::screen|self::synopsis">
+        <xsl:when test="self::d:address|self::d:literallayout|self::d:programlisting|
+                        self::d:screen|self::d:synopsis">
           <xsl:text>&#10;</xsl:text>
           <xsl:text>.sp&#10;</xsl:text>
           <xsl:call-template name="mark.up.block.start"/>
         <!-- * Check to see if this node is a list; if it is, we don't -->
         <!-- * 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::segmentedlist|
-                        self::caution|self::important|
-                        self::note|self::tip|self::warning|
-                        self::table|self::informaltable)">
+        <xsl:when test="(self::d:itemizedlist|self::d:orderedlist|
+                        self::d:variablelist|self::d:glosslist|
+                        self::d:simplelist[@type !='inline']|
+                        self::d:segmentedlist|
+                        self::d:caution|self::d:important|
+                        self::d:note|self::d:tip|self::d:warning|
+                        self::d:table|self::d:informaltable)">
           <xsl:call-template name="mark.up.block.start"/>
           <xsl:apply-templates select="."/>
         </xsl:when>
                     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::glosslist or
-                    self::itemizedlist or
-                    self::orderedlist or
-                    self::segmentedlist or
-                    self::procedure or
-                    self::address or
-                    self::literallayout or
-                    self::programlisting or
-                    self::synopsis or
-                    self::screen or
-                    self::table or
-                    self::informaltable
+                    self::d:caution or
+                    self::d:important or
+                    self::d:note or
+                    self::d:tip or
+                    self::d:warning or
+                    self::d:variablelist or
+                    self::d:glosslist or
+                    self::d:itemizedlist or
+                    self::d:orderedlist or
+                    self::d:segmentedlist or
+                    self::d:procedure or
+                    self::d:address or
+                    self::d:literallayout or
+                    self::d:programlisting or
+                    self::d:synopsis or
+                    self::d:screen or
+                    self::d:table or
+                    self::d:informaltable
                     ]
                     )
                     ">
 
   <xsl:template name="mark.up.block.start">
     <xsl:choose>
-      <xsl:when test="(ancestor::footnote
-                      or ancestor::annotation)">
-        <xsl:if test="not(preceding-sibling::address|
-                      preceding-sibling::literallayout|
-                      preceding-sibling::programlisting|
-                      preceding-sibling::screen|
-                      preceding-sibling::synopsis|
-                      preceding-sibling::itemizedlist|
-                      preceding-sibling::orderedlist|
-                      preceding-sibling::variablelist|
-                      preceding-sibling::glosslist|
-                      preceding-sibling::simplelist[@type !='inline']|
-                      preceding-sibling::segmentedlist|
-                      preceding-sibling::caution|
-                      preceding-sibling::important|
-                      preceding-sibling::note|
-                      preceding-sibling::tip|
-                      preceding-sibling::warning|
-                      preceding-sibling::table|
-                      preceding-sibling::informaltable
+      <xsl:when test="(ancestor::d:footnote
+                      or ancestor::d:annotation)">
+        <xsl:if test="not(preceding-sibling::d:address|
+                      preceding-sibling::d:literallayout|
+                      preceding-sibling::d:programlisting|
+                      preceding-sibling::d:screen|
+                      preceding-sibling::d:synopsis|
+                      preceding-sibling::d:itemizedlist|
+                      preceding-sibling::d:orderedlist|
+                      preceding-sibling::d:variablelist|
+                      preceding-sibling::d:glosslist|
+                      preceding-sibling::d:simplelist[@type !='inline']|
+                      preceding-sibling::d:segmentedlist|
+                      preceding-sibling::d:caution|
+                      preceding-sibling::d:important|
+                      preceding-sibling::d:note|
+                      preceding-sibling::d:tip|
+                      preceding-sibling::d:warning|
+                      preceding-sibling::d:table|
+                      preceding-sibling::d:informaltable
                       )">
           <xsl:text>.RS</xsl:text>
           <xsl:if test="not($list-indent = '')">
   <!-- * content; so we need to generate a .RE to set the margin back to -->
   <!-- * where it was prior to the .RS call. -->
   <xsl:template name="mark.up.block.end">
-    <xsl:if test="(ancestor::footnote
-                  or ancestor::annotation)">
-      <xsl:if test="address|
-                    literallayout|
-                    programlisting|
-                    screen|
-                    synopsis|
-                    itemizedlist|
-                    orderedlist|
-                    variablelist|
-                    glosslist|
-                    simplelist[@type !='inline']|
-                    segmentedlist|
-                    caution|
-                    important|
-                    note|
-                    tip|
-                    warning|
-                    table|
-                    informaltable">
+    <xsl:if test="(ancestor::d:footnote
+                  or ancestor::d:annotation)">
+      <xsl:if test="d:address|
+                    d:literallayout|
+                    d:programlisting|
+                    d:screen|
+                    d:synopsis|
+                    d:itemizedlist|
+                    d:orderedlist|
+                    d:variablelist|
+                    d:glosslist|
+                    d:simplelist[@type !='inline']|
+                    d:segmentedlist|
+                    d:caution|
+                    d:important|
+                    d:note|
+                    d:tip|
+                    d:warning|
+                    d:table|
+                    d:informaltable">
         <xsl:text>&#10;</xsl:text>
         <xsl:text>.RE</xsl:text>
       <xsl:text>&#10;</xsl:text>
index 5999f72592740cdb567153db5b96e96069f28fdf..9b96e244cfa8e71c960b22abc25ffcb8fec22cd0 100644 (file)
@@ -1,6 +1,7 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:saxon="http://icl.com/saxon"
-                exclude-result-prefixes="saxon"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:saxon="http://icl.com/saxon"
+                exclude-result-prefixes="saxon d"
                 version="1.0">
 
 <!-- Should be base URI for imagedata and so on fixed? -->
index 1c4b6c164407f35fe444c577cf10ffa361b08a5d..3865c4c3b0044e70d5669daf417645839dc51a02 100644 (file)
@@ -1,11 +1,13 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <!-- Include common profiling stylesheet -->
 <xsl:import href="profile-mode.xsl"/>
 
 <!-- This file must be included, because profile-mode is using templates from it -->
-<xsl:import href="../common/stripns.xsl"/>
+<xsl:import href="../common/addns.xsl"/>
 
 <!-- In the two pass processing there is no need for base URI fixup -->
 <xsl:param name="profile.baseuri.fixup" select="false()"/>
index d6f55fb5039b921161d70ff51e81b84198eef1a0..6852b640ca3342425b0eb0284090286919d5255c 100644 (file)
@@ -1,6 +1,8 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               version="1.0">
 
 <xsl:output method="xml"/>
 
index 1989e1fffb984656abcb3b60444cae34f53de0ea..060202dd843cc50bd737f7e49bea6dfd1e99006e 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
-                exclude-result-prefixes="fo"
+                exclude-result-prefixes="fo d"
                 version="1.0">
 
 <xsl:include href="../lib/lib.xsl"/>
@@ -63,9 +64,9 @@
     <xslo:choose>
 
       <xslo:when test="$exsl.node.set.available != 0 and 
-                    namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
-        <xslo:variable name="no.namespace">
-          <xslo:apply-templates select="/*" mode="stripNS"/>
+                    namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
+        <xslo:variable name="with.namespace">
+          <xslo:apply-templates select="/*" mode="addNS"/>
         </xslo:variable>
         <xslo:call-template name="log.message">
           <xslo:with-param name="level">Note</xslo:with-param>
             <xslo:call-template name="get.doc.title"/>
           </xslo:with-param>
           <xslo:with-param name="context-desc">
-            <xslo:text>namesp. cut</xslo:text>
+            <xslo:text>namesp. add</xslo:text>
           </xslo:with-param>
           <xslo:with-param name="message">
-            <xslo:text>stripped namespace before processing</xslo:text>
+            <xslo:text>added namespace before processing</xslo:text>
           </xslo:with-param>
         </xslo:call-template>
-        <xslo:apply-templates select="exslt:node-set($no.namespace)" mode="profile"/>
+        <xslo:apply-templates select="exslt:node-set($with.namespace)" mode="profile"/>
       </xslo:when>
       <xslo:otherwise>
         <xslo:apply-templates select="/" mode="profile"/>
index 8ddf577bdf3aaa8ea34a7c93e5abdbe751e8e445..13a194582b11b08cebb5768626c8acf60e831663 100644 (file)
 <!ENTITY % ext SYSTEM "blocks2dbk.dtd">
 %ext;
 ]>
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:dbk='http://docbook.org/ns/docbook'
-  xmlns:rnd='http://docbook.org/ns/docbook/roundtrip'
-  xmlns:xlink='http://www.w3.org/1999/xlink'>
+<xsl:stylesheet exclude-result-prefixes="d"
+                version="1.0"
+               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:dbk='http://docbook.org/ns/docbook'
+               xmlns:rnd='http://docbook.org/ns/docbook/roundtrip'
+               xmlns:xlink='http://www.w3.org/1999/xlink'>
 
   <!-- Stylesheet to convert word processing docs to DocBook -->
   <!-- This stylesheet processes the output of sections2blocks.xsl -->
     <xsl:variable name='figure'
                  select='preceding-sibling::dbk:para[@rnd:style = "informalfigure-imagedata" or (dbk:inlinemediaobject and count(*) = 1 and normalize-space(.) = "")][1]'/>
     <xsl:variable name='caption'
-                 select='following-sibling::dbk:para[@rnd:style = "caption" or @rnd:style = "Caption"]'/>
+                 select='following-sibling::dbk:para[@rnd:style = "d:caption" or @rnd:style = "Caption"]'/>
 
     <xsl:choose>
       <!-- continue style paragraphs are handled in context -->
                      @rnd:style = "figure-title" and
                      following-sibling::*[1][self::dbk:para][@rnd:style = "informalfigure-imagedata" or (dbk:inlinemediaobject and count(*) = 1 and normalize-space(.) = "")]'/>
       <xsl:when test='$suppress and
-                     (@rnd:style = "caption" or @rnd:style = "Caption") and
+                     (@rnd:style = "d:caption" or @rnd:style = "Caption") and
                      (preceding-sibling::*[self::dbk:informaltable] or
                      preceding-sibling::*[self::dbk:para][@rnd:style = "informalfigure-imagedata" or (dbk:inlinemediaobject and count(*) = 1 and normalize-space(.) = "")])'/>
 
         </dbk:para>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "xinclude"'
+      <xsl:when test='@rnd:style = "d:xinclude"'
         xmlns:xi='http://www.w3.org/2001/XInclude'>
         <xi:include>
           <xsl:attribute name='href'>
         </xsl:element>
       </xsl:when>
 
-      <xsl:when test='starts-with(@rnd:style, "itemizedlist") or
-                      starts-with(@rnd:style, "orderedlist")'>
+      <xsl:when test='starts-with(@rnd:style, "d:itemizedlist") or
+                      starts-with(@rnd:style, "d:orderedlist")'>
 
         <xsl:variable name='stop.node'
           select='following-sibling::dbk:para[not(@rnd:style) or
-                  (not(starts-with(@rnd:style, "itemizedlist") or starts-with(@rnd:style, "orderedlist")) and @rnd:style != "para-continue")][1]'/>
+                  (not(starts-with(@rnd:style, "d:itemizedlist") or starts-with(@rnd:style, "d:orderedlist")) and @rnd:style != "para-continue")][1]'/>
 
         <xsl:choose>
-          <xsl:when test='translate(substring-after(@rnd:style, "list"), "0123456789", "") != "" or
-                          substring-after(@rnd:style, "list") = ""'>
+          <xsl:when test='translate(substring-after(@rnd:style, "d:list"), "0123456789", "") != "" or
+                          substring-after(@rnd:style, "d:list") = ""'>
             <xsl:call-template name='rnd:error'>
               <xsl:with-param name='code' select='"list-bad-level"'/>
               <xsl:with-param name='message'>style "<xsl:value-of select='@rnd:style'/>" is not a valid list style</xsl:with-param>
           <!-- TODO: the previous para-continue may not be associated with a list -->
 
           <!-- NB. Look back at the previous paragraph. There may be intervening tables or images. -->
-          <xsl:when test='preceding-sibling::dbk:para[1][starts-with(@rnd:style, "itemizedlist") or starts-with(@rnd:style, "orderedlist") or @rnd:style = "para-continue"]'/>
-          <xsl:when test='substring-after(@rnd:style, "list") != 1'>
+          <xsl:when test='preceding-sibling::dbk:para[1][starts-with(@rnd:style, "d:itemizedlist") or starts-with(@rnd:style, "d:orderedlist") or @rnd:style = "para-continue"]'/>
+          <xsl:when test='substring-after(@rnd:style, "d:list") != 1'>
             <xsl:call-template name='rnd:error'>
               <xsl:with-param name='code'>list-wrong-level</xsl:with-param>
               <xsl:with-param name='message'>list started at the wrong level</xsl:with-param>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "programlisting" and
-                      preceding-sibling::*[1][self::dbk:para and @rnd:style = "programlisting"]'/>
-      <xsl:when test='@rnd:style = "literallayout" and
-                      preceding-sibling::*[1][self::dbk:para and @rnd:style = "literallayout"]'/>
-      <xsl:when test='@rnd:style = "programlisting" or
-                      @rnd:style = "literallayout"'>
+      <xsl:when test='@rnd:style = "d:programlisting" and
+                      preceding-sibling::*[1][self::dbk:para and @rnd:style = "d:programlisting"]'/>
+      <xsl:when test='@rnd:style = "d:literallayout" and
+                      preceding-sibling::*[1][self::dbk:para and @rnd:style = "d:literallayout"]'/>
+      <xsl:when test='@rnd:style = "d:programlisting" or
+                      @rnd:style = "d:literallayout"'>
 
         <xsl:variable name='stop.node'
           select='following-sibling::dbk:para[@rnd:style != current()/@rnd:style][1]'/>
       <!-- TODO: make sure this is in a bibliography.
           If not, create a bibliolist.
        -->
-      <xsl:when test='@rnd:style = "bibliomixed"'>
+      <xsl:when test='@rnd:style = "d:bibliomixed"'>
        <dbk:bibliomixed>
           <xsl:call-template name='rnd:attributes'/>
          <xsl:apply-templates/>
       </xsl:when>
 
       <xsl:when test='@rnd:style = "blockquote-attribution" and
-                      preceding-sibling::*[1][self::dbk:para][@rnd:style = "blockquote-title" or @rnd:style = "blockquote"]'/>
+                      preceding-sibling::*[1][self::dbk:para][@rnd:style = "blockquote-title" or @rnd:style = "d:blockquote"]'/>
       <xsl:when test='@rnd:style = "blockquote-attribution"'>
         <xsl:call-template name='rnd:error'>
           <xsl:with-param name='code'>improper-blockquote-attribution</xsl:with-param>
           <xsl:with-param name='message'>blockquote attribution must follow a blockquote title</xsl:with-param>
         </xsl:call-template>
       </xsl:when>
-      <xsl:when test='@rnd:style = "blockquote" or
+      <xsl:when test='@rnd:style = "d:blockquote" or
                       @rnd:style = "blockquote-title"'>
         <xsl:choose>
-          <xsl:when test='@rnd:style = "blockquote" and
-                          preceding-sibling::*[1][self::dbk:para][starts-with(@rnd:style, "blockquote")]'/>
+          <xsl:when test='@rnd:style = "d:blockquote" and
+                          preceding-sibling::*[1][self::dbk:para][starts-with(@rnd:style, "d:blockquote")]'/>
           <xsl:otherwise>
 
             <xsl:variable name='stop.node'
-              select='following-sibling::*[not(@rnd:style = "blockquote" or
+              select='following-sibling::*[not(@rnd:style = "d:blockquote" or
                       @rnd:style = "blockquote-attribution")][1]'/>
 
             <dbk:blockquote>
               <xsl:choose>
                 <xsl:when test='$stop.node'>
                  <xsl:apply-templates select='following-sibling::*[following-sibling::*[generate-id() = generate-id($stop.node)]][@rnd:style = "blockquote-attribution"]' mode='rnd:blockquote-attribution'/>
-                  <xsl:apply-templates select='self::*[@rnd:style = "blockquote"] |
+                  <xsl:apply-templates select='self::*[@rnd:style = "d:blockquote"] |
                                               following-sibling::*[following-sibling::*[generate-id() = generate-id($stop.node)]]'
                     mode='rnd:blockquote'/>
                 </xsl:when>
                 <xsl:otherwise>
                  <xsl:apply-templates select='following-sibling::*[@rnd:style = "blockquote-attribution"]' mode='rnd:blockquote-attribution'/>
-                  <xsl:apply-templates select='self::*[@rnd:style = "blockquote"] |
+                  <xsl:apply-templates select='self::*[@rnd:style = "d:blockquote"] |
                                               following-sibling::*'
                     mode='rnd:blockquote'/>
                 </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "bridgehead"'>
+      <xsl:when test='@rnd:style = "d:bridgehead"'>
         <xsl:element name='{@rnd:style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:call-template name='rnd:attributes'/>
             <xsl:apply-templates/>
           </dbk:title>
           <xsl:choose>
-            <xsl:when test='following-sibling::*[1][self::dbk:para][@rnd:style = "formalpara"]'>
+            <xsl:when test='following-sibling::*[1][self::dbk:para][@rnd:style = "d:formalpara"]'>
               <dbk:para>
                 <xsl:call-template name='rnd:attributes'>
                   <xsl:with-param name='node'
           </xsl:choose>
         </dbk:formalpara>
       </xsl:when>
-      <xsl:when test='@rnd:style = "formalpara" and
+      <xsl:when test='@rnd:style = "d:formalpara" and
                       preceding-sibling::*[1][self::dbk:para][@rnd:style = "formalpara-title"]'/>
-      <xsl:when test='@rnd:style = "formalpara"'>
+      <xsl:when test='@rnd:style = "d:formalpara"'>
         <xsl:call-template name='rnd:error'>
           <xsl:with-param name='code'>formalpara-notitle</xsl:with-param>
           <xsl:with-param name='message'>formalpara used without a title</xsl:with-param>
 
       <xsl:when test='@rnd:style = "informalfigure-imagedata"'>
         <xsl:variable name='caption.next'
-          select='following-sibling::dbk:para[@rnd:style = "caption" or @rnd:style = "Caption"][1]'/>
+          select='following-sibling::dbk:para[@rnd:style = "d:caption" or @rnd:style = "Caption"][1]'/>
 
         <xsl:variable name='metadata'
           select='preceding-sibling::*[1][self::dbk:para][@rnd:style = "imagedata-metadata"]'/>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='(@rnd:style = "caption" or @rnd:style = "Caption") and
-                      preceding-sibling::*[(self::dbk:para and contains(@rnd:style, "imagedata")) or self::dbk:informaltable]'/>
-      <xsl:when test='@rnd:style = "caption" or @rnd:style = "Caption"'>
+      <xsl:when test='(@rnd:style = "d:caption" or @rnd:style = "Caption") and
+                      preceding-sibling::*[(self::dbk:para and contains(@rnd:style, "d:imagedata")) or self::dbk:informaltable]'/>
+      <xsl:when test='@rnd:style = "d:caption" or @rnd:style = "Caption"'>
         <xsl:call-template name='rnd:error'>
           <xsl:with-param name='code'>bad-caption</xsl:with-param>
           <xsl:with-param name='message'>caption does not follow table or figure</xsl:with-param>
       <xsl:when test='(contains(@rnd:style, "-title") or
                       contains(@rnd:style, "-titleabbrev") or
                       contains(@rnd:style, "-subtitle")) and
-                      not(starts-with(@rnd:style, "blockquote") or starts-with(@rnd:style, "formal"))'>
+                      not(starts-with(@rnd:style, "d:blockquote") or starts-with(@rnd:style, "d:formal"))'>
         <!-- TODO: check that no non-metadata elements occur before this paragraph -->
       </xsl:when>
 
       </xsl:when>
       <xsl:otherwise>
         <xsl:variable name='name'
-          select='translate(normalize-space(substring-before($metadata, "=")), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'/>
+          select='translate(normalize-space(substring-before($metadata, "=")), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "d:abcdefghijklmnopqrstuvwxyz")'/>
         <xsl:variable name='value'
-          select='translate(normalize-space(substring-after($metadata, "=")), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'/>
+          select='translate(normalize-space(substring-after($metadata, "=")), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "d:abcdefghijklmnopqrstuvwxyz")'/>
 
         <xsl:choose>
-          <xsl:when test='$name = "scalefit"'>
+          <xsl:when test='$name = "d:scalefit"'>
             <xsl:attribute name='scalefit'>
               <xsl:choose>
                 <xsl:when test='$value = "1" or
-                                $value = "yes" or
-                                $value = "true"'>1</xsl:when>
+                                $value = "d:yes" or
+                                $value = "d:true"'>1</xsl:when>
                 <xsl:otherwise>0</xsl:otherwise>
               </xsl:choose>
             </xsl:attribute>
           </xsl:when>
-          <xsl:when test='$name = "align" or
-                          $name = "contentdepth" or
-                          $name = "contentwidth" or
-                          $name = "depth" or
-                          $name = "scale" or
-                          $name = "valign" or
-                          $name = "width"'>
+          <xsl:when test='$name = "d:align" or
+                          $name = "d:contentdepth" or
+                          $name = "d:contentwidth" or
+                          $name = "d:depth" or
+                          $name = "d:scale" or
+                          $name = "d:valign" or
+                          $name = "d:width"'>
             <!-- TODO: check enumerate values-->
             <xsl:attribute name='{$name}'>
               <xsl:value-of select='$value'/>
 
       <xsl:when test='@rnd:style = preceding-sibling::node()[1][self::dbk:emphasis]/@rnd:style'/>
 
-      <xsl:when test='@rnd:style = "emphasis"'>
+      <xsl:when test='@rnd:style = "d:emphasis"'>
         <xsl:copy>
           <xsl:call-template name='rnd:attributes'/>
           <xsl:apply-templates mode='rnd:copy'/>
         </xsl:copy>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "citetitle" or
-                      @rnd:style = "literal" or
-                      @rnd:style = "sgmltag"'>
+      <xsl:when test='@rnd:style = "d:citetitle" or
+                      @rnd:style = "d:literal" or
+                      @rnd:style = "d:sgmltag"'>
         <xsl:element name='{@rnd:style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:call-template name='rnd:attributes'/>
                      select='ancestor::dbk:para/following-sibling::*[self::dbk:informaltable or self::dbk:para[dbk:inlinemediaobject and count(*) = 1 and normalize-space() = ""]][1]'/>
 
        <xsl:variable name='caption'
-                     select='ancestor::dbk:para/following-sibling::dbk:para[@rnd:style = "caption" or @rnd:style = "Caption"]'/>
+                     select='ancestor::dbk:para/following-sibling::dbk:para[@rnd:style = "d:caption" or @rnd:style = "Caption"]'/>
 
        <xsl:variable name='metadata'>
          <xsl:apply-templates select='ancestor::dbk:para/following-sibling::*[1]'
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match='dbk:para[@rnd:style = "caption" or @rnd:style = "Caption"]'
+  <xsl:template match='dbk:para[@rnd:style = "d:caption" or @rnd:style = "Caption"]'
     mode='rnd:caption'>
     <dbk:caption>
       <dbk:para>
 
       <!-- Handle nested lists -->
       <xsl:variable name='list-type'
-        select='concat(substring-before(@rnd:style, "list"), "list")'/>
+        select='concat(substring-before(@rnd:style, "d:list"), "d:list")'/>
       <xsl:variable name='list-level'
         select='substring-after(@rnd:style, $list-type)'/>
 
          - This is probably better done in a previous stage using grouping.
         -->
       <xsl:variable name='stop.node'
-        select='following-sibling::dbk:para[@rnd:style != concat("itemizedlist", $list-level + 1) and
-                @rnd:style != concat("orderedlist", $list-level + 1) and
-                @rnd:style != concat("itemizedlist", $list-level + 2) and
-                @rnd:style != concat("orderedlist", $list-level + 2) and
-                @rnd:style != concat("itemizedlist", $list-level + 3) and
-                @rnd:style != concat("orderedlist", $list-level + 3) and
+        select='following-sibling::dbk:para[@rnd:style != concat("d:itemizedlist", $list-level + 1) and
+                @rnd:style != concat("d:orderedlist", $list-level + 1) and
+                @rnd:style != concat("d:itemizedlist", $list-level + 2) and
+                @rnd:style != concat("d:orderedlist", $list-level + 2) and
+                @rnd:style != concat("d:itemizedlist", $list-level + 3) and
+                @rnd:style != concat("d:orderedlist", $list-level + 3) and
                 @rnd:style != "para-continue"][1]'/>
 
       <xsl:variable name='nested'
-        select='following-sibling::dbk:para[@rnd:style = concat("itemizedlist", $list-level + 1) or @rnd:style = concat("orderedlist", $list-level + 1)][1]'/>
+        select='following-sibling::dbk:para[@rnd:style = concat("d:itemizedlist", $list-level + 1) or @rnd:style = concat("d:orderedlist", $list-level + 1)][1]'/>
 
       <xsl:choose>
         <!-- Is there a nested list at all? -->
-        <xsl:when test='following-sibling::*[self::dbk:para and @rnd:style != "para-continue"][1][@rnd:style != concat("itemizedlist", $list-level + 1) and @rnd:style != concat("orderedlist", $list-level + 1)]'/>
+        <xsl:when test='following-sibling::*[self::dbk:para and @rnd:style != "para-continue"][1][@rnd:style != concat("d:itemizedlist", $list-level + 1) and @rnd:style != concat("d:orderedlist", $list-level + 1)]'/>
 
-        <xsl:when test='following-sibling::dbk:para[@rnd:style = concat("itemizedlist", $list-level + 1) or @rnd:style = concat("orderedlist", $list-level + 1)] and
+        <xsl:when test='following-sibling::dbk:para[@rnd:style = concat("d:itemizedlist", $list-level + 1) or @rnd:style = concat("d:orderedlist", $list-level + 1)] and
                         $stop.node'>
           <xsl:element name='{concat(substring-before($nested/@rnd:style, "list"), "list")}'
             namespace='http://docbook.org/ns/docbook'>
-            <xsl:apply-templates select='following-sibling::dbk:para[@rnd:style = concat("itemizedlist", $list-level + 1) or @rnd:style = concat("orderedlist", $list-level + 1)][following-sibling::*[generate-id() = generate-id($stop.node)]]'
+            <xsl:apply-templates select='following-sibling::dbk:para[@rnd:style = concat("d:itemizedlist", $list-level + 1) or @rnd:style = concat("d:orderedlist", $list-level + 1)][following-sibling::*[generate-id() = generate-id($stop.node)]]'
               mode='rnd:listitem'/>
           </xsl:element>
         </xsl:when>
-        <xsl:when test='following-sibling::dbk:para[@rnd:style = concat("itemizedlist", $list-level + 1) or @rnd:style = concat("orderedlist", $list-level + 1)]'>
+        <xsl:when test='following-sibling::dbk:para[@rnd:style = concat("d:itemizedlist", $list-level + 1) or @rnd:style = concat("d:orderedlist", $list-level + 1)]'>
 
           <xsl:element name='{concat(substring-before($nested/@rnd:style, "list"), "list")}'
             namespace='http://docbook.org/ns/docbook'>
-            <xsl:apply-templates select='following-sibling::dbk:para[@rnd:style = concat("itemizedlist", $list-level + 1) or @rnd:style = concat("orderedlist", $list-level + 1)]'
+            <xsl:apply-templates select='following-sibling::dbk:para[@rnd:style = concat("d:itemizedlist", $list-level + 1) or @rnd:style = concat("d:orderedlist", $list-level + 1)]'
               mode='rnd:listitem'/>
           </xsl:element>
         </xsl:when>
       </xsl:when>
 
       <xsl:when test='@rnd:style = "abstract-title" or
-                      @rnd:style = "abstract"'>
+                      @rnd:style = "d:abstract"'>
         <xsl:variable name='stop.node'
-          select='following-sibling::dbk:para[@rnd:style != "abstract"][1]'/>
+          select='following-sibling::dbk:para[@rnd:style != "d:abstract"][1]'/>
         <xsl:choose>
           <xsl:when test='$stop.node'>
             <dbk:abstract>
-              <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "abstract"][following-sibling::*[generate-id() = generate-id($stop.node)]]'
+              <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "d:abstract"][following-sibling::*[generate-id() = generate-id($stop.node)]]'
                 mode='rnd:abstract'/>
             </dbk:abstract>
             <xsl:apply-templates select='$stop.node'
           </xsl:when>
           <xsl:otherwise>
             <dbk:abstract>
-              <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "abstract"]' mode='rnd:abstract'/>
+              <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "d:abstract"]' mode='rnd:abstract'/>
             </dbk:abstract>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "legalnotice"'>
+      <xsl:when test='@rnd:style = "d:legalnotice"'>
         <xsl:variable name='stop.node'
-          select='following-sibling::dbk:para[@rnd:style != "legalnotice"][1]'/>
+          select='following-sibling::dbk:para[@rnd:style != "d:legalnotice"][1]'/>
 
         <xsl:choose>
           <xsl:when test='$stop.node'>
             <dbk:legalnotice>
-              <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "legalnotice"][following-sibling::*[generate-id() = generate-id($stop.node)]]'
+              <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "d:legalnotice"][following-sibling::*[generate-id() = generate-id($stop.node)]]'
                 mode='rnd:legalnotice'/>
             </dbk:legalnotice>
             <xsl:apply-templates select='$stop.node'
               mode='rnd:metadata'/>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "legalnotice"]'
+            <xsl:apply-templates select='.|following-sibling::dbk:para[@rnd:style = "d:legalnotice"]'
               mode='rnd:legalnotice'/>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "keyword"'>
+      <xsl:when test='@rnd:style = "d:keyword"'>
         <xsl:variable name='stop.node'
           select='following-sibling::*[not(self::dbk:para) or
-                  (self::dbk:para and @rnd:style != "keyword")][1]'/>
+                  (self::dbk:para and @rnd:style != "d:keyword")][1]'/>
 
         <xsl:choose>
           <xsl:when test='$stop.node'>
             <dbk:keywordset>
               <xsl:call-template name='rnd:keyword'>
                 <xsl:with-param name='nodes'
-                  select='.|following-sibling::dbk:para[@rnd:style = "keyword"][following-sibling::*[generate-id() = generate-id($stop.node)]]'/>
+                  select='.|following-sibling::dbk:para[@rnd:style = "d:keyword"][following-sibling::*[generate-id() = generate-id($stop.node)]]'/>
               </xsl:call-template>
             </dbk:keywordset>
             <xsl:apply-templates select='$stop.node'
           <xsl:otherwise>
             <xsl:call-template name='rnd:keyword'>
               <xsl:with-param name='nodes'
-                select='.|following-sibling::dbk:para[@rnd:style = "keyword"]'/>
+                select='.|following-sibling::dbk:para[@rnd:style = "d:keyword"]'/>
             </xsl:call-template>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "author"'>
+      <xsl:when test='@rnd:style = "d:author"'>
         <dbk:author>
           <xsl:choose>
-            <xsl:when test='dbk:emphasis[@rnd:style = "orgname"]'>
+            <xsl:when test='dbk:emphasis[@rnd:style = "d:orgname"]'>
               <dbk:orgname>
                 <xsl:apply-templates
-                  select='dbk:emphasis[@rnd:style = "orgname"]'
+                  select='dbk:emphasis[@rnd:style = "d:orgname"]'
                   mode='rnd:orgname'/>
               </dbk:orgname>
-              <xsl:if test='*[not(@rnd:style = "orgname")]'>
+              <xsl:if test='*[not(@rnd:style = "d:orgname")]'>
                 <xsl:call-template name='rnd:error'>
                   <xsl:with-param name='code'>bad-author-orgname-combo</xsl:with-param>
-                  <xsl:with-param name='message'>character span "<xsl:value-of select='dbk:emphasis[@rnd:style != "orgname"][1]/@rnd:style'/>" not allowed in an author paragraph combined with orgname</xsl:with-param>
+                  <xsl:with-param name='message'>character span "<xsl:value-of select='dbk:emphasis[@rnd:style != "d:orgname"][1]/@rnd:style'/>" not allowed in an author paragraph combined with orgname</xsl:with-param>
                 </xsl:call-template>
               </xsl:if>
             </xsl:when>
          <xsl:with-param name='node' select='following-sibling::*[1]'/>
        </xsl:call-template>
       </xsl:when>
-      <xsl:when test='@rnd:style = "personblurb" or
-                      @rnd:style = "address" or
-                      @rnd:style = "affiliation" or
-                      @rnd:style = "contrib" or
-                      @rnd:style = "email"'/>
-
-      <xsl:when test='@rnd:style = "releaseinfo" or
-                      @rnd:style = "date" or
-                      @rnd:style = "pubdate" or
-                      @rnd:style = "pagenums" or
-                      @rnd:style = "issuenum" or
-                      @rnd:style = "volumenum" or
-                      @rnd:style = "edition" or
-                      @rnd:style = "editor" or
-                      @rnd:style = "othercredit" or
-                      @rnd:style = "biblioid" or
-                      @rnd:style = "bibliosource" or
-                      @rnd:style = "bibliomisc" or
-                      @rnd:style = "revhistory" or
-                      @rnd:style = "revision"'>
+      <xsl:when test='@rnd:style = "d:personblurb" or
+                      @rnd:style = "d:address" or
+                      @rnd:style = "d:affiliation" or
+                      @rnd:style = "d:contrib" or
+                      @rnd:style = "d:email"'/>
+
+      <xsl:when test='@rnd:style = "d:releaseinfo" or
+                      @rnd:style = "d:date" or
+                      @rnd:style = "d:pubdate" or
+                      @rnd:style = "d:pagenums" or
+                      @rnd:style = "d:issuenum" or
+                      @rnd:style = "d:volumenum" or
+                      @rnd:style = "d:edition" or
+                      @rnd:style = "d:editor" or
+                      @rnd:style = "d:othercredit" or
+                      @rnd:style = "d:biblioid" or
+                      @rnd:style = "d:bibliosource" or
+                      @rnd:style = "d:bibliomisc" or
+                      @rnd:style = "d:revhistory" or
+                      @rnd:style = "d:revision"'>
         <xsl:element name='{@rnd:style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:apply-templates mode='rnd:metadata'/>
           select='substring-before(@rnd:style, "-title")'/>
 
         <xsl:choose>
-          <xsl:when test='$parent = "table" or
-                          $parent = "figure"'>
+          <xsl:when test='$parent = "d:table" or
+                          $parent = "d:figure"'>
             <dbk:title>
               <xsl:apply-templates mode='rnd:metadata'/>
             </dbk:title>
       </xsl:when>
 
       <xsl:when test='@rnd:style = "publisher-address" and
-                      preceding-sibling::*[1][not(self::dbk:para) or not(@rnd:style = "publisher")]'>
+                      preceding-sibling::*[1][not(self::dbk:para) or not(@rnd:style = "d:publisher")]'>
         <xsl:call-template name='rnd:error'>
           <xsl:with-param name='code'>bad-publisher-address</xsl:with-param>
           <xsl:with-param name='message'>publisher-address must follow publisher</xsl:with-param>
         <xsl:apply-templates select='following-sibling::*[1]'
           mode='rnd:metadata'/>
       </xsl:when>
-      <xsl:when test='@rnd:style = "publisher"'>
+      <xsl:when test='@rnd:style = "d:publisher"'>
         <dbk:publisher>
           <dbk:publishername>
             <xsl:apply-templates/>
     <xsl:choose>
       <!-- inlines are coalesced -->
       <xsl:when test='@rnd:style = $previous[last()][self::dbk:emphasis]/@rnd:style'/>
-      <xsl:when test='@rnd:style = "honorific" or
-                      @rnd:style = "firstname" or
-                      @rnd:style = "lineage" or
-                      @rnd:style = "othername" or
-                      @rnd:style = "surname"'>
+      <xsl:when test='@rnd:style = "d:honorific" or
+                      @rnd:style = "d:firstname" or
+                      @rnd:style = "d:lineage" or
+                      @rnd:style = "d:othername" or
+                      @rnd:style = "d:surname"'>
         <xsl:element name='{@rnd:style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:apply-templates/>
 
   <xsl:template match='dbk:para' mode='rnd:author'>
     <xsl:choose>
-      <xsl:when test='@rnd:style = "personblurb" and
-                      preceding-sibling::*[1][self::dbk:para and @rnd:style != "personblurb"]'>
+      <xsl:when test='@rnd:style = "d:personblurb" and
+                      preceding-sibling::*[1][self::dbk:para and @rnd:style != "d:personblurb"]'>
         <dbk:personblurb>
           <xsl:apply-templates select='.'
             mode='rnd:personblurb'/>
         </dbk:personblurb>
       </xsl:when>
-      <xsl:when test='@rnd:style = "personblurb"'>
+      <xsl:when test='@rnd:style = "d:personblurb"'>
         <xsl:apply-templates select='following-sibling::*[1]'
           mode='rnd:author'/>
       </xsl:when>
 
       <!-- Web and mail addresses may appear in a simplified form -->
-      <xsl:when test='@rnd:style = "address"'>
+      <xsl:when test='@rnd:style = "d:address"'>
         <xsl:choose>
           <xsl:when test='dbk:link and
                           count(dbk:link) = count(*)'>
         </xsl:choose>
       </xsl:when>
 
-      <xsl:when test='@rnd:style = "affiliation"'>
+      <xsl:when test='@rnd:style = "d:affiliation"'>
        <dbk:affiliation>
          <xsl:choose>
            <xsl:when test='not(*)'>
        <xsl:apply-templates select='following-sibling::*[1]'
                             mode='rnd:author'/>
       </xsl:when>
-      <xsl:when test='@rnd:style = "contrib" or
-                      @rnd:style = "email"'>
+      <xsl:when test='@rnd:style = "d:contrib" or
+                      @rnd:style = "d:email"'>
         <xsl:element name='{@rnd:style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:apply-templates mode='rnd:author'/>
     -->
   <xsl:template match='dbk:emphasis' mode='rnd:author'>
     <xsl:choose>
-      <xsl:when test='@rnd:style = "city" or
-                      @rnd:style = "country" or
-                      @rnd:style = "email" or
-                      @rnd:style = "fax" or
-                      @rnd:style = "jobtitle" or
-                      @rnd:style = "orgdiv" or
-                      @rnd:style = "orgname" or
-                      @rnd:style = "otheraddr" or
-                      @rnd:style = "phone" or
-                      @rnd:style = "pob" or
-                      @rnd:style = "postcode" or
-                      @rnd:style = "shortaffil" or
-                      @rnd:style = "state" or
-                      @rnd:style = "street"'>
+      <xsl:when test='@rnd:style = "d:city" or
+                      @rnd:style = "d:country" or
+                      @rnd:style = "d:email" or
+                      @rnd:style = "d:fax" or
+                      @rnd:style = "d:jobtitle" or
+                      @rnd:style = "d:orgdiv" or
+                      @rnd:style = "d:orgname" or
+                      @rnd:style = "d:otheraddr" or
+                      @rnd:style = "d:phone" or
+                      @rnd:style = "d:pob" or
+                      @rnd:style = "d:postcode" or
+                      @rnd:style = "d:shortaffil" or
+                      @rnd:style = "d:state" or
+                      @rnd:style = "d:street"'>
         <xsl:element name='{@rnd:style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:apply-templates/>
   </xsl:template>
 
   <xsl:template match='dbk:para' mode='rnd:personblurb'>
-    <xsl:if test='@rnd:style = "personblurb"'>
+    <xsl:if test='@rnd:style = "d:personblurb"'>
       <dbk:para>
         <xsl:apply-templates/>
       </dbk:para>
 
     <xsl:choose>
       <xsl:when test='not($in-list) and
-                      preceding-sibling::dbk:para[1][starts-with(@rnd:style, "itemizedlist") or starts-with(@rnd:style, "orderedlist") or @rnd:style = "para-continue"]'/>
+                      preceding-sibling::dbk:para[1][starts-with(@rnd:style, "d:itemizedlist") or starts-with(@rnd:style, "d:orderedlist") or @rnd:style = "para-continue"]'/>
       <xsl:when test='preceding-sibling::*[1][self::dbk:para][@rnd:style ="table-title"]'>
        <dbk:table>
          <xsl:apply-templates select='@*' mode='rnd:copy'/>
   <!-- Find the caption associated with this table -->
   <xsl:template name='rnd:table-caption'>
     <xsl:variable name='candidate'
-                 select='following-sibling::dbk:para[@rnd:style = "caption" or @rnd:style = "Caption"][1]'/>
+                 select='following-sibling::dbk:para[@rnd:style = "d:caption" or @rnd:style = "Caption"][1]'/>
 
     <xsl:if test='$candidate != "" and
                  generate-id($candidate/preceding-sibling::dbk:informaltable[1]) = generate-id(.)'>
   <!-- Find table associated text -->
   <xsl:template name='rnd:table-textobject'>
     <xsl:variable name='caption'
-                 select='following-sibling::dbk:para[@rnd:style = "caption" or @rnd:style = "Caption"][1]'/>
+                 select='following-sibling::dbk:para[@rnd:style = "d:caption" or @rnd:style = "Caption"][1]'/>
 
     <xsl:if test='generate-id($caption/preceding-sibling::dbk:informaltable[1]) = generate-id(.)'>
       <xsl:variable name='content'
   <xsl:template name='rnd:attributes'>
     <xsl:param name='node' select='.'/>
 
-    <xsl:apply-templates select='$node/@*[namespace-uri() != "http://docbook.org/ns/docbook/roundtrip"]' mode='rnd:copy'/>
+    <xsl:apply-templates select='$node/@*[namespace-uri() != "http://docbook.org/d:ns/d:docbook/d:roundtrip"]' mode='rnd:copy'/>
   </xsl:template>
 
   <xsl:template match='*' name='rnd:copy' mode='rnd:copy'>
index 113a5b286f9add507e52ca5f6127ebc108986bb5..58475b23629bf0452f82be64a98cba2afef103a9 100644 (file)
@@ -98,7 +98,7 @@
   </xsl:template>
 
   <xsl:template name='doc:make-paragraph'>
-    <xsl:param name='style' select='"unknown"'/>
+    <xsl:param name='style' select='"d:unknown"'/>
     <xsl:param name='content'>
       <xsl:apply-templates mode='doc:body'/>
     </xsl:param>
   </xsl:template>
 
   <xsl:template name='doc:make-phrase'>
-    <xsl:param name='style' select='"unknown"'/>
+    <xsl:param name='style' select='"d:unknown"'/>
     <xsl:param name='content'>
       <xsl:apply-templates mode='doc:body'/>
     </xsl:param>
index 47a7be0c20d5816d987a177f96af042d5f44d61b..47d94b6b46a76dda53241c74e6909d99467c0d54 100644 (file)
@@ -1,5 +1,6 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:sfa="http://developer.apple.com/namespaces/sfa"
   xmlns:sf="http://developer.apple.com/namespaces/sf"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   </xsl:template>
 
   <xsl:template name='doc:make-paragraph'>
-    <xsl:param name='style' select='"unknown"'/>
+    <xsl:param name='style' select='"d:unknown"'/>
     <xsl:param name='content'>
       <xsl:apply-templates mode='doc:body'/>
     </xsl:param>
     <sf:p>
       <xsl:attribute name='sf:style'>
         <xsl:call-template name='doc:lookup-paragraph-style'>
-          <xsl:with-param name='style' select='"para"'/>
+          <xsl:with-param name='style' select='"d:para"'/>
         </xsl:call-template>
       </xsl:attribute>
 
index 34c22b8a7ec82ebffe01587be8c895c5a5d6feb6..bde1fcac2db9f8451569508d8a991619f9ba97b3 100644 (file)
@@ -1,5 +1,6 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:w='http://schemas.microsoft.com/office/word/2003/wordml'
   xmlns:v='urn:schemas-microsoft-com:vml'
   xmlns:w10="urn:schemas-microsoft-com:office:word"
@@ -27,8 +28,8 @@
   <xsl:include href='param.xsl'/>
 
   <xsl:strip-space elements='*'/>
-  <xsl:preserve-space elements='literallayout doc:literallayout
-                                programlisting doc:programlisting'/>
+  <xsl:preserve-space elements='d:literallayout doc:literallayout
+                                d:programlisting doc:programlisting'/>
 
   <xsl:variable name='templatedoc' select='document($wordml.template)'/>
 
@@ -48,8 +49,8 @@
     <xsl:text>&#xa;</xsl:text>
 
     <xsl:variable name='info'
-      select='$doc/book/bookinfo|$doc/article/articleinfo'/>
-    <xsl:variable name='authors' select='$info/author|$info/authorinitials|$info/authorgroup/author|$info/authorgroup/editor'/>
+      select='$doc/d:book/d:bookinfo|$doc/d:article/d:articleinfo'/>
+    <xsl:variable name='authors' select='$info/d:author|$info/d:authorinitials|$info/d:authorgroup/d:author|$info/d:authorgroup/d:editor'/>
 
     <w:wordDocument
       w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no">
@@ -70,8 +71,8 @@
         <o:LastAuthor>
           <xsl:variable name="content">
             <xsl:choose>
-              <xsl:when test='$info/revhistory/revision[1]/*[self::author|self::authorinitials]'>
-                <xsl:apply-templates select='$info/revhistory/revision[1]/*[self::author|self::authorinitials]' mode='doc:docprop.author'/>
+              <xsl:when test='$info/d:revhistory/d:revision[1]/*[self::d:author|self::d:authorinitials]'>
+                <xsl:apply-templates select='$info/d:revhistory/d:revision[1]/*[self::d:author|self::d:authorinitials]' mode='doc:docprop.author'/>
               </xsl:when>
               <xsl:when test='$authors'>
                 <xsl:apply-templates select='$authors[1]' mode='doc:docprop.author'/>
   </xsl:template>
 
   <xsl:template name='doc:make-paragraph'>
-    <xsl:param name='style' select='"unknown"'/>
+    <xsl:param name='style' select='"d:unknown"'/>
     <xsl:param name='content'>
       <xsl:apply-templates mode='doc:body'/>
     </xsl:param>
   <xsl:template name='doc:make-table'>
     <xsl:param name='columns'/>
     <xsl:param name='content'>
-      <xsl:apply-templates select='*[not(self::caption|self::doc:caption|self::textobject|self::doc:textobject)]'
+      <xsl:apply-templates select='*[not(self::d:caption|self::doc:caption|self::d:textobject|self::doc:textobject)]'
         mode='doc:body'/>
     </xsl:param>
 
index 1d1a667935a472f5dec98b9c184bf28a379b2b0c..f84b3771fbc9fcd638d276c4cddcfb7cfb52c194 100644 (file)
@@ -1,5 +1,6 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:doc='http://docbook.org/ns/docbook'
   exclude-result-prefixes='doc'>
 
 
   <!-- doc:docprop.author mode is for creating document metadata -->
 
-  <xsl:template match='author|doc:author|editor|doc:editor' mode='doc:docprop.author'>
-    <xsl:apply-templates select='firstname|doc:firstname |
-                                 personname/firstname|doc:personname/doc:firstname'
+  <xsl:template match='d:author|doc:author|d:editor|doc:editor' mode='doc:docprop.author'>
+    <xsl:apply-templates select='d:firstname|doc:firstname |
+                                 d:personname/d:firstname|doc:personname/doc:firstname'
       mode='doc:docprop.author'/>
     <xsl:text> </xsl:text>
-    <xsl:apply-templates select='surname|doc:surname |
-                                 personname/surname|doc:personname/doc:surname'
+    <xsl:apply-templates select='d:surname|doc:surname |
+                                 d:personname/d:surname|doc:personname/doc:surname'
       mode='doc:docprop.author'/>
   </xsl:template>
 
-  <xsl:template match='firstname|doc:firstname |
-                       surname|doc:surname'
+  <xsl:template match='d:firstname|doc:firstname |
+                       d:surname|doc:surname'
     mode='doc:docprop.author'>
     <xsl:apply-templates select='.' mode='doc:body'/>
   </xsl:template>
 
   <!-- doc:body mode is for processing components of a document -->
 
-  <xsl:template match='book|article|chapter|section|sect1|sect2|sect3|sect4|sect5|simplesect |
+  <xsl:template match='d:book|d:article|d:chapter|d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:simplesect |
                        doc:book|doc:article|doc:chapter|doc:section|doc:sect1|doc:sect2|doc:sect3|doc:sect4|doc:sect5|doc:simplesect'
     mode='doc:body'>
     <xsl:call-template name='doc:make-subsection'/>
   </xsl:template>
 
-  <xsl:template match='articleinfo |
-                      chapterinfo |
-                      bookinfo |
+  <xsl:template match='d:articleinfo |
+                      d:chapterinfo |
+                      d:bookinfo |
                        doc:info |
                        doc:articleinfo |
                       doc:chapterinfo |
                       doc:bookinfo'
     mode='doc:body'>
-    <xsl:apply-templates select='title|subtitle|titleabbrev |
+    <xsl:apply-templates select='d:title|d:subtitle|d:titleabbrev |
                                  doc:title|doc:subtitle|doc:titleabbrev'
       mode='doc:body'/>
-    <xsl:apply-templates select='author|releaseinfo|abstract |
+    <xsl:apply-templates select='d:author|d:releaseinfo|d:abstract |
                                  doc:author|doc:releaseinfo|doc:abstract'
       mode='doc:body'/>
     <!-- current implementation ignores all other metadata -->
-    <xsl:for-each select='*[not(self::title|self::subtitle|self::titleabbrev|self::author|self::releaseinfo|self::abstract |
+    <xsl:for-each select='*[not(self::d:title|self::d:subtitle|self::d:titleabbrev|self::d:author|self::d:releaseinfo|self::d:abstract |
                           self::doc:title|self::doc:subtitle|self::doc:titleabbrev|self::doc:author|self::doc:releaseinfo|self::doc:abstract)]'>
       <xsl:call-template name='doc:nomatch'/>
     </xsl:for-each>
   </xsl:template>
 
-  <xsl:template match='title|subtitle|titleabbrev |
+  <xsl:template match='d:title|d:subtitle|d:titleabbrev |
                        doc:title|doc:subtitle|doc:titleabbrev'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
       <xsl:with-param name='style'>
        <xsl:choose>
-          <xsl:when test='(parent::section|parent::doc:section or
-                          parent::sectioninfo/parent::section|parent::doc:sectioninfo/parent::doc:section) and
-                          count(ancestor::section|ancestor::doc:section) > 5'>
+          <xsl:when test='(parent::d:section|parent::doc:section or
+                          parent::d:sectioninfo/parent::d:section|parent::doc:sectioninfo/parent::doc:section) and
+                          count(ancestor::d:section|ancestor::doc:section) > 5'>
             <xsl:call-template name='doc:warning'>
              <xsl:with-param name='message'>section nested deeper than 5 levels</xsl:with-param>
            </xsl:call-template>
             <xsl:text>sect5-</xsl:text>
             <xsl:value-of select='local-name()'/>
           </xsl:when>
-          <xsl:when test='parent::section|parent::doc:section or
-                          parent::sectioninfo/parent::section|parent::doc:sectioninfo/parent::doc:section'>
+          <xsl:when test='parent::d:section|parent::doc:section or
+                          parent::d:sectioninfo/parent::d:section|parent::doc:sectioninfo/parent::doc:section'>
             <xsl:text>sect</xsl:text>
-            <xsl:value-of select='count(ancestor::section|ancestor::doc:section)'/>
+            <xsl:value-of select='count(ancestor::d:section|ancestor::doc:section)'/>
             <xsl:text>-</xsl:text>
             <xsl:value-of select='local-name()'/>
           </xsl:when>
-          <xsl:when test='contains(local-name(..), "info")'>
+          <xsl:when test='contains(local-name(..), "d:info")'>
             <xsl:value-of select='local-name(../..)'/>
             <xsl:text>-</xsl:text>
             <xsl:value-of select='local-name()'/>
        </xsl:choose>
       </xsl:with-param>
       <xsl:with-param name='outline.level'
-                     select='count(ancestor::*) - count(parent::*[contains(local-name(), "info")]) - 1'/>
+                     select='count(ancestor::*) - count(parent::*[contains(local-name(), "d:info")]) - 1'/>
       <xsl:with-param name='attributes.node'
-                     select='../parent::*[contains(local-name(current()), "info")] |
-                             parent::*[not(contains(local-name(current()), "info"))]'/>
+                     select='../parent::*[contains(local-name(current()), "d:info")] |
+                             parent::*[not(contains(local-name(current()), "d:info"))]'/>
       <xsl:with-param name='content'>
        <xsl:apply-templates mode='doc:body'/>
       </xsl:with-param>
 
     <para>TODO: Handle all metadata elements, apart from titles.</para>
   </doc:template>
-  <xsl:template match='*[contains(local-name(), "info")]/*[not(self::title|self::subtitle|self::titleabbrev|self::doc:title|self::doc:subtitle|self::doc:titleabbrev)]'
+  <xsl:template match='*[contains(local-name(), "d:info")]/*[not(self::d:title|self::d:subtitle|self::d:titleabbrev|self::doc:title|self::doc:subtitle|self::doc:titleabbrev)]'
                priority='0'
                mode='doc:body'/>
 
-  <xsl:template match='author|editor|othercredit |
+  <xsl:template match='d:author|d:editor|d:othercredit |
                        doc:author|doc:editor|doc:othercredit'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
       <xsl:with-param name='style'
                      select='local-name()'/>
       <xsl:with-param name='content'>
-       <xsl:apply-templates select='personname|surname|firstname|honorific|lineage|othername|contrib |
+       <xsl:apply-templates select='d:personname|d:surname|d:firstname|d:honorific|d:lineage|d:othername|d:contrib |
                                      doc:personname|doc:surname|doc:firstname|doc:honorific|doc:lineage|doc:othername|doc:contrib'
                             mode='doc:body'/>
       </xsl:with-param>
     </xsl:call-template>
 
-    <xsl:apply-templates select='affiliation|address |
+    <xsl:apply-templates select='d:affiliation|d:address |
                                  doc:affiliation|doc:address'
       mode='doc:body'/>
-    <xsl:apply-templates select='authorblurb|personblurb |
+    <xsl:apply-templates select='d:authorblurb|d:personblurb |
                                  doc:authorblurb|doc:personblurb'
       mode='doc:body'/>
   </xsl:template>
-  <xsl:template match='affiliation|doc:affiliation'
+  <xsl:template match='d:affiliation|doc:affiliation'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
-      <xsl:with-param name='style' select='"affiliation"'/>
+      <xsl:with-param name='style' select='"d:affiliation"'/>
       <xsl:with-param name='content'>
        <xsl:apply-templates mode='doc:body'/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
-  <xsl:template match='address[parent::author|parent::editor|parent::othercredit] |
+  <xsl:template match='d:address[parent::d:author|parent::d:editor|parent::d:othercredit] |
                        doc:address[parent::doc:author|parent::doc:editor|parent::doc:othercredit]'
                mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
-      <xsl:with-param name='style' select='"address"'/>
+      <xsl:with-param name='style' select='"d:address"'/>
       <xsl:with-param name='content'>
        <xsl:apply-templates mode='doc:body'/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
   <!-- do not attempt to handle recursive structures -->
-  <xsl:template match='address[not(parent::author|parent::editor|parent::othercredit)] |
+  <xsl:template match='d:address[not(parent::d:author|parent::d:editor|parent::d:othercredit)] |
                        doc:address[not(parent::doc:author|parent::doc:editor|parent::doc:othercredit)]'
     mode='doc:body'>
-    <xsl:apply-templates select='node()[not(self::affiliation|self::authorblurb|self::doc:affiliation|self::doc:authorblurb)]'/>
+    <xsl:apply-templates select='node()[not(self::d:affiliation|self::d:authorblurb|self::doc:affiliation|self::doc:authorblurb)]'/>
   </xsl:template>
-  <xsl:template match='abstract|doc:abstract'
+  <xsl:template match='d:abstract|doc:abstract'
     mode='doc:body'>
-    <xsl:if test='title|doc:title'>
+    <xsl:if test='d:title|doc:title'>
       <xsl:call-template name='doc:make-paragraph'>
         <xsl:with-param name='style' select='"abstract-title"'/>
         <xsl:with-param name='content'>
-          <xsl:apply-templates select='title/node()|doc:title/node()'
+          <xsl:apply-templates select='d:title/node()|doc:title/node()'
             mode='doc:body'/>
         </xsl:with-param>
       </xsl:call-template>
     </xsl:if>
 
-    <xsl:apply-templates select='*[not(self::title|self::doc:title)]'
+    <xsl:apply-templates select='*[not(self::d:title|self::doc:title)]'
       mode='doc:body'>
       <xsl:with-param name='class'>abstract</xsl:with-param>
     </xsl:apply-templates>
   </xsl:template>
   <!-- TODO -->
-  <xsl:template match='authorblurb|personblurb |
+  <xsl:template match='d:authorblurb|d:personblurb |
                        doc:authorblurb|doc:personblurb'
     mode='doc:body'/>
 
   <!-- TODO: handle inline markup (eg. emphasis) -->
-  <xsl:template match='surname|firstname|honorific|lineage|othername|contrib|email|shortaffil|jobtitle|orgname|orgdiv|street|pob|postcode|city|state|country|phone|fax|citetitle |
+  <xsl:template match='d:surname|d:firstname|d:honorific|d:lineage|d:othername|d:contrib|d:email|d:shortaffil|d:jobtitle|d:orgname|d:orgdiv|d:street|d:pob|d:postcode|d:city|d:state|d:country|d:phone|d:fax|d:citetitle |
                        doc:surname|doc:firstname|doc:honorific|doc:lineage|doc:othername|doc:contrib|doc:email|doc:shortaffil|doc:jobtitle|doc:orgname|doc:orgdiv|doc:street|doc:pob|doc:postcode|doc:city|doc:state|doc:country|doc:phone|doc:fax|doc:citetitle'
     mode='doc:body'>
     <xsl:if test='preceding-sibling::*'>
       <xsl:with-param name='content' select='node()'/>
     </xsl:call-template>
   </xsl:template>
-  <xsl:template match='email|doc:email'
+  <xsl:template match='d:email|doc:email'
     mode='doc:body'>
     <xsl:variable name='address'>
       <xsl:choose>
     </xsl:call-template>
   </xsl:template>
   <!-- otheraddr often contains ulink -->
-  <xsl:template match='otheraddr|doc:otheraddr'
+  <xsl:template match='d:otheraddr|doc:otheraddr'
     mode='doc:body'>
     <xsl:choose>
-      <xsl:when test='ulink|doc:ulink'>
-        <xsl:for-each select='ulink|doc:ulink'>
+      <xsl:when test='d:ulink|doc:ulink'>
+        <xsl:for-each select='d:ulink|doc:ulink'>
           <xsl:variable name='prev'
-            select='preceding-sibling::ulink[1] |
+            select='preceding-sibling::d:ulink[1] |
                     preceding-sibling::doc:ulink[1]'/>
           <xsl:choose>
             <xsl:when test='$prev'>
               <xsl:for-each
-                select='preceding-sibling::node()[generate-id(following-sibling::*[self::ulink|self::doc:ulink][1]) = generate-id(current())]'>
+                select='preceding-sibling::node()[generate-id(following-sibling::*[self::d:ulink|self::doc:ulink][1]) = generate-id(current())]'>
                <xsl:call-template name='doc:handle-linebreaks'>
                  <xsl:with-param name='style'>otheraddr</xsl:with-param>
                </xsl:call-template>
           </xsl:choose>
           <xsl:apply-templates select='.'/>
         </xsl:for-each>
-        <xsl:if test='*[self::ulink|self::doc:ulink][last()]/following-sibling::node()'>
+        <xsl:if test='*[self::d:ulink|self::doc:ulink][last()]/following-sibling::node()'>
          <xsl:call-template name='doc:handle-linebreaks'>
            <xsl:with-param name='content'
-             select='*[self::ulink|self::doc:ulink][last()]/following-sibling::node()'/>
+             select='*[self::d:ulink|self::doc:ulink][last()]/following-sibling::node()'/>
            <xsl:with-param name='style'>otheraddr</xsl:with-param>
          </xsl:call-template>
         </xsl:if>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-  <xsl:template match='ulink|doc:ulink'
+  <xsl:template match='d:ulink|doc:ulink'
     mode='doc:body'>
     <xsl:call-template name='doc:make-hyperlink'>
       <xsl:with-param name='target' select='@url'/>
   </xsl:template>
 
   <!-- Cannot round-trip this element -->
-  <xsl:template match='personname|doc:personname'
+  <xsl:template match='d:personname|doc:personname'
     mode='doc:body'>
     <xsl:apply-templates mode='doc:body'/>
   </xsl:template>
 
-  <xsl:template match='releaseinfo|doc:releaseinfo'
+  <xsl:template match='d:releaseinfo|doc:releaseinfo'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
       <xsl:with-param name='style'
-        select='"releaseinfo"'/>
+        select='"d:releaseinfo"'/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='para|doc:para'
+  <xsl:template match='d:para|doc:para'
     mode='doc:body'>
     <xsl:param name='class'/>
 
     <xsl:variable name='block'
-      select='blockquote|calloutlist|classsynopsis|funcsynopsis|figure|glosslist|graphic|informalfigure|informaltable|itemizedlist|literallayout|mediaobject|mediaobjectco|note|caution|warning|important|tip|orderedlist|programlisting|revhistory|segmentedlist|simplelist|table|variablelist |
+      select='d:blockquote|d:calloutlist|d:classsynopsis|d:funcsynopsis|d:figure|d:glosslist|d:graphic|d:informalfigure|d:informaltable|d:itemizedlist|d:literallayout|d:mediaobject|d:mediaobjectco|d:note|d:caution|d:warning|d:important|d:tip|d:orderedlist|d:programlisting|d:revhistory|d:segmentedlist|d:simplelist|d:table|d:variablelist |
               doc:blockquote|doc:calloutlist|doc:classsynopsis|doc:funcsynopsis|doc:figure|doc:glosslist|doc:graphic|doc:informalfigure|doc:informaltable|doc:itemizedlist|doc:literallayout|doc:mediaobject|doc:mediaobjectco|doc:note|doc:caution|doc:warning|doc:important|doc:tip|doc:orderedlist|doc:programlisting|doc:revhistory|doc:segmentedlist|doc:simplelist|doc:table|doc:variablelist'/>
 
     <xsl:choose>
               </xsl:choose>
            </xsl:with-param>
            <xsl:with-param name='content'
-                           select='following-sibling::node()[generate-id(preceding-sibling::*[self::blockquote|self::calloutlist|self::figure|self::glosslist|self::graphic|self::informalfigure|self::informaltable|self::itemizedlist|self::literallayout|self::mediaobject|self::mediaobjectco|self::note|self::caution|self::warning|self::important|self::tip|self::orderedlist|self::programlisting|self::revhistory|self::segmentedlist|self::simplelist|self::table|self::variablelist | self::doc:blockquote|self::doc:calloutlist|self::doc:figure|self::doc:glosslist|self::doc:graphic|self::doc:informalfigure|self::doc:informaltable|self::doc:itemizedlist|self::doc:literallayout|self::doc:mediaobject|self::doc:mediaobjectco|self::doc:note|self::doc:caution|self::doc:warning|self::doc:important|self::doc:tip|self::doc:orderedlist|self::doc:programlisting|self::doc:revhistory|self::doc:segmentedlist|self::doc:simplelist|self::doc:table|self::doc:variablelist][1]) = generate-id(current())]'/>
+                           select='following-sibling::node()[generate-id(preceding-sibling::*[self::d:blockquote|self::d:calloutlist|self::d:figure|self::d:glosslist|self::d:graphic|self::d:informalfigure|self::d:informaltable|self::d:itemizedlist|self::d:literallayout|self::d:mediaobject|self::d:mediaobjectco|self::d:note|self::d:caution|self::d:warning|self::d:important|self::d:tip|self::d:orderedlist|self::d:programlisting|self::d:revhistory|self::d:segmentedlist|self::d:simplelist|self::d:table|self::d:variablelist | self::doc:blockquote|self::doc:calloutlist|self::doc:figure|self::doc:glosslist|self::doc:graphic|self::doc:informalfigure|self::doc:informaltable|self::doc:itemizedlist|self::doc:literallayout|self::doc:mediaobject|self::doc:mediaobjectco|self::doc:note|self::doc:caution|self::doc:warning|self::doc:important|self::doc:tip|self::doc:orderedlist|self::doc:programlisting|self::doc:revhistory|self::doc:segmentedlist|self::doc:simplelist|self::doc:table|self::doc:variablelist][1]) = generate-id(current())]'/>
           </xsl:call-template>
         </xsl:for-each>
       </xsl:when>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-  <xsl:template match='simpara|doc:simpara'
+  <xsl:template match='d:simpara|doc:simpara'
     mode='doc:body'>
     <xsl:param name='class'/>
 
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='emphasis|doc:emphasis'
+  <xsl:template match='d:emphasis|doc:emphasis'
     mode='doc:body'>
     <xsl:call-template name='doc:make-phrase'>
       <xsl:with-param name='italic'>
       </xsl:with-param>
       <xsl:with-param name='bold'>
        <xsl:choose>
-         <xsl:when test='@role = "bold" or @role = "strong"'>1</xsl:when>
+         <xsl:when test='@role = "bold" or @role = "d:strong"'>1</xsl:when>
          <xsl:otherwise>0</xsl:otherwise>
        </xsl:choose>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='informalfigure|doc:informalfigure'
+  <xsl:template match='d:informalfigure|doc:informalfigure'
     mode='doc:body'>
-    <xsl:if test='mediaobject/imageobject/imagedata |
+    <xsl:if test='d:mediaobject/d:imageobject/d:imagedata |
                   doc:mediaobject/doc:imageobject/doc:imagedata'>
       <xsl:call-template name='doc:make-paragraph'>
        <xsl:with-param name='style' select='"informalfigure-imagedata"'/>
          <xsl:call-template name='doc:make-phrase'>
             <xsl:with-param name='style'/>
            <xsl:with-param name='content'>
-             <xsl:apply-templates select='mediaobject/imageobject/imagedata/@fileref |
+             <xsl:apply-templates select='d:mediaobject/d:imageobject/d:imagedata/@fileref |
                                            doc:mediaobject/doc:imageobject/doc:imagedata/@fileref'
                                   mode='textonly'/>
            </xsl:with-param>
        </xsl:with-param>
       </xsl:call-template>
     </xsl:if>
-    <xsl:apply-templates select='caption|doc:caption'
+    <xsl:apply-templates select='d:caption|doc:caption'
       mode='doc:body'/>
-    <xsl:for-each select='*[not(self::mediaobject|self::doc:mediaobject|self::caption|self::doc:caption)]'>
+    <xsl:for-each select='*[not(self::d:mediaobject|self::doc:mediaobject|self::d:caption|self::doc:caption)]'>
       <xsl:call-template name='doc:nomatch'/>
     </xsl:for-each>
   </xsl:template>
 
-  <xsl:template match='mediaobject|mediaobjectco |
+  <xsl:template match='d:mediaobject|d:mediaobjectco |
                        doc:mediaobject|doc:mediaobjectco'
     mode='doc:body'>
-    <xsl:apply-templates select='objectinfo/title|doc:objectinfo/doc:title'/>
-    <xsl:apply-templates select='objectinfo/subtitle|objectinfo/subtitle |
+    <xsl:apply-templates select='d:objectinfo/d:title|doc:objectinfo/doc:title'/>
+    <xsl:apply-templates select='d:objectinfo/d:subtitle|d:objectinfo/d:subtitle |
                                  doc:objectinfo/doc:subtitle|doc:objectinfo/doc:subtitle'/>
     <!-- TODO: indicate error for other children of objectinfo -->
 
-    <xsl:apply-templates select='*[not(self::objectinfo|self::doc:objectinfo)]'/>
+    <xsl:apply-templates select='*[not(self::d:objectinfo|self::doc:objectinfo)]'/>
   </xsl:template>
-  <xsl:template match='imageobject|imageobjectco|audioobject|videoobject |
+  <xsl:template match='d:imageobject|d:imageobjectco|d:audioobject|d:videoobject |
                        doc:imageobject|doc:imageobjectco|doc:audioobject|doc:videoobject'
     mode='doc:body'>
-    <xsl:apply-templates select='objectinfo/title|doc:objectinfo/doc:title'/>
-    <xsl:apply-templates select='objectinfo/subtitle|doc:objectinfo/doc:subtitle'/>
+    <xsl:apply-templates select='d:objectinfo/d:title|doc:objectinfo/doc:title'/>
+    <xsl:apply-templates select='d:objectinfo/d:subtitle|doc:objectinfo/doc:subtitle'/>
     <!-- TODO: indicate error for other children of objectinfo -->
 
-    <xsl:apply-templates select='areaspec|doc:areaspec'/>
+    <xsl:apply-templates select='d:areaspec|doc:areaspec'/>
 
     <xsl:choose>
-      <xsl:when test='imagedata|audiodata|videodata |
+      <xsl:when test='d:imagedata|d:audiodata|d:videodata |
                       doc:imagedata|doc:audiodata|doc:videodata'>
        <xsl:call-template name='doc:make-paragraph'>
          <xsl:with-param name='style'
-                         select='concat(local-name(), "-", local-name(imagedata|audiodata|videodata|doc:imagedata|doc:audiodata|doc:videodata))'/>
+                         select='concat(local-name(), "-", local-name(d:imagedata|d:audiodata|d:videodata|doc:imagedata|doc:audiodata|doc:videodata))'/>
          <xsl:with-param name='content'>
            <xsl:call-template name='doc:make-phrase'>
              <xsl:with-param name='content'>
          </xsl:with-param>
        </xsl:call-template>
       </xsl:when>
-      <xsl:when test='self::imageobjectco/imageobject/imagedata |
+      <xsl:when test='self::d:imageobjectco/d:imageobject/d:imagedata |
                       self::doc:imageobjectco/doc:imageobject/doc:imagedata'>
        <xsl:call-template name='doc:make-paragraph'>
          <xsl:with-param name='style'
        </xsl:call-template>
       </xsl:when>
     </xsl:choose>
-    <xsl:apply-templates select='calloutlist|doc:calloutlist'/>
-
-    <xsl:for-each select='*[not(self::imageobject |
-                               self::imagedata |
-                               self::audiodata |
-                               self::videodata |
-                               self::areaspec  |
-                               self::calloutlist |
+    <xsl:apply-templates select='d:calloutlist|doc:calloutlist'/>
+
+    <xsl:for-each select='*[not(self::d:imageobject |
+                               self::d:imagedata |
+                               self::d:audiodata |
+                               self::d:videodata |
+                               self::d:areaspec  |
+                               self::d:calloutlist |
                                 self::doc:imageobject |
                                self::doc:imagedata |
                                self::doc:audiodata |
       <xsl:call-template name='doc:nomatch'/>
     </xsl:for-each>
   </xsl:template>
-  <xsl:template match='textobject|doc:textobject'
+  <xsl:template match='d:textobject|doc:textobject'
     mode='doc:body'>
     <xsl:choose>
-      <xsl:when test='objectinfo/title|objectinfo|subtitle |
+      <xsl:when test='d:objectinfo/d:title|d:objectinfo|d:subtitle |
                       doc:objectinfo/doc:title|doc:objectinfo|doc:subtitle'>
-       <xsl:apply-templates select='objectinfo/title|doc:objectinfo/doc:title'
+       <xsl:apply-templates select='d:objectinfo/d:title|doc:objectinfo/doc:title'
           mode='doc:body'/>
-       <xsl:apply-templates select='objectinfo/subtitle|doc:objectinfo/doc:subtitle'
+       <xsl:apply-templates select='d:objectinfo/d:subtitle|doc:objectinfo/doc:subtitle'
           mode='doc:body'/>
        <!-- TODO: indicate error for other children of objectinfo -->
       </xsl:when>
 
       <!-- In a table, the table itself and the caption delimit the textobject -->
-      <xsl:when test='ancestor::table |
+      <xsl:when test='ancestor::d:table |
                       ancestor::doc:table |
-                      ancestor::informaltable |
+                      ancestor::d:informaltable |
                       ancestor::doc:informaltable'/>
 
       <xsl:otherwise>
       </xsl:otherwise>
     </xsl:choose>
 
-    <xsl:apply-templates select='*[not(self::objectinfo|self::doc:objectinfo)]'
+    <xsl:apply-templates select='*[not(self::d:objectinfo|self::doc:objectinfo)]'
       mode='doc:body'/>
   </xsl:template>
 
-  <xsl:template match='caption|doc:caption'
+  <xsl:template match='d:caption|doc:caption'
     mode='doc:body'>
     <xsl:choose>
       <xsl:when test='not(*)'>
         </xsl:call-template>
       </xsl:when>
       <xsl:when test='not(text()) and
-                      count(*) = count(para|doc:para) and
+                      count(*) = count(d:para|doc:para) and
                       count(*) = 1'>
         <xsl:call-template name='doc:make-paragraph'>
-          <xsl:with-param name='style' select='"caption"'/>
+          <xsl:with-param name='style' select='"d:caption"'/>
           <xsl:with-param name='content'>
             <xsl:apply-templates select='*/node()' mode='doc:body'/>
           </xsl:with-param>
         <xsl:call-template name='doc:make-paragraph'>
           <xsl:with-param name='style' select='"Caption"'/>
           <xsl:with-param name='content'>
-            <xsl:apply-templates select='*[self::para|self::doc:para][1]/node()'
+            <xsl:apply-templates select='*[self::d:para|self::doc:para][1]/node()'
               mode='doc:body'/>
           </xsl:with-param>
         </xsl:call-template>
-        <xsl:for-each select='text()|*[not(self::para|self::doc:para)]|*[self::para|self::doc:para][position() != 1]'>
+        <xsl:for-each select='text()|*[not(self::d:para|self::doc:para)]|*[self::d:para|self::doc:para][position() != 1]'>
           <xsl:call-template name='doc:nomatch'/>
         </xsl:for-each>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match='area|areaspec|doc:area|doc:areaspec'
+  <xsl:template match='d:area|d:areaspec|doc:area|doc:areaspec'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
       <xsl:with-param name='style' select='local-name()'/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='calloutlist|doc:calloutlist'
+  <xsl:template match='d:calloutlist|doc:calloutlist'
     mode='doc:body'>
-    <xsl:apply-templates select='callout|doc:callout'/>
+    <xsl:apply-templates select='d:callout|doc:callout'/>
   </xsl:template>
 
-  <xsl:template match='callout|doc:callout'
+  <xsl:template match='d:callout|doc:callout'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
-      <xsl:with-param name='style' select='"callout"'/>
+      <xsl:with-param name='style' select='"d:callout"'/>
       <xsl:with-param name='content'>
        <!-- Normally a para would be the first child of a callout -->
-       <xsl:apply-templates select='*[1][self::para|self::doc:para]/node()'
+       <xsl:apply-templates select='*[1][self::d:para|self::doc:para]/node()'
           mode='list'/>
       </xsl:with-param>
     </xsl:call-template>
     <!-- This is to catch the case where a listitem's first child is not a paragraph.
        - We may not be able to represent this properly.
       -->
-    <xsl:apply-templates select='*[1][not(self::para|self::doc:para)]'
+    <xsl:apply-templates select='*[1][not(self::d:para|self::doc:para)]'
       mode='list'/>
 
     <xsl:apply-templates select='*[position() != 1]'
       mode='list'/>
   </xsl:template>
 
-  <xsl:template match='table|informaltable |
+  <xsl:template match='d:table|d:informaltable |
                        doc:table|doc:informaltable'
     mode='doc:body'>
     <xsl:call-template name='doc:make-table'>
       <xsl:with-param name='columns'>
-        <xsl:apply-templates select='tgroup/colspec|doc:tgroup/doc:colspec'
+        <xsl:apply-templates select='d:tgroup/d:colspec|doc:tgroup/doc:colspec'
           mode='doc:column'/>
       </xsl:with-param>
     </xsl:call-template>
-    <xsl:apply-templates select='textobject|doc:textobject'
+    <xsl:apply-templates select='d:textobject|doc:textobject'
       mode='doc:body'/>
     <xsl:choose>
-      <xsl:when test='caption|doc:caption'>
-        <xsl:apply-templates select='caption|doc:caption'
+      <xsl:when test='d:caption|doc:caption'>
+        <xsl:apply-templates select='d:caption|doc:caption'
           mode='doc:body'/>
       </xsl:when>
-      <xsl:when test='textobject|doc:textobject'>
+      <xsl:when test='d:textobject|doc:textobject'>
         <!-- Synthesize a caption to delimit the textobject -->
         <xsl:call-template name='doc:make-paragraph'>
           <xsl:with-param name='style'>Caption</xsl:with-param>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match='colspec|doc:colspec' mode='doc:column'>
+  <xsl:template match='d:colspec|doc:colspec' mode='doc:column'>
     <xsl:variable name='width'>
       <xsl:choose>
         <xsl:when test='contains(@colwidth, "*")'>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='colspec|doc:colspec' mode='doc:body'/>
+  <xsl:template match='d:colspec|doc:colspec' mode='doc:body'/>
 
   <xsl:template name='doc:repeat'>
     <xsl:param name='repeats' select='0'/>
       </xsl:call-template>
     </xsl:if>
   </xsl:template>
-  <xsl:template match='tgroup|tbody|thead |
+  <xsl:template match='d:tgroup|d:tbody|d:thead |
                        doc:tgroup|doc:tbody|doc:thead'
     mode='doc:body'>
     <xsl:apply-templates mode='doc:body'/>
   </xsl:template>
-  <xsl:template match='row|doc:row' mode='doc:body'>
+  <xsl:template match='d:row|doc:row' mode='doc:body'>
     <xsl:call-template name='doc:make-table-row'>
-      <xsl:with-param name='is-header' select='boolean(parent::thead|parent::doc:thead)'/>
+      <xsl:with-param name='is-header' select='boolean(parent::d:thead|parent::doc:thead)'/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='entry|doc:entry' mode='doc:body'>
+  <xsl:template match='d:entry|doc:entry' mode='doc:body'>
 
     <!-- 
          Position = Sum(i,preceding-sibling[@colspan = ""]) + entry[i].@colspan)
 
           <xsl:variable name='combinedWidth'>
             <xsl:call-template name='doc:sum'>
-              <xsl:with-param name='nodes' select='ancestor::*[self::table|self::doc:table|self::informaltable|self::doc:informaltable][1]/*[self::tgroup|self::doc:tgroup]/*[self::colspec|self::doc:colspec][not(position() &lt; $position) and position() &lt; $limit]'/>
+              <xsl:with-param name='nodes' select='ancestor::*[self::d:table|self::doc:table|self::d:informaltable|self::doc:informaltable][1]/*[self::d:tgroup|self::doc:tgroup]/*[self::d:colspec|self::doc:colspec][not(position() &lt; $position) and position() &lt; $limit]'/>
               <xsl:with-param name='sum' select='"0"'/>
             </xsl:call-template>
           </xsl:variable>
           <xsl:value-of select='$combinedWidth'/>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:value-of select='ancestor::*[self::table|self::doc:table|self::informaltable|self::doc:informaltable][1]/*[self::tgroup|self::doc:tgroup]/*[self::colspec|self::doc:colspec][position() = $position]/@colwidth'/>
+          <xsl:value-of select='ancestor::*[self::d:table|self::doc:table|self::d:informaltable|self::doc:informaltable][1]/*[self::d:tgroup|self::doc:tgroup]/*[self::d:colspec|self::doc:colspec][position() = $position]/@colwidth'/>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
 
       <xsl:with-param name='content'>
        <xsl:choose>
-          <xsl:when test='not(para|doc:para)'>
+          <xsl:when test='not(d:para|doc:para)'>
             <!-- TODO: check for any block elements -->
            <xsl:call-template name='doc:make-paragraph'>
               <xsl:with-param name='style'/>
 
     <xsl:variable name='add'>
       <xsl:choose>
-        <xsl:when test='$node/preceding-sibling::*[self::entry|self::doc:entry]/@colspan != ""'>
-          <xsl:value-of select='$node/preceding-sibling::*[self::entry|self::doc:entry]/@colspan'/>
+        <xsl:when test='$node/preceding-sibling::*[self::d:entry|self::doc:entry]/@colspan != ""'>
+          <xsl:value-of select='$node/preceding-sibling::*[self::d:entry|self::doc:entry]/@colspan'/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select='"1"'/>
     </xsl:variable>
 
     <xsl:choose>
-      <xsl:when test='count($node/preceding-sibling::*[self::entry|self::doc:entry]) &gt; 0'>
+      <xsl:when test='count($node/preceding-sibling::*[self::d:entry|self::doc:entry]) &gt; 0'>
         <xsl:call-template name='doc:sum-sibling'>
           <xsl:with-param name='sum' select='$sum + $add'/>
           <xsl:with-param name='node'
-            select='$node/preceding-sibling::*[self::entry|self::doc:entry][1]'/>
+            select='$node/preceding-sibling::*[self::d:entry|self::doc:entry][1]'/>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
 
   </xsl:template>
 
-  <xsl:template match='*[self::para|self::simpara|self::doc:para|self::doc:simpara]/text()[string-length(normalize-space(.)) != 0]'
+  <xsl:template match='*[self::d:para|self::d:simpara|self::doc:para|self::doc:simpara]/text()[string-length(normalize-space(.)) != 0]'
     mode='doc:body'>
     <xsl:call-template name='doc:handle-linebreaks'/>
   </xsl:template>
 
-  <xsl:template match='text()[not(parent::para|parent::simpara|parent::literallayout|parent::programlisting | parent::doc:para|parent::doc:simpara|parent::doc:literallayout|parent::doc:programlisting)][string-length(normalize-space(.)) != 0]'
+  <xsl:template match='text()[not(parent::d:para|parent::d:simpara|parent::d:literallayout|parent::d:programlisting | parent::doc:para|parent::doc:simpara|parent::doc:literallayout|parent::doc:programlisting)][string-length(normalize-space(.)) != 0]'
     mode='doc:body'>
     <xsl:call-template name='doc:handle-linebreaks'/>
   </xsl:template>
   <xsl:template match='text()[string-length(normalize-space(.)) = 0]'
     mode='doc:body'/>
-  <xsl:template match='literallayout/text()|programlisting/text() |
+  <xsl:template match='d:literallayout/text()|d:programlisting/text() |
                        doc:literallayout/text()|doc:programlisting/text()'
     mode='doc:body'>
     <xsl:call-template name='doc:handle-linebreaks'/>
     </xsl:choose>
   </xsl:template>
 
-  <xsl:template match='authorblurb|formalpara|legalnotice|note|caution|warning|important|tip |
+  <xsl:template match='d:authorblurb|d:formalpara|d:legalnotice|d:note|d:caution|d:warning|d:important|d:tip |
                        doc:authorblurb|doc:formalpara|doc:legalnotice|doc:note|doc:caution|doc:warning|doc:important|doc:tip'
     mode='doc:body'>
     <xsl:apply-templates select='*'>
     </xsl:apply-templates>
   </xsl:template>
 
-  <xsl:template match='blockquote|doc:blockquote'
+  <xsl:template match='d:blockquote|doc:blockquote'
     mode='doc:body'>
-    <xsl:apply-templates select='blockinfo|title|doc:info|doc:title'
+    <xsl:apply-templates select='d:blockinfo|d:title|doc:info|doc:title'
       mode='doc:body'>
       <xsl:with-param name='class'>
         <xsl:value-of select='local-name()'/>
       </xsl:with-param>
     </xsl:apply-templates>
-    <xsl:apply-templates select='*[not(self::blockinfo|self::title|self::attribution|self::doc:info|self::doc:title|self::doc:attribution)]'
+    <xsl:apply-templates select='*[not(self::d:blockinfo|self::d:title|self::d:attribution|self::doc:info|self::doc:title|self::doc:attribution)]'
       mode='doc:body'>
-      <xsl:with-param name='class' select='"blockquote"'/>
+      <xsl:with-param name='class' select='"d:blockquote"'/>
     </xsl:apply-templates>
-    <xsl:if test='attribution|doc:attribution'>
+    <xsl:if test='d:attribution|doc:attribution'>
       <xsl:call-template name='doc:make-paragraph'>
        <xsl:with-param name='style' select='"blockquote-attribution"'/>
        <xsl:with-param name='content'>
           <xsl:call-template name='doc:make-phrase'>
             <xsl:with-param name='content'>
-              <xsl:apply-templates select='attribution/node()|doc:attribution/node()'/>
+              <xsl:apply-templates select='d:attribution/node()|doc:attribution/node()'/>
             </xsl:with-param>
           </xsl:call-template>
        </xsl:with-param>
     </xsl:if>
   </xsl:template>
 
-  <xsl:template match='literallayout|programlisting|doc:literallayout|doc:programlisting'
+  <xsl:template match='d:literallayout|d:programlisting|doc:literallayout|doc:programlisting'
     mode='doc:body'>
     <xsl:param name='class'/>
 
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='bridgehead|doc:bridgehead'
+  <xsl:template match='d:bridgehead|doc:bridgehead'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
-      <xsl:with-param name='style' select='"bridgehead"'/>
+      <xsl:with-param name='style' select='"d:bridgehead"'/>
     </xsl:call-template>
   </xsl:template>
 
-  <xsl:template match='itemizedlist|orderedlist |
+  <xsl:template match='d:itemizedlist|d:orderedlist |
                        doc:itemizedlist|doc:orderedlist'
     mode='doc:body'>
-    <xsl:apply-templates select='listitem|doc:listitem'
+    <xsl:apply-templates select='d:listitem|doc:listitem'
       mode='doc:body'/>
   </xsl:template>
 
-  <xsl:template match='listitem|doc:listitem'
+  <xsl:template match='d:listitem|doc:listitem'
     mode='doc:body'>
     <xsl:call-template name='doc:make-paragraph'>
       <xsl:with-param name='style'
                      select='concat(local-name(..), 
-                             count(ancestor::itemizedlist|ancestor::orderedlist|ancestor::doc:itemizedlist|ancestor::doc:orderedlist))'/>
+                             count(ancestor::d:itemizedlist|ancestor::d:orderedlist|ancestor::doc:itemizedlist|ancestor::doc:orderedlist))'/>
       <xsl:with-param name='is-listitem' select='true()'/>
 
       <xsl:with-param name='content'>
        <!-- Normally a para would be the first child of a listitem -->
-       <xsl:apply-templates select='*[1][self::para|self::doc:para]/node()'
+       <xsl:apply-templates select='*[1][self::d:para|self::doc:para]/node()'
           mode='doc:body'/>
       </xsl:with-param>
     </xsl:call-template>
     <!-- This is to catch the case where a listitem's first child is not a paragraph.
        - We may not be able to represent this properly.
       -->
-    <xsl:apply-templates select='*[1][not(self::para|self::doc:para)]'
+    <xsl:apply-templates select='*[1][not(self::d:para|self::doc:para)]'
       mode='doc:list-continue'/>
 
     <xsl:apply-templates select='*[position() != 1]'
       mode='doc:list-continue'/>
   </xsl:template>  
 
-  <xsl:template match='para|doc:para' mode='doc:list-continue'>
+  <xsl:template match='d:para|doc:para' mode='doc:list-continue'>
     <xsl:apply-templates select='.'
       mode='doc:body'>
       <xsl:with-param name='class' select='"para-continue"'/>
     <xsl:apply-templates select='.' mode='doc:body'/>
   </xsl:template>
 
-  <xsl:template match='variablelist|doc:variablelist'
+  <xsl:template match='d:variablelist|doc:variablelist'
     mode='doc:body'>
-    <xsl:apply-templates select='*[not(self::varlistentry|self::doc:varlistentry)]'/>
+    <xsl:apply-templates select='*[not(self::d:varlistentry|self::doc:varlistentry)]'/>
 
     <xsl:call-template name='doc:make-table'>
       <xsl:with-param name='columns'>
        </xsl:call-template>
       </xsl:with-param>
       <xsl:with-param name='rows'>
-       <xsl:apply-templates select='varlistentry|doc:varlistentry'/>
+       <xsl:apply-templates select='d:varlistentry|doc:varlistentry'/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
-  <xsl:template match='varlistentry|doc:varlistentry'
+  <xsl:template match='d:varlistentry|doc:varlistentry'
     mode='doc:body'>
     <xsl:call-template name='doc:make-table-row'>
       <xsl:with-param name='content'>
            <xsl:call-template name='doc:make-paragraph'>
              <xsl:with-param name='style' select='"variablelist-term"'/>
              <xsl:with-param name='content'>
-               <xsl:apply-templates select='*[self::term|self::doc:term][1]/node()'
+               <xsl:apply-templates select='*[self::d:term|self::doc:term][1]/node()'
                   mode='doc:body'/>
-               <xsl:for-each select='*[self::term|self::doc:term][position() != 1]'>
+               <xsl:for-each select='*[self::d:term|self::doc:term][position() != 1]'>
                  <xsl:call-template name='doc:make-phrase'>
                    <xsl:with-param name='content'>
                      <xsl:call-template name='doc:make-soft-break'/>
        </xsl:call-template>
        <xsl:call-template name='doc:make-table-cell'>
          <xsl:with-param name='content'>
-            <xsl:apply-templates select='listitem/node()|doc:listitem/node()'
+            <xsl:apply-templates select='d:listitem/node()|doc:listitem/node()'
               mode='doc:body'/>
          </xsl:with-param>
        </xsl:call-template>
      - However, they may need to be added (perhaps as hidden text)
      - for round-tripping.
     -->
-  <xsl:template match='anchor|areaset|audiodata|audioobject|
-                       beginpage|
-                       constraint|
-                       indexterm|itermset|
-                       keywordset|
-                       msg |
+  <xsl:template match='d:anchor|d:areaset|d:audiodata|d:audioobject|
+                       d:beginpage|
+                       d:constraint|
+                       d:indexterm|d:itermset|
+                       d:keywordset|
+                       d:msg |
                        doc:anchor|doc:areaset|doc:audiodata|doc:audioobject|
                        doc:beginpage|
                        doc:constraint|
 
     <xsl:for-each select='$node'>
       <xsl:choose>
-        <xsl:when test='self::abstract |
-                        self::ackno |
-                        self::address |
-                        self::answer |
-                        self::appendix |
-                        self::artheader |
-                        self::authorgroup |
-                        self::bibliodiv |
-                        self::biblioentry |
-                        self::bibliography |
-                        self::bibliomixed |
-                        self::bibliomset |
-                        self::biblioset |
-                        self::bridgehead |
-                        self::calloutlist |
-                        self::caption |
-                        self::classsynopsis |
-                        self::colophon |
-                        self::constraintdef |
-                        self::copyright |
-                        self::dedication |
-                        self::epigraph |
-                        self::equation |
-                        self::example |
-                        self::figure |
-                        self::funcsynopsis |
-                        self::glossary |
-                        self::glossdef |
-                        self::glossdiv |
-                        self::glossentry |
-                        self::glosslist |
-                        self::graphic |
-                        self::highlights |
-                        self::imageobject |
-                        self::imageobjectco |
-                        self::index |
-                        self::indexdiv |
-                        self::indexentry |
-                        self::informalequation |
-                        self::informalexample |
-                        self::informalfigure |
-                        self::lot |
-                        self::lotentry |
-                        self::mediaobject |
-                        self::mediaobjectco |
-                        self::member |
-                        self::msgentry |
-                        self::msgset |
-                        self::part |
-                        self::partintro |
-                        self::personblurb |
-                        self::preface |
-                        self::printhistory |
-                        self::procedure |
-                        self::programlisting |
-                        self::programlistingco |
-                        self::publisher |
-                        self::qandadiv |
-                        self::qandaentry |
-                        self::qandaset |
-                        self::question |
-                        self::refdescriptor |
-                        self::refentry |
-                        self::refentrytitle |
-                        self::reference |
-                        self::refmeta |
-                        self::refname |
-                        self::refnamediv |
-                        self::refpurpose |
-                        self::refsect1 |
-                        self::refsect2 |
-                        self::refsect3 |
-                        self::refsection |
-                        self::refsynopsisdiv |
-                        self::screen |
-                        self::screenco |
-                        self::screenshot |
-                        self::seg |
-                        self::seglistitem |
-                        self::segmentedlist |
-                        self::segtitle |
-                        self::set |
-                        self::setindex |
-                        self::sidebar |
-                        self::simplelist |
-                        self::simplemsgentry |
-                        self::step |
-                        self::stepalternatives |
-                        self::subjectset |
-                        self::substeps |
-                        self::task |
-                        self::textobject |
-                        self::toc |
-                        self::videodata |
-                        self::videoobject |
+        <xsl:when test='self::d:abstract |
+                        self::d:ackno |
+                        self::d:address |
+                        self::d:answer |
+                        self::d:appendix |
+                        self::d:artheader |
+                        self::d:authorgroup |
+                        self::d:bibliodiv |
+                        self::d:biblioentry |
+                        self::d:bibliography |
+                        self::d:bibliomixed |
+                        self::d:bibliomset |
+                        self::d:biblioset |
+                        self::d:bridgehead |
+                        self::d:calloutlist |
+                        self::d:caption |
+                        self::d:classsynopsis |
+                        self::d:colophon |
+                        self::d:constraintdef |
+                        self::d:copyright |
+                        self::d:dedication |
+                        self::d:epigraph |
+                        self::d:equation |
+                        self::d:example |
+                        self::d:figure |
+                        self::d:funcsynopsis |
+                        self::d:glossary |
+                        self::d:glossdef |
+                        self::d:glossdiv |
+                        self::d:glossentry |
+                        self::d:glosslist |
+                        self::d:graphic |
+                        self::d:highlights |
+                        self::d:imageobject |
+                        self::d:imageobjectco |
+                        self::d:index |
+                        self::d:indexdiv |
+                        self::d:indexentry |
+                        self::d:informalequation |
+                        self::d:informalexample |
+                        self::d:informalfigure |
+                        self::d:lot |
+                        self::d:lotentry |
+                        self::d:mediaobject |
+                        self::d:mediaobjectco |
+                        self::d:member |
+                        self::d:msgentry |
+                        self::d:msgset |
+                        self::d:part |
+                        self::d:partintro |
+                        self::d:personblurb |
+                        self::d:preface |
+                        self::d:printhistory |
+                        self::d:procedure |
+                        self::d:programlisting |
+                        self::d:programlistingco |
+                        self::d:publisher |
+                        self::d:qandadiv |
+                        self::d:qandaentry |
+                        self::d:qandaset |
+                        self::d:question |
+                        self::d:refdescriptor |
+                        self::d:refentry |
+                        self::d:refentrytitle |
+                        self::d:reference |
+                        self::d:refmeta |
+                        self::d:refname |
+                        self::d:refnamediv |
+                        self::d:refpurpose |
+                        self::d:refsect1 |
+                        self::d:refsect2 |
+                        self::d:refsect3 |
+                        self::d:refsection |
+                        self::d:refsynopsisdiv |
+                        self::d:screen |
+                        self::d:screenco |
+                        self::d:screenshot |
+                        self::d:seg |
+                        self::d:seglistitem |
+                        self::d:segmentedlist |
+                        self::d:segtitle |
+                        self::d:set |
+                        self::d:setindex |
+                        self::d:sidebar |
+                        self::d:simplelist |
+                        self::d:simplemsgentry |
+                        self::d:step |
+                        self::d:stepalternatives |
+                        self::d:subjectset |
+                        self::d:substeps |
+                        self::d:task |
+                        self::d:textobject |
+                        self::d:toc |
+                        self::d:videodata |
+                        self::d:videoobject |
 
                         self::doc:abstract |
                         self::doc:ackno |
                         self::doc:videodata |
                         self::doc:videoobject |
 
-                        self::*[not(starts-with(local-name(), "informal")) and contains(local-name(), "info")]'>
+                        self::*[not(starts-with(local-name(), "d:informal")) and contains(local-name(), "d:info")]'>
           <xsl:call-template name='doc:make-paragraph'>
-            <xsl:with-param name='style' select='"blockerror"'/>
+            <xsl:with-param name='style' select='"d:blockerror"'/>
             <xsl:with-param name='content'>
               <xsl:call-template name='doc:make-phrase'>
                 <xsl:with-param name='content'>
           </xsl:call-template>
         </xsl:when>
         <!-- Some elements are sometimes blocks, sometimes inline
-             <xsl:when test='self::affiliation |
-                             self::alt |
-                             self::attribution |
-                             self::collab |
-                             self::collabname |
-                             self::confdates |
-                             self::confgroup |
-                             self::confnum |
-                             self::confsponsor |
-                             self::conftitle |
-                             self::contractnum |
-                             self::contractsponsor |
-                             self::contrib |
-                             self::corpauthor |
-                             self::corpcredit |
-                             self::corpname |
-                             self::edition |
-                             self::editor |
-                             self::jobtitle |
-                             self::personname |
-                             self::publishername |
-                             self::remark |
+             <xsl:when test='self::d:affiliation |
+                             self::d:alt |
+                             self::d:attribution |
+                             self::d:collab |
+                             self::d:collabname |
+                             self::d:confdates |
+                             self::d:confgroup |
+                             self::d:confnum |
+                             self::d:confsponsor |
+                             self::d:conftitle |
+                             self::d:contractnum |
+                             self::d:contractsponsor |
+                             self::d:contrib |
+                             self::d:corpauthor |
+                             self::d:corpcredit |
+                             self::d:corpname |
+                             self::d:edition |
+                             self::d:editor |
+                             self::d:jobtitle |
+                             self::d:personname |
+                             self::d:publishername |
+                             self::d:remark |
 
                              self::doc:affiliation |
                              self::doc:alt |
              -->
         <xsl:otherwise>
           <xsl:call-template name='doc:make-phrase'>
-            <xsl:with-param name='style' select='"inlineerror"'/>
+            <xsl:with-param name='style' select='"d:inlineerror"'/>
             <xsl:with-param name='content'>
               <xsl:value-of select='local-name()'/>
               <xsl:text> encountered</xsl:text>
index e99c69bd38d4163204d571da755b5583ae851643..1f09eff7fb8e21886986093ef2f0684c43ffcde6 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0"?>
-<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbk="http://docbook.org/ns/docbook" xmlns:rnd="http://docbook.org/ns/docbook/roundtrip" version="1.0">
+<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:dbk="http://docbook.org/ns/docbook"
+                xmlns:rnd="http://docbook.org/ns/docbook/roundtrip"
+                version="1.0">
 <!--====================================-->
 <!--=                                  =-->
 <!--=   DO NOT EDIT THIS STYLESHEET    =-->
@@ -17,8 +20,8 @@
       <axsl:for-each select="@*">
         <axsl:copy/>
       </axsl:for-each>
-      <axsl:variable name="books" select="dbk:para[@rnd:style = &quot;book&quot; or @rnd:style = &quot;book-title&quot;]"/>
-      <axsl:variable name="toplevel-components" select="dbk:para[@rnd:style = &quot;article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;preface&quot; or @rnd:style = &quot;preface-title&quot;]"/>
+      <axsl:variable name="books" select="dbk:para[@rnd:style = &quot;d:book&quot; or @rnd:style = &quot;book-title&quot;]"/>
+      <axsl:variable name="toplevel-components" select="dbk:para[@rnd:style = &quot;d:article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;d:appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;d:chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;d:preface&quot; or @rnd:style = &quot;preface-title&quot;]"/>
       <axsl:choose>
         <axsl:when test="$books">
           <axsl:apply-templates select="$books[1]/preceding-sibling::*"/>
   <axsl:template match="dbk:para" mode="book">
     <axsl:param name="books" select="/.."/>
     <axsl:choose>
-      <axsl:when test="$books and (@rnd:style = &quot;book&quot; or @rnd:style = &quot;book-title&quot;)">
+      <axsl:when test="$books and (@rnd:style = &quot;d:book&quot; or @rnd:style = &quot;book-title&quot;)">
         <axsl:call-template name="make-book">
           <axsl:with-param name="books" select="$books"/>
-          <axsl:with-param name="book-components" select="$books[1]/preceding-sibling::dbk:para[@rnd:style = &quot;part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;preface&quot; or @rnd:style = &quot;preface-title&quot;]"/>
+          <axsl:with-param name="book-components" select="$books[1]/preceding-sibling::dbk:para[@rnd:style = &quot;d:part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;d:article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;d:appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;d:chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;d:preface&quot; or @rnd:style = &quot;preface-title&quot;]"/>
         </axsl:call-template>
       </axsl:when>
       <axsl:otherwise>
         <axsl:call-template name="make-book">
           <axsl:with-param name="books" select="$books"/>
-          <axsl:with-param name="book-components" select="following-sibling::dbk:para[@rnd:style = &quot;part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;preface&quot; or @rnd:style = &quot;preface-title&quot;]"/>
+          <axsl:with-param name="book-components" select="following-sibling::dbk:para[@rnd:style = &quot;d:part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;d:article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;d:appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;d:chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;d:preface&quot; or @rnd:style = &quot;preface-title&quot;]"/>
         </axsl:call-template>
       </axsl:otherwise>
     </axsl:choose>
   <axsl:template match="dbk:para" mode="toplevel-component">
     <axsl:param name="toplevel-components" select="/.."/>
     <axsl:choose>
-      <axsl:when test="$toplevel-components and (@rnd:style = &quot;article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;preface&quot; or @rnd:style = &quot;preface-title&quot;)">
+      <axsl:when test="$toplevel-components and (@rnd:style = &quot;d:article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;d:appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;d:chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;d:preface&quot; or @rnd:style = &quot;preface-title&quot;)">
         <axsl:call-template name="make-toplevel-component">
           <axsl:with-param name="toplevel-components" select="$toplevel-components"/>
-          <axsl:with-param name="sect1s" select="$toplevel-components[1]/preceding-sibling::dbk:para[@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
+          <axsl:with-param name="sect1s" select="$toplevel-components[1]/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
         </axsl:call-template>
       </axsl:when>
       <axsl:otherwise>
         <axsl:call-template name="make-toplevel-component">
           <axsl:with-param name="toplevel-components" select="$toplevel-components"/>
-          <axsl:with-param name="sect1s" select="following-sibling::dbk:para[@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
+          <axsl:with-param name="sect1s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
         </axsl:call-template>
       </axsl:otherwise>
     </axsl:choose>
     <axsl:param select="/.." name="book-components"/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nextbook)"/>
-      <axsl:when test="@rnd:style = &quot;part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;preface&quot; or @rnd:style = &quot;preface-title&quot;">
-        <axsl:variable name="nextbook-component" select="following-sibling::dbk:para[@rnd:style = &quot;part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;preface&quot; or @rnd:style = &quot;preface-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;d:article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;d:appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;d:chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;d:preface&quot; or @rnd:style = &quot;preface-title&quot;">
+        <axsl:variable name="nextbook-component" select="following-sibling::dbk:para[@rnd:style = &quot;d:part&quot; or @rnd:style = &quot;part-title&quot; or @rnd:style = &quot;d:article&quot; or @rnd:style = &quot;article-title&quot; or @rnd:style = &quot;d:appendix&quot; or @rnd:style = &quot;appendix-title&quot; or @rnd:style = &quot;d:chapter&quot; or @rnd:style = &quot;chapter-title&quot; or @rnd:style = &quot;d:preface&quot; or @rnd:style = &quot;preface-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextbook-component">
-            <axsl:variable name="sect1s" select="$nextbook-component/preceding-sibling::dbk:para[@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
+            <axsl:variable name="sect1s" select="$nextbook-component/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
 <!-- mode sections 1 -->
             <book-component xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect1s" select="following-sibling::dbk:para[@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
+            <axsl:variable name="sect1s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;]"/>
 <!-- mode sections 2 -->
             <book-component xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nextbook-component)"/>
       <axsl:when test="generate-id() = generate-id($nextbook)"/>
-      <axsl:when test="@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;">
-        <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;">
+        <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect1">
-            <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
+            <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect1 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
+            <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect1 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nextbook-component)"/>
       <axsl:when test="generate-id() = generate-id($nextbook)"/>
-      <axsl:when test="@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;">
-        <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;">
+        <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect2">
-            <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
+            <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect2 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
+            <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect2 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nextbook-component)"/>
       <axsl:when test="generate-id() = generate-id($nextbook)"/>
-      <axsl:when test="@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;">
-        <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;">
+        <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect3">
-            <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
+            <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect3 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
+            <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect3 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nextbook-component)"/>
       <axsl:when test="generate-id() = generate-id($nextbook)"/>
-      <axsl:when test="@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;">
-        <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;">
+        <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect4">
-            <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
+            <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect4 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
+            <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect4 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nextbook-component)"/>
       <axsl:when test="generate-id() = generate-id($nextbook)"/>
-      <axsl:when test="@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;">
-        <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;">
+        <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;][1]"/>
 <!-- mode sections 3 -->
         <sect5 xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
     <axsl:param select="/.." name="sect1s"/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
-      <axsl:when test="@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;">
-        <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = &quot;sect1&quot; or @rnd:style = &quot;sect1-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;">
+        <axsl:variable name="nextsect1" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect1&quot; or @rnd:style = &quot;sect1-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect1">
-            <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
+            <axsl:variable name="sect2s" select="$nextsect1/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect1 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
+            <axsl:variable name="sect2s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect1 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
-      <axsl:when test="@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;">
-        <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = &quot;sect2&quot; or @rnd:style = &quot;sect2-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;">
+        <axsl:variable name="nextsect2" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect2&quot; or @rnd:style = &quot;sect2-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect2">
-            <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
+            <axsl:variable name="sect3s" select="$nextsect2/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect2 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
+            <axsl:variable name="sect3s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect2 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect2)"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
-      <axsl:when test="@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;">
-        <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = &quot;sect3&quot; or @rnd:style = &quot;sect3-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;">
+        <axsl:variable name="nextsect3" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect3&quot; or @rnd:style = &quot;sect3-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect3">
-            <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
+            <axsl:variable name="sect4s" select="$nextsect3/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect3 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
+            <axsl:variable name="sect4s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect3 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect2)"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
-      <axsl:when test="@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;">
-        <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = &quot;sect4&quot; or @rnd:style = &quot;sect4-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;">
+        <axsl:variable name="nextsect4" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect4&quot; or @rnd:style = &quot;sect4-title&quot;][1]"/>
         <axsl:choose>
           <axsl:when test="$nextsect4">
-            <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
+            <axsl:variable name="sect5s" select="$nextsect4/preceding-sibling::dbk:para[@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
 <!-- mode sections 1 -->
             <sect4 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
             </axsl:if>
           </axsl:when>
           <axsl:otherwise>
-            <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
+            <axsl:variable name="sect5s" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;]"/>
 <!-- mode sections 2 -->
             <sect4 xmlns="http://docbook.org/ns/docbook">
               <axsl:call-template name="copy"/>
       <axsl:when test="generate-id() = generate-id($nextsect2)"/>
       <axsl:when test="generate-id() = generate-id($nextsect1)"/>
       <axsl:when test="generate-id() = generate-id($nexttoplevel-component)"/>
-      <axsl:when test="@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;">
-        <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = &quot;sect5&quot; or @rnd:style = &quot;sect5-title&quot;][1]"/>
+      <axsl:when test="@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;">
+        <axsl:variable name="nextsect5" select="following-sibling::dbk:para[@rnd:style = &quot;d:sect5&quot; or @rnd:style = &quot;sect5-title&quot;][1]"/>
 <!-- mode sections 3 -->
         <sect5 xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
index 131856008cb2c81b51a5c98b2f47c6420dc2e396..2f8940d7f5a31f5a5596a6055171af6d885e3a5c 100644 (file)
@@ -1,11 +1,10 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:sfa="http://developer.apple.com/namespaces/sfa"
   xmlns:sf="http://developer.apple.com/namespaces/sf"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:appsl="http://developer.apple.com/namespaces/sl"
-
   xmlns:dbk='http://docbook.org/ns/docbook'
   xmlns:rnd='http://docbook.org/ns/docbook/roundtrip'
   exclude-result-prefixes='sfa sf xsi appsl'>
@@ -52,7 +51,7 @@
             <xsl:call-template name='rnd:find-style'/>
           </xsl:variable>
           <xsl:if test='$style-name != "" and
-                        $style-name != "para"'>
+                        $style-name != "d:para"'>
             <xsl:attribute name='rnd:style'>
               <xsl:value-of select='$style-name'/>
             </xsl:attribute>
@@ -66,7 +65,7 @@
 
   <xsl:template match='sf:span'>
     <xsl:variable name='style-name'
-                 select='key("styles", @sf:style)/self::sf:characterstyle/@sf:name'/>
+                 select='key("d:styles", @sf:style)/self::sf:characterstyle/@sf:name'/>
 
     <xsl:variable name='char-style'>
       <xsl:call-template name='rnd:find-style'>
@@ -87,8 +86,8 @@
       <xsl:when test='$style-name = ""'>
         <xsl:apply-templates/>
       </xsl:when>
-      <xsl:when test='$char-style = "superscript" or
-                      $char-style = "subscript"'>
+      <xsl:when test='$char-style = "d:superscript" or
+                      $char-style = "d:subscript"'>
         <xsl:element name='{$char-style}'
           namespace='http://docbook.org/ns/docbook'>
           <xsl:apply-templates/>
               <xsl:attribute name='role'>bold</xsl:attribute>
             </xsl:when>
             <xsl:when test='$char-style != "" and
-                            $char-style != "emphasis"'>
+                            $char-style != "d:emphasis"'>
               <xsl:attribute name='rnd:style'>
                 <xsl:value-of select='$char-style'/>
               </xsl:attribute>
 
   <xsl:template match='*' mode='attribute'>
     <xsl:variable name='style-name'
-                 select='key("styles", @sf:style)/self::sf:characterstyle/@sf:name'/>
+                 select='key("d:styles", @sf:style)/self::sf:characterstyle/@sf:name'/>
 
     <xsl:if test='$style-name = "attribute-value"'>
       <xsl:apply-templates/>
 
   <xsl:template match='sf:attachment-ref'>
     <xsl:if test='@sf:kind = "tabular-attachment"'>
-      <xsl:apply-templates select='key("ids", @sfa:IDREF)'/>
+      <xsl:apply-templates select='key("d:ids", @sfa:IDREF)'/>
     </xsl:if>
   </xsl:template>
 
   <xsl:template match='sf:attachment[@sf:kind = "tabular-attachment"]'>
     <xsl:variable name='model'
-      select='key("ids", sf:tabular-info/sf:tabular-model-ref/@sfa:IDREF)'/>
+      select='key("d:ids", sf:tabular-info/sf:tabular-model-ref/@sfa:IDREF)'/>
 
     <xsl:variable name='num-cols' select='$model/sf:grid/@sf:numcols'/>
     <xsl:variable name='num-rows' select='$model/sf:grid/@sf:numrows'/>
   <xsl:template name='rnd:find-style'>
     <xsl:param name='ident' select='@sf:style'/>
     <xsl:param name='para-style-name'
-              select='key("styles", $ident)/self::sf:paragraphstyle/@sf:name'/>
+              select='key("d:styles", $ident)/self::sf:paragraphstyle/@sf:name'/>
     <xsl:param name='char-style-name'
-              select='key("styles", $ident)/self::sf:characterstyle/@sf:name'/>
+              select='key("d:styles", $ident)/self::sf:characterstyle/@sf:name'/>
 
     <xsl:choose>
       <xsl:when test='$ident = "paragraph-style-default"'/>
       <xsl:when test='$para-style-name != ""'>
        <xsl:value-of select='$para-style-name'/>
       </xsl:when>
-      <xsl:when test='key("styles", $ident)/self::sf:characterstyle/sf:property-map/sf:superscript/sf:number/@sfa:number = "1"'>superscript</xsl:when>
-      <xsl:when test='key("styles", $ident)/self::sf:characterstyle/sf:property-map/sf:subscript/sf:number/@sfa:number = "1"'>subscript</xsl:when>
+      <xsl:when test='key("d:styles", $ident)/self::sf:characterstyle/sf:property-map/sf:superscript/sf:number/@sfa:number = "1"'>superscript</xsl:when>
+      <xsl:when test='key("d:styles", $ident)/self::sf:characterstyle/sf:property-map/sf:subscript/sf:number/@sfa:number = "1"'>subscript</xsl:when>
       <xsl:when test='$char-style-name != "" or
-                     key("styles", $ident)/self::sf:characterstyle/sf:property-map/*'>
+                     key("d:styles", $ident)/self::sf:characterstyle/sf:property-map/*'>
        <xsl:value-of select='$char-style-name'/>
       </xsl:when>
     </xsl:choose>
index 2803ac07b1b083e39366cdf723784305bd19ce5d..9fd882ed9d83d2ffbf7c201f5e253289235b52b0 100644 (file)
@@ -1,5 +1,8 @@
 <?xml version="1.0"?>
-<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbk="http://docbook.org/ns/docbook" xmlns:rnd="http://docbook.org/ns/docbook/roundtrip" version="1.0">
+<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:dbk="http://docbook.org/ns/docbook"
+                xmlns:rnd="http://docbook.org/ns/docbook/roundtrip"
+                version="1.0">
 <!--====================================-->
 <!--=                                  =-->
 <!--=   DO NOT EDIT THIS STYLESHEET    =-->
@@ -13,7 +16,7 @@
   <axsl:strip-space elements="*"/>
   <axsl:preserve-space elements="dbk:para dbk:emphasis"/>
   <axsl:template match="dbk:appendix |&#10;  dbk:article |&#10;  dbk:book |&#10;  dbk:chapter |&#10;  dbk:part |&#10;  dbk:preface |&#10;  dbk:section |&#10;  dbk:sect1 |&#10;  dbk:sect2 |&#10;  dbk:sect3 |&#10;  dbk:sect4 |&#10;  dbk:sect5">
-    <axsl:variable name="subsections" select="dbk:para[@rnd:style = &quot;bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]"/>
+    <axsl:variable name="subsections" select="dbk:para[@rnd:style = &quot;d:bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;d:glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;d:qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]"/>
     <axsl:copy>
       <axsl:apply-templates select="@*"/>
       <axsl:choose>
@@ -33,9 +36,9 @@
       </axsl:choose>
     </axsl:copy>
     <axsl:choose>
-      <axsl:when test="following-sibling::*[self::dbk:appendix |&#10;  self::dbk:article |&#10;  self::dbk:book |&#10;  self::dbk:chapter |&#10;  self::dbk:part |&#10;  self::dbk:preface |&#10;  self::dbk:section |&#10;  self::dbk:sect1 |&#10;  self::dbk:sect2 |&#10;  self::dbk:sect3 |&#10;  self::dbk:sect4 |&#10;  self::dbk:sect5] | following-sibling::dbk:para[@rnd:style = &quot;bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]">
-        <axsl:variable name="nextComponent" select="following-sibling::*[self::dbk:appendix |&#10;  self::dbk:article |&#10;  self::dbk:book |&#10;  self::dbk:chapter |&#10;  self::dbk:part |&#10;  self::dbk:preface |&#10;  self::dbk:section |&#10;  self::dbk:sect1 |&#10;  self::dbk:sect2 |&#10;  self::dbk:sect3 |&#10;  self::dbk:sect4 |&#10;  self::dbk:sect5|self::dbk:para[@rnd:style = &quot;bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]][1]"/>
-        <axsl:apply-templates select="following-sibling::*[generate-id(following-sibling::*[self::dbk:appendix |&#10;  self::dbk:article |&#10;  self::dbk:book |&#10;  self::dbk:chapter |&#10;  self::dbk:part |&#10;  self::dbk:preface |&#10;  self::dbk:section |&#10;  self::dbk:sect1 |&#10;  self::dbk:sect2 |&#10;  self::dbk:sect3 |&#10;  self::dbk:sect4 |&#10;  self::dbk:sect5|self::dbk:para[@rnd:style = &quot;bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]][1]) = generate-id($nextComponent)]"/>
+      <axsl:when test="following-sibling::*[self::dbk:appendix |&#10;  self::dbk:article |&#10;  self::dbk:book |&#10;  self::dbk:chapter |&#10;  self::dbk:part |&#10;  self::dbk:preface |&#10;  self::dbk:section |&#10;  self::dbk:sect1 |&#10;  self::dbk:sect2 |&#10;  self::dbk:sect3 |&#10;  self::dbk:sect4 |&#10;  self::dbk:sect5] | following-sibling::dbk:para[@rnd:style = &quot;d:bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;d:glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;d:qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]">
+        <axsl:variable name="nextComponent" select="following-sibling::*[self::dbk:appendix |&#10;  self::dbk:article |&#10;  self::dbk:book |&#10;  self::dbk:chapter |&#10;  self::dbk:part |&#10;  self::dbk:preface |&#10;  self::dbk:section |&#10;  self::dbk:sect1 |&#10;  self::dbk:sect2 |&#10;  self::dbk:sect3 |&#10;  self::dbk:sect4 |&#10;  self::dbk:sect5|self::dbk:para[@rnd:style = &quot;d:bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;d:glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;d:qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]][1]"/>
+        <axsl:apply-templates select="following-sibling::*[generate-id(following-sibling::*[self::dbk:appendix |&#10;  self::dbk:article |&#10;  self::dbk:book |&#10;  self::dbk:chapter |&#10;  self::dbk:part |&#10;  self::dbk:preface |&#10;  self::dbk:section |&#10;  self::dbk:sect1 |&#10;  self::dbk:sect2 |&#10;  self::dbk:sect3 |&#10;  self::dbk:sect4 |&#10;  self::dbk:sect5|self::dbk:para[@rnd:style = &quot;d:bibliography&quot; or @rnd:style = &quot;bibliography-title&quot; or @rnd:style = &quot;d:glossary&quot; or @rnd:style = &quot;glossary-title&quot; or @rnd:style = &quot;d:qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;]][1]) = generate-id($nextComponent)]"/>
       </axsl:when>
       <axsl:otherwise>
         <axsl:apply-templates select="following-sibling::*"/>
   <axsl:template match="dbk:para" mode="subsections">
     <axsl:param name="subsections" select="/.."/>
     <axsl:choose>
-      <axsl:when test="@rnd:style = &quot;bibliography&quot; or @rnd:style = &quot;bibliography-title&quot;">
+      <axsl:when test="@rnd:style = &quot;d:bibliography&quot; or @rnd:style = &quot;bibliography-title&quot;">
         <bibliography xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
-          <axsl:variable name="bibliodivs" select="following-sibling::dbk:para[@rnd:style = &quot;bibliodiv&quot; or @rnd:style = &quot;bibliodiv-title&quot;]"/>
+          <axsl:variable name="bibliodivs" select="following-sibling::dbk:para[@rnd:style = &quot;d:bibliodiv&quot; or @rnd:style = &quot;bibliodiv-title&quot;]"/>
           <axsl:choose>
             <axsl:when test="$bibliodivs">
               <axsl:apply-templates select="following-sibling::*[1]" mode="bibliodivs">
           </axsl:choose>
         </bibliography>
       </axsl:when>
-      <axsl:when test="@rnd:style = &quot;glossary&quot; or @rnd:style = &quot;glossary-title&quot;">
+      <axsl:when test="@rnd:style = &quot;d:glossary&quot; or @rnd:style = &quot;glossary-title&quot;">
         <glossary xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
-          <axsl:variable name="glossdivs" select="following-sibling::dbk:para[@rnd:style = &quot;glossdiv&quot; or @rnd:style = &quot;glossdiv-title&quot;]"/>
+          <axsl:variable name="glossdivs" select="following-sibling::dbk:para[@rnd:style = &quot;d:glossdiv&quot; or @rnd:style = &quot;glossdiv-title&quot;]"/>
           <axsl:choose>
             <axsl:when test="$glossdivs">
               <axsl:apply-templates select="following-sibling::*[1]" mode="glossdivs">
           </axsl:choose>
         </glossary>
       </axsl:when>
-      <axsl:when test="@rnd:style = &quot;qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;">
+      <axsl:when test="@rnd:style = &quot;d:qandaset&quot; or @rnd:style = &quot;qandaset-title&quot;">
         <qandaset xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
-          <axsl:variable name="qandadivs" select="following-sibling::dbk:para[@rnd:style = &quot;qandadiv&quot; or @rnd:style = &quot;qandadiv-title&quot;]"/>
+          <axsl:variable name="qandadivs" select="following-sibling::dbk:para[@rnd:style = &quot;d:qandadiv&quot; or @rnd:style = &quot;qandadiv-title&quot;]"/>
           <axsl:choose>
             <axsl:when test="$qandadivs">
               <axsl:apply-templates select="following-sibling::*[1]" mode="qandadivs">
     <axsl:param name="bibliodivs" select="/.."/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nextSubsection)"/>
-      <axsl:when test="@rnd:style = &quot;bibliodiv&quot; or @rnd:style = &quot;bibliodiv-title&quot;">
+      <axsl:when test="@rnd:style = &quot;d:bibliodiv&quot; or @rnd:style = &quot;bibliodiv-title&quot;">
         <bibliodiv xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
           <axsl:apply-templates select="following-sibling::*[1]" mode="terminal">
     <axsl:param name="glossdivs" select="/.."/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nextSubsection)"/>
-      <axsl:when test="@rnd:style = &quot;glossdiv&quot; or @rnd:style = &quot;glossdiv-title&quot;">
+      <axsl:when test="@rnd:style = &quot;d:glossdiv&quot; or @rnd:style = &quot;glossdiv-title&quot;">
         <glossdiv xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
           <axsl:apply-templates select="following-sibling::*[1]" mode="terminal">
     <axsl:param name="qandadivs" select="/.."/>
     <axsl:choose>
       <axsl:when test="generate-id() = generate-id($nextSubsection)"/>
-      <axsl:when test="@rnd:style = &quot;qandadiv&quot; or @rnd:style = &quot;qandadiv-title&quot;">
+      <axsl:when test="@rnd:style = &quot;d:qandadiv&quot; or @rnd:style = &quot;qandadiv-title&quot;">
         <qandadiv xmlns="http://docbook.org/ns/docbook">
           <axsl:call-template name="copy"/>
           <axsl:apply-templates select="following-sibling::*[1]" mode="terminal">
index bfadfac4c797216dc4caee66e687dbea9ce3581d..cdbf3d8617d691bdd33b9130d0a03a5bd8d75624 100644 (file)
@@ -1,5 +1,6 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
   xmlns:v="urn:schemas-microsoft-com:vml"
   xmlns:w10="urn:schemas-microsoft-com:office:word"
@@ -72,7 +73,7 @@
             </xsl:attribute>
           </xsl:if>
 
-          <xsl:if test='w:r[1][w:rPr/w:rStyle/@w:val = "attributes"] and
+          <xsl:if test='w:r[1][w:rPr/w:rStyle/@w:val = "d:attributes"] and
                         w:r[2][w:rPr/w:rStyle/@w:val = "CommentReference"]'>
             <xsl:apply-templates select='w:r[2]//w:r[w:rPr/w:rStyle/@w:val = "attribute-name"]'
               mode='rnd:attributes'/>
     </xsl:variable>
 
     <xsl:choose>
-      <xsl:when test='w:rPr/w:rStyle/@w:val = "attributes"'/>
+      <xsl:when test='w:rPr/w:rStyle/@w:val = "d:attributes"'/>
       <xsl:when test='w:rPr/w:rStyle/@w:val = "CommentReference"'/>
       <xsl:when test='w:pict'>
         <!-- "filename" is where the image data gets extracted to -->
         </dbk:inlinemediaobject>
       </xsl:when>
       <xsl:when test='$do-vert-align and
-                      w:rPr/w:vertAlign/@w:val = "subscript"'>
+                      w:rPr/w:vertAlign/@w:val = "d:subscript"'>
         <dbk:subscript>
           <xsl:apply-templates select='.'>
             <xsl:with-param name='do-vert-align' select='false()'/>
         </dbk:subscript>
       </xsl:when>
       <xsl:when test='$do-vert-align and
-                      w:rPr/w:vertAlign/@w:val = "superscript"'>
+                      w:rPr/w:vertAlign/@w:val = "d:superscript"'>
         <dbk:superscript>
           <xsl:apply-templates select='.'>
             <xsl:with-param name='do-vert-align' select='false()'/>
 
   <xsl:template match='w:tbl'>
     <xsl:variable name='tbl.style'
-      select='key("style", w:tblPr/w:tblStyle/@w:val) | .'/>
+      select='key("d:style", w:tblPr/w:tblStyle/@w:val) | .'/>
 
     <xsl:variable name='border.top'>
       <xsl:choose>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:top[not(@w:val = "nil" or @w:val = "none")]'>1</xsl:when>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:top[@w:val = "nil" or @w:val = "none"]'>0</xsl:when>
-        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:top[not(@w:val = "nil" or @w:val = "none")]]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:top[not(@w:val = "d:nil" or @w:val = "d:none")]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:top[@w:val = "d:nil" or @w:val = "d:none"]'>0</xsl:when>
+        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:top[not(@w:val = "d:nil" or @w:val = "d:none")]]'>1</xsl:when>
         <xsl:otherwise>0</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
     <xsl:variable name='border.bottom'>
       <xsl:choose>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:bottom[not(@w:val = "nil" or @w:val = "none")]'>1</xsl:when>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:bottom[@w:val = "nil" or @w:val = "none"]'>0</xsl:when>
-        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:bottom[not(@w:val = "nil" or @w:val = "none")]]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:bottom[not(@w:val = "d:nil" or @w:val = "d:none")]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:bottom[@w:val = "d:nil" or @w:val = "d:none"]'>0</xsl:when>
+        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:bottom[not(@w:val = "d:nil" or @w:val = "d:none")]]'>1</xsl:when>
         <xsl:otherwise>0</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
     <xsl:variable name='border.left'>
       <xsl:choose>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:left[not(@w:val = "nil" or @w:val = "none")]'>1</xsl:when>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:left[@w:val = "nil" or @w:val = "none"]'>0</xsl:when>
-        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:left[not(@w:val = "nil" or @w:val = "none")]]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:left[not(@w:val = "d:nil" or @w:val = "d:none")]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:left[@w:val = "d:nil" or @w:val = "d:none"]'>0</xsl:when>
+        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:left[not(@w:val = "d:nil" or @w:val = "d:none")]]'>1</xsl:when>
         <xsl:otherwise>0</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
     <xsl:variable name='border.right'>
       <xsl:choose>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:right[not(@w:val = "nil" or @w:val = "none")]'>1</xsl:when>
-        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:right[@w:val = "nil" or @w:val = "none"]'>0</xsl:when>
-        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:rightt[not(@w:val = "nil" or @w:val = "none")]]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:right[not(@w:val = "d:nil" or @w:val = "d:none")]'>1</xsl:when>
+        <xsl:when test='$tbl.style/w:tblPr/w:tblBorders/w:right[@w:val = "d:nil" or @w:val = "d:none"]'>0</xsl:when>
+        <xsl:when test='w:tr[1]/w:tc[w:tcPr/w:tcBorders/w:rightt[not(@w:val = "d:nil" or @w:val = "d:none")]]'>1</xsl:when>
         <xsl:otherwise>0</xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
   <xsl:template match='w:tc'>
     <xsl:variable name='tbl.style'
       select='ancestor::w:tbl[1] |
-              key("style", ancestor::w:tbl[1]/w:tblPr/w:tblStyle/@w:val)'/>
+              key("d:style", ancestor::w:tbl[1]/w:tblPr/w:tblStyle/@w:val)'/>
 
     <dbk:entry>
-      <xsl:if test='$tbl.style/w:tblPr/w:tblBorders/w:insideH[not(@w:val = "nil" or @w:val = "none")] |
-                    w:tcPr/w:tcBorders/w:bottom[not(@w:val = "nil" or @w:val = "none")]'>
+      <xsl:if test='$tbl.style/w:tblPr/w:tblBorders/w:insideH[not(@w:val = "d:nil" or @w:val = "d:none")] |
+                    w:tcPr/w:tcBorders/w:bottom[not(@w:val = "d:nil" or @w:val = "d:none")]'>
         <xsl:attribute name='rowsep'>1</xsl:attribute>
       </xsl:if>
-      <xsl:if test='$tbl.style/w:tblPr/w:tblBorders/w:insideV[not(@w:val = "nil" or @w:val = "none")] |
-                    w:tcPr/w:tcBorders/w:right[not(@w:val = "nil" or @w:val = "none")]'>
+      <xsl:if test='$tbl.style/w:tblPr/w:tblBorders/w:insideV[not(@w:val = "d:nil" or @w:val = "d:none")] |
+                    w:tcPr/w:tcBorders/w:right[not(@w:val = "d:nil" or @w:val = "d:none")]'>
         <xsl:attribute name='colsep'>1</xsl:attribute>
       </xsl:if>
 
         </xsl:attribute>
       </xsl:if>
 
-      <xsl:if test='w:tcPr/w:vmerge[@w:val = "restart"]'>
+      <xsl:if test='w:tcPr/w:vmerge[@w:val = "d:restart"]'>
         <xsl:attribute name='morerows'>
           <xsl:call-template name='rnd:count-rowspan'>
             <xsl:with-param name='row' select='../following-sibling::w:tr[1]'/>
       <xsl:when test='not($cell)'>
         <xsl:text>0</xsl:text>
       </xsl:when>
-      <xsl:when test='$cell/w:tcPr/w:vmerge[not(@w:val = "restart")]'>
+      <xsl:when test='$cell/w:tcPr/w:vmerge[not(@w:val = "d:restart")]'>
         <xsl:variable name='remainder'>
           <xsl:call-template name='rnd:count-rowspan'>
             <xsl:with-param name='row'
index d4ae87b2db2ea58c1ed804ca0e93938e93dc2fa7..9c2cd4f055e2af9c1c5d14a00bee6700328958ec 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
                xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
                 xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
                 xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:exsl="http://exslt.org/common"
-                exclude-result-prefixes="doc t param exsl"
+                exclude-result-prefixes="doc t param exsl d"
                 version='1.0'>
 
 <!-- ********************************************************************
@@ -17,7 +18,7 @@
      ******************************************************************** -->
 
 <!-- ==================================================================== -->
-<xsl:variable name="db.prefix"></xsl:variable>
+<xsl:variable name="db.prefix">d:</xsl:variable>
 
 <xsl:template match="/">
   <xsl:text>&#x0a;</xsl:text>
index 4f18ad85d8889ca418d0c590a5e31ec173fe69be..41787e9e68290fa4d76468082361050c381e2827 100644 (file)
@@ -1,70 +1,75 @@
 <?xml version="1.0"?>
 
-<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
+<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml"
+               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               version="1.0"
+               exclude-result-prefixes="exsl d">
 
 <!-- This stylesheet was created by template/titlepage.xsl-->
 
 <xsl:template name="article.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="articleinfo/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
+    <xsl:when test="d:articleinfo/d:title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="artheader/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
+    <xsl:when test="d:artheader/d:title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="articleinfo/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
+    <xsl:when test="d:articleinfo/d:subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="artheader/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
+    <xsl:when test="d:artheader/d:subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
-  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:articleinfo/d:revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:artheader/d:revhistory"/>
+  <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="article.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="article.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="article.titlepage.recto.style">
 <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="set.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="setinfo/title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
+    <xsl:when test="d:setinfo/d:title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="setinfo/subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
+    <xsl:when test="d:setinfo/d:subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
-  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:author"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:othercredit"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:copyright"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:pubdate"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:revision"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:setinfo/d:revhistory"/>
+  <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="set.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="set.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="set.titlepage.recto.style">
 <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="book.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="bookinfo/title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+    <xsl:when test="d:bookinfo/d:title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="bookinfo/subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+    <xsl:when test="d:bookinfo/d:subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
-  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:author"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:othercredit"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:copyright"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:pubdate"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:revision"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:bookinfo/d:revhistory"/>
+  <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="book.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="book.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="book.titlepage.recto.style">
 <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
 </div>
 <xsl:template name="part.titlepage.recto">
   <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:call-template name="division.title">
-<xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:part[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="partinfo/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
+    <xsl:when test="d:partinfo/d:subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:author"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:othercredit"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:copyright"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:pubdate"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:revision"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:partinfo/d:revhistory"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="part.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="part.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="part.titlepage.recto.style">
 <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="partintro.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="partintroinfo/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
+    <xsl:when test="d:partintroinfo/d:title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="partintroinfo/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
+    <xsl:when test="d:partintroinfo/d:subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:partintroinfo/d:revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="partintro.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="partintro.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
 <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="reference.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="referenceinfo/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
+    <xsl:when test="d:referenceinfo/d:title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="referenceinfo/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
+    <xsl:when test="d:referenceinfo/d:subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:referenceinfo/d:revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="reference.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="reference.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="reference.titlepage.recto.style">
 <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
 </div>
 <xsl:template name="dedication.titlepage.recto">
   <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
 <xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:dedication[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="dedicationinfo/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
+    <xsl:when test="d:dedicationinfo/d:subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:dedicationinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="dedication.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
 <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
 </div>
 <xsl:template name="acknowledgements.titlepage.recto">
   <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
 <xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:acknowledgements[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="acknowledgementsinfo/subtitle">
-      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
+    <xsl:when test="d:acknowledgementsinfo/d:subtitle">
+      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:acknowledgementsinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
 <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="preface.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="prefaceinfo/title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
+    <xsl:when test="d:prefaceinfo/d:title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="prefaceinfo/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
+    <xsl:when test="d:prefaceinfo/d:subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:prefaceinfo/d:revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="preface.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="preface.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="preface.titlepage.recto.style">
 <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="chapter.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="chapterinfo/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
+    <xsl:when test="d:chapterinfo/d:title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="chapterinfo/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
+    <xsl:when test="d:chapterinfo/d:subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:chapterinfo/d:revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="chapter.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="chapter.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
 <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="topic.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="topicinfo/title">
-      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/title"/>
+    <xsl:when test="d:topicinfo/d:title">
+      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="topicinfo/subtitle">
-      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/subtitle"/>
+    <xsl:when test="d:topicinfo/d:subtitle">
+      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/corpauthor"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/authorgroup"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/author"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/othercredit"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/releaseinfo"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/copyright"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/legalnotice"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/pubdate"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/revision"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/revhistory"/>
-  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:author"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:othercredit"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:copyright"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:pubdate"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:revision"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:topicinfo/d:revhistory"/>
+  <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="topic.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="topic.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="topic.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="topic.titlepage.recto.style">
 <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="appendix.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="appendixinfo/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
+    <xsl:when test="d:appendixinfo/d:title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="appendixinfo/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
+    <xsl:when test="d:appendixinfo/d:subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:appendixinfo/d:revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="appendix.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="appendix.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
 <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="section.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sectioninfo/title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
+    <xsl:when test="d:sectioninfo/d:title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sectioninfo/subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
+    <xsl:when test="d:sectioninfo/d:subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
-  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:corpauthor"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:authorgroup"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:author"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:othercredit"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:copyright"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:legalnotice"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:pubdate"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:revision"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:sectioninfo/d:revhistory"/>
+  <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="section.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="section.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="section.titlepage.recto.style">
 <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="sect1.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sect1info/title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
+    <xsl:when test="d:sect1info/d:title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sect1info/subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
+    <xsl:when test="d:sect1info/d:subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
-  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:author"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:othercredit"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:copyright"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:pubdate"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:revision"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:sect1info/d:revhistory"/>
+  <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="sect1.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="sect1.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="sect2.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sect2info/title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
+    <xsl:when test="d:sect2info/d:title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sect2info/subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
+    <xsl:when test="d:sect2info/d:subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
-  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:author"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:othercredit"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:copyright"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:pubdate"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:revision"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:sect2info/d:revhistory"/>
+  <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="sect2.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="sect2.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="sect3.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sect3info/title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
+    <xsl:when test="d:sect3info/d:title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sect3info/subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
+    <xsl:when test="d:sect3info/d:subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
-  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:author"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:othercredit"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:copyright"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:pubdate"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:revision"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:sect3info/d:revhistory"/>
+  <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="sect3.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="sect3.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="sect4.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sect4info/title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
+    <xsl:when test="d:sect4info/d:title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sect4info/subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
+    <xsl:when test="d:sect4info/d:subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
-  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:author"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:othercredit"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:copyright"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:pubdate"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:revision"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:sect4info/d:revhistory"/>
+  <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="sect4.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="sect4.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="sect5.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sect5info/title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
+    <xsl:when test="d:sect5info/d:title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sect5info/subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
+    <xsl:when test="d:sect5info/d:subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
-  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:author"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:othercredit"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:copyright"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:pubdate"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:revision"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:sect5info/d:revhistory"/>
+  <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="sect5.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="sect5.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="simplesect.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="simplesectinfo/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
+    <xsl:when test="d:simplesectinfo/d:title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="simplesectinfo/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
+    <xsl:when test="d:simplesectinfo/d:subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
-  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:corpauthor"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:authorgroup"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:author"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:othercredit"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:releaseinfo"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:copyright"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:legalnotice"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:pubdate"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:revision"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:simplesectinfo/d:revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:docinfo/d:revhistory"/>
+  <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="d:info/d:revhistory"/>
 </xsl:template>
 
 <xsl:template name="simplesect.titlepage.verso">
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:corpauthor" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:authorgroup" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:author" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:othercredit" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:copyright" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:legalnotice" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:pubdate" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:revision" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
+<xsl:template match="d:revhistory" mode="simplesect.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
 <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
 </div>
 <xsl:template name="bibliography.titlepage.recto">
   <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
 <xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:bibliography[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="bibliographyinfo/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
+    <xsl:when test="d:bibliographyinfo/d:subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:bibliographyinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="bibliography.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
 <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
 </div>
 <xsl:template name="glossary.titlepage.recto">
   <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
 <xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:glossary[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="glossaryinfo/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
+    <xsl:when test="d:glossaryinfo/d:subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:glossaryinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="glossary.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
 <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
 </div>
 <xsl:template name="index.titlepage.recto">
   <div xsl:use-attribute-sets="index.titlepage.recto.style">
 <xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:index[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="indexinfo/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
+    <xsl:when test="d:indexinfo/d:subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:indexinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="index.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="index.titlepage.recto.style">
 <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
 </div>
 <xsl:template name="setindex.titlepage.recto">
   <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
 <xsl:call-template name="component.title">
-<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
+<xsl:with-param name="node" select="ancestor-or-self::d:setindex[1]"/>
 </xsl:call-template></div>
   <xsl:choose>
-    <xsl:when test="setindexinfo/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
+    <xsl:when test="d:setindexinfo/d:subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:setindexinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="setindex.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
 <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
 </div>
 
 <xsl:template name="sidebar.titlepage.recto">
   <xsl:choose>
-    <xsl:when test="sidebarinfo/title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
+    <xsl:when test="d:sidebarinfo/d:title">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:sidebarinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="docinfo/title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
+    <xsl:when test="d:docinfo/d:title">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:docinfo/d:title"/>
     </xsl:when>
-    <xsl:when test="info/title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
+    <xsl:when test="d:info/d:title">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:info/d:title"/>
     </xsl:when>
-    <xsl:when test="title">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
+    <xsl:when test="d:title">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:title"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:choose>
-    <xsl:when test="sidebarinfo/subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
+    <xsl:when test="d:sidebarinfo/d:subtitle">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:sidebarinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="docinfo/subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+    <xsl:when test="d:docinfo/d:subtitle">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:docinfo/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="info/subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
+    <xsl:when test="d:info/d:subtitle">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:info/d:subtitle"/>
     </xsl:when>
-    <xsl:when test="subtitle">
-      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
+    <xsl:when test="d:subtitle">
+      <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="d:subtitle"/>
     </xsl:when>
   </xsl:choose>
 
   <xsl:apply-templates select="." mode="titlepage.mode"/>
 </xsl:template>
 
-<xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
+<xsl:template match="d:title" mode="sidebar.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
 <xsl:call-template name="formal.object.heading">
-<xsl:with-param name="object" select="ancestor-or-self::sidebar[1]"/>
+<xsl:with-param name="object" select="ancestor-or-self::d:sidebar[1]"/>
 </xsl:call-template>
 </div>
 </xsl:template>
 
-<xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
+<xsl:template match="d:subtitle" mode="sidebar.titlepage.recto.auto.mode">
 <div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
 <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
 </div>
index 166ce53900d1c0069f280a744f2c313f971149ff..125bbb9cc92ee29f6809a27bb32f8a0dc3271e61 100644 (file)
@@ -1,10 +1,11 @@
 <xsl:stylesheet
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-        xmlns:exsl="http://exslt.org/common"
+        xmlns:d="http://docbook.org/ns/docbook"
+       xmlns:exsl="http://exslt.org/common"
         xmlns:ng="http://docbook.org/docbook-ng" 
         xmlns:db="http://docbook.org/ns/docbook"
         version="1.0" xmlns="http://www.w3.org/1999/xhtml"
-       exclude-result-prefixes="exsl ng db">
+       exclude-result-prefixes="exsl ng db d">
 
     <!-- ********************************************************************
 
@@ -378,19 +379,19 @@ border: none; background: none; font-weight: none; color: none; }
          stylesheets for DocBook5 if you don't want to use this feature.-->
          <!-- include extra test for Xalan quirk -->
           <xsl:when test="$exsl.node.set.available != 0 and 
-                  namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+                  namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
                <xsl:call-template name="log.message">
                  <xsl:with-param name="level">Note</xsl:with-param>
                  <xsl:with-param name="source" select="$doc.title"/>
                  <xsl:with-param name="context-desc">
-                       <xsl:text>namesp. cut</xsl:text>
+                       <xsl:text>namesp. add</xsl:text>
                  </xsl:with-param>
                  <xsl:with-param name="message">
-                       <xsl:text>stripped namespace before processing</xsl:text>
+                       <xsl:text>added namespace before processing</xsl:text>
                  </xsl:with-param>
                </xsl:call-template>
                <xsl:variable name="nons">
-        <xsl:apply-templates mode="stripNS"/>
+        <xsl:apply-templates mode="addNS"/>
       </xsl:variable>
                <!--
                <xsl:message>Saving stripped document.</xsl:message>
@@ -405,9 +406,9 @@ border: none; background: none; font-weight: none; color: none; }
                <xsl:apply-templates select="exsl:node-set($nons)"/>
          </xsl:when>
           <!-- Can't process unless namespace fixed with exsl node-set()-->
-          <xsl:when test="namespace-uri(/*) = 'http://docbook.org/ns/docbook'">
+          <xsl:when test="namespace-uri(/*) != 'http://docbook.org/ns/docbook'">
             <xsl:message terminate="yes">
-              <xsl:text>Unable to strip the namespace from DB5 document,</xsl:text>
+              <xsl:text>Unable to add the namespace from DB4 document,</xsl:text>
               <xsl:text> cannot proceed.</xsl:text>
             </xsl:message>
           </xsl:when>
@@ -787,7 +788,7 @@ border: none; background: none; font-weight: none; color: none; }
 
     <!-- Generates the webhelp table-of-contents (TOC). -->
     <xsl:template
-            match="book|part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv|index|setindex"
+            match="d:book|d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:simplesect|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv|d:index|d:setindex"
             mode="webhelptoc">
         <xsl:param name="currentid"/>
         <xsl:variable name="title">
@@ -815,7 +816,7 @@ border: none; background: none; font-weight: none; color: none; }
 
         <xsl:variable name="id" select="generate-id(.)"/>
 
-        <xsl:if test="not(self::index) or (self::index and not($generate.index = 0))">
+        <xsl:if test="not(self::d:index) or (self::d:index and not($generate.index = 0))">
             <!--li style="white-space: pre; line-height: 0em;"-->
             <li>
                 <xsl:if test="$id = $currentid">
@@ -826,10 +827,10 @@ border: none; background: none; font-weight: none; color: none; }
                         <xsl:value-of select="$title"/>
                     </a>
                 </span>
-                <xsl:if test="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv">
+                <xsl:if test="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:simplesect|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv">
                     <ul>
                         <xsl:apply-templates
-                                select="part|reference|preface|chapter|bibliography|appendix|article|topic|glossary|section|simplesect|sect1|sect2|sect3|sect4|sect5|refentry|colophon|bibliodiv"
+                                select="d:part|d:reference|d:preface|d:chapter|d:bibliography|d:appendix|d:article|d:topic|d:glossary|d:section|d:simplesect|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:refentry|d:colophon|d:bibliodiv"
                                 mode="webhelptoc">
                             <xsl:with-param name="currentid" select="$currentid"/>
                         </xsl:apply-templates>
@@ -870,7 +871,7 @@ border: none; background: none; font-weight: none; color: none; }
                                 </xsl:when>
                                 <xsl:otherwise>
                                     <xsl:apply-templates
-                                            select="*/*[self::preface|self::chapter|self::appendix|self::part][1]"
+                                            select="*/*[self::d:preface|self::d:chapter|self::d:appendix|self::d:part][1]"
                                             mode="chunk-filename"/>
                                 </xsl:otherwise>
                             </xsl:choose>
@@ -901,7 +902,7 @@ border: none; background: none; font-weight: none; color: none; }
                     <head>
                      <link rel="shortcut icon" href="favicon.ico"/>
                      <meta http-equiv="Refresh" content="1; URL=content/{$default.topic}"/>
-                     <title><xsl:value-of select="//title[1]"/>&#160;</title>
+                     <title><xsl:value-of select="//d:title[1]"/>&#160;</title>
                     </head>
                     <body>
                      If not automatically redirected, click <a href="content/{$default.topic}">content/<xsl:value-of select="$default.topic"/></a>
index 6def39479df188387983e9e09823d9a9ad9eda7b..95b750992daa610cc3b69f836d35a1f8d8ca82bb 100644 (file)
@@ -1,10 +1,11 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                 xmlns:exsl="http://exslt.org/common"
                 xmlns:set="http://exslt.org/sets"
                version="1.0"
-                exclude-result-prefixes="doc exsl set">
+                exclude-result-prefixes="doc exsl set d">
 
 <!-- ********************************************************************
 
index b0f411a56a3192407957a33b0dce4dcb06aed0ab..f667c9d23c86d69450f6ac5eca161c2c0141d2bd 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns="http://www.w3.org/1999/xhtml"
-  exclude-result-prefixes="exsl"
+  exclude-result-prefixes="exsl d"
   version="1.0">
 
 <!-- This is the main driver stylesheet file.  It imports or
index 33b98987bc1c1a867f458d72ea4b65afa0b14dc8..e4e84bc18f1fb8cdbb905c9095f04b5ec7732e57 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="ASCII"?>
 <!--This file was created automatically by html2xhtml-->
 <!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="cf exsl">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook"
+xmlns:exsl="http://exslt.org/common" xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="cf exsl d">
 
 <!-- ********************************************************************
 
index 2d60a8bcd4c251e84ede28af942aaf596253ce7f..92617de26ddae5ccadd4bf14eebd24f88d39cd59 100644 (file)
@@ -3,13 +3,14 @@
 ]>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  xmlns:exsl="http://exslt.org/common"
+  xmlns:d="http://docbook.org/ns/docbook"
+xmlns:exsl="http://exslt.org/common"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
   xmlns:xtbl="xalan://com.nwalsh.xalan.Table"
   xmlns:lxslt="http://xml.apache.org/xslt"
   xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
-  exclude-result-prefixes="exsl stbl xtbl lxslt ptbl"
+  exclude-result-prefixes="exsl stbl xtbl lxslt ptbl d"
   version="1.0">
 
 <xsl:import href="xhtml-docbook.xsl"/>
index b12f557302f459b4a7809b629d95270a1552d432..d27b1b8bc4053b2a671d61532e55dba06e034d75 100644 (file)
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns="http://www.w3.org/1999/xhtml"
-  exclude-result-prefixes="exsl"
+  exclude-result-prefixes="exsl d"
   version="1.0">
 
 <!-- call HTML5  header and footer templates for navigation -->
@@ -52,8 +53,8 @@
 
 <!-- Add HTML5 <header>  wrapper, and convert some attributes to styles -->
 <xsl:template name="html5.header.navigation">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:param name="nav.context"/>
 
   <xsl:variable name="content">
@@ -80,8 +81,8 @@
 
 <!-- Add HTML5 <footer>  wrapper, and convert some attributes to styles -->
 <xsl:template name="html5.footer.navigation">
-  <xsl:param name="prev" select="/foo"/>
-  <xsl:param name="next" select="/foo"/>
+  <xsl:param name="prev" select="/d:foo"/>
+  <xsl:param name="next" select="/d:foo"/>
   <xsl:param name="nav.context"/>
 
   <xsl:variable name="content">
index bcb23d514da9f47627573ecbe69abef117a628a9..35baa2881b8429eedd72c7e4288cb99ce8b823e7 100644 (file)
@@ -5,13 +5,14 @@
 ]>
 <xsl:stylesheet 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:d="http://docbook.org/ns/docbook"
   xmlns:exsl="http://exslt.org/common"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
   xmlns:xtbl="xalan://com.nwalsh.xalan.Table"
   xmlns:lxslt="http://xml.apache.org/xslt"
   xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
-  exclude-result-prefixes="exsl stbl xtbl lxslt ptbl"
+  exclude-result-prefixes="exsl stbl xtbl lxslt ptbl d"
   version="1.0">
 
 <!-- $I html5-element-mods.xsl,v 1.2 2011-09-18 17:47:28 bobs Exp $ -->
@@ -41,7 +42,7 @@
 </xsl:template>
 
 <!-- HTML5: Replace HTML acronum with abbr for HTML 5 -->
-<xsl:template match="acronym">
+<xsl:template match="d:acronym">
   <xsl:call-template name="inline.charseq">
     <xsl:with-param name="wrapper-name">abbr</xsl:with-param>
   </xsl:call-template>
@@ -50,7 +51,7 @@
 <!-- HTML5: replace border="0" with border="" -->
 <!-- HTML5: No @summary allowed -->
 <!-- HTML5: replace many table atts with CSS styles -->
-<xsl:template match="tgroup" name="tgroup">
+<xsl:template match="d:tgroup" name="tgroup">
   <xsl:if test="not(@cols) or @cols = '' or string(number(@cols)) = 'NaN'">
     <xsl:message terminate="yes">
       <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
 
     <xsl:copy-of select="$colgroup"/>
 
-    <xsl:apply-templates select="thead"/>
-    <xsl:apply-templates select="tfoot"/>
-    <xsl:apply-templates select="tbody"/>
+    <xsl:apply-templates select="d:thead"/>
+    <xsl:apply-templates select="d:tfoot"/>
+    <xsl:apply-templates select="d:tbody"/>
 
-    <xsl:if test=".//footnote|../title//footnote">
+    <xsl:if test=".//d:footnote|../d:title//d:footnote">
       <tbody class="footnotes">
         <tr>
           <td colspan="{@cols}">
-            <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/>
+            <xsl:apply-templates select=".//d:footnote|../d:title//d:footnote" mode="table.footnote.mode"/>
           </td>
         </tr>
       </tbody>
   <xsl:apply-templates select="$colgroup.nodeset" mode="convert.to.style"/>
 </xsl:template>
 
-<xsl:template match="colgroup" mode="convert.to.style">
+<xsl:template match="d:colgroup" mode="convert.to.style">
   <xsl:copy>
     <xsl:copy-of select="@*"/>
     <xsl:apply-templates mode="convert.to.style"/>
 </xsl:template>
 
 <!-- HTML5: convert some attributes to CSS style attribute -->
-<xsl:template match="entry|entrytbl">
+<xsl:template match="d:entry|d:entrytbl">
   <xsl:param name="col">
     <xsl:choose>
       <xsl:when test="@revisionflag">
-        <xsl:number from="row"/>
+        <xsl:number from="d:row"/>
       </xsl:when>
       <xsl:otherwise>1</xsl:otherwise>
     </xsl:choose>
 
 </xsl:template>
 
-<xsl:template match="mediaobject|inlinemediaobject">
+<xsl:template match="d:mediaobject|d:inlinemediaobject">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="qandaset">
+<xsl:template match="d:qandaset">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="calloutlist|revhistory|footnote|figure|co">
+<xsl:template match="d:calloutlist|d:revhistory|d:footnote|d:figure|d:co">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="revhistory" mode="titlepage.mode">
+<xsl:template match="d:revhistory" mode="titlepage.mode">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="variablelist">
+<xsl:template match="d:variablelist">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="orderedlist[@inheritnum = 'inherit']">
+<xsl:template match="d:orderedlist[@inheritnum = 'inherit']">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="simplelist">
+<xsl:template match="d:simplelist">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="blockquote">
+<xsl:template match="d:blockquote">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="note|important|warning|caution|tip">
+<xsl:template match="d:note|d:important|d:warning|d:caution|d:tip">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="funcprototype" mode="ansi-tabular">
+<xsl:template match="d:funcprototype" mode="ansi-tabular">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
-<xsl:template match="funcprototype" mode="kr-tabular">
+<xsl:template match="d:funcprototype" mode="kr-tabular">
   <xsl:call-template name="convert.styles"/>
 </xsl:template>
 
 </xsl:template>
 
 <!-- HTML5: uses <ul> instead of <dl> for TOC -->
-<xsl:template match="question" mode="qandatoc.mode">
+<xsl:template match="d:question" mode="qandatoc.mode">
   <xsl:variable name="firstch">
     <!-- Use a titleabbrev or title if available -->
     <xsl:choose>
-      <xsl:when test="../blockinfo/titleabbrev">
-        <xsl:apply-templates select="../blockinfo/titleabbrev[1]/node()"/>
+      <xsl:when test="../d:blockinfo/d:titleabbrev">
+        <xsl:apply-templates select="../d:blockinfo/d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../blockinfo/title">
-        <xsl:apply-templates select="../blockinfo/title[1]/node()"/>
+      <xsl:when test="../d:blockinfo/d:title">
+        <xsl:apply-templates select="../d:blockinfo/d:title[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../info/titleabbrev">
-        <xsl:apply-templates select="../info/titleabbrev[1]/node()"/>
+      <xsl:when test="../d:info/d:titleabbrev">
+        <xsl:apply-templates select="../d:info/d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../titleabbrev">
-        <xsl:apply-templates select="../titleabbrev[1]/node()"/>
+      <xsl:when test="../d:titleabbrev">
+        <xsl:apply-templates select="../d:titleabbrev[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../info/title">
-        <xsl:apply-templates select="../info/title[1]/node()"/>
+      <xsl:when test="../d:info/d:title">
+        <xsl:apply-templates select="../d:info/d:title[1]/node()"/>
       </xsl:when>
-      <xsl:when test="../title">
-        <xsl:apply-templates select="../title[1]/node()"/>
+      <xsl:when test="../d:title">
+        <xsl:apply-templates select="../d:title[1]/node()"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates select="(*[local-name(.)!='label'])[1]/node()"/>
         </xsl:call-template>
       </xsl:attribute>
       <xsl:apply-templates select="." mode="label.markup"/>
-      <xsl:if test="contains($deflabel,'number') and not(label)">
+      <xsl:if test="contains($deflabel,'number') and not(d:label)">
         <xsl:apply-templates select="." mode="intralabel.punctuation"/>
       </xsl:if>
       <xsl:text> </xsl:text>
     <!-- * include nested qandaset/qandaentry in TOC if user wants it -->
 
     <xsl:if test="not($qanda.nested.in.toc = 0)">
-      <xsl:apply-templates select="following-sibling::answer" mode="qandatoc.mode"/>
+      <xsl:apply-templates select="following-sibling::d:answer" mode="qandatoc.mode"/>
     </xsl:if>
   </li>
 </xsl:template>
 
-<xsl:template match="answer" mode="qandatoc.mode">
-  <xsl:if test="descendant::question">
+<xsl:template match="d:answer" mode="qandatoc.mode">
+  <xsl:if test="descendant::d:question">
     <xsl:call-template name="process.qanda.toc"/>
   </xsl:if>
 </xsl:template>
 <!-- html5 uses <ul> instead of <dl> for toc -->
 <xsl:template name="process.qanda.toc">
   <ul>
-    <xsl:apply-templates select="qandadiv" mode="qandatoc.mode"/>
-    <xsl:apply-templates select="qandaset|qandaentry" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="d:qandadiv" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="d:qandaset|d:qandaentry" mode="qandatoc.mode"/>
   </ul>
 </xsl:template>
 
-<xsl:template match="qandadiv" mode="qandatoc.mode">
+<xsl:template match="d:qandadiv" mode="qandatoc.mode">
   <!--
-  <dt><xsl:apply-templates select="title" mode="qandatoc.mode"/></dt>
+  <dt><xsl:apply-templates select="d:title" mode="qandatoc.mode"/></dt>
   <dd><xsl:call-template name="process.qanda.toc"/></dd>
   -->
   <li>
-    <xsl:apply-templates select="title" mode="qandatoc.mode"/>
+    <xsl:apply-templates select="d:title" mode="qandatoc.mode"/>
     <xsl:call-template name="process.qanda.toc"/>
   </li>
 </xsl:template>
 
 <!-- output html5 video and source elements -->
-<xsl:template match="videoobject">
+<xsl:template match="d:videoobject">
   <video>
     <xsl:call-template name="common.html.attributes"/>
     <xsl:call-template name="video.poster"/>
     <!-- copy videodata attributes from first videodata child only -->
-    <xsl:apply-templates select="videodata[1]/@*" mode="video.attribute"/>
-    <xsl:apply-templates select="videodata[1]/multimediaparam" mode="video.attribute"/>
+    <xsl:apply-templates select="d:videodata[1]/@*" mode="video.attribute"/>
+    <xsl:apply-templates select="d:videodata[1]/d:multimediaparam" mode="video.attribute"/>
 
     <!-- generate <source> element for each videodata element -->
-    <xsl:apply-templates select="videodata"/>
+    <xsl:apply-templates select="d:videodata"/>
 
     <!-- add any fallback content -->
     <xsl:call-template name="video.fallback"/>
 </xsl:template>
 
 <!-- output html5 audio and source elements -->
-<xsl:template match="audioobject">
+<xsl:template match="d:audioobject">
   <audio>
     <xsl:call-template name="common.html.attributes"/>
 
     <!-- copy audiodata attributes from first audiodata child only -->
-    <xsl:apply-templates select="audiodata[1]/@*" mode="audio.attribute"/>
-    <xsl:apply-templates select="audiodata[1]/multimediaparam" mode="audio.attribute"/>
+    <xsl:apply-templates select="d:audiodata[1]/@*" mode="audio.attribute"/>
+    <xsl:apply-templates select="d:audiodata[1]/d:multimediaparam" mode="audio.attribute"/>
 
     <!-- generate <source> element for each videodata element -->
-    <xsl:apply-templates select="audiodata"/>
+    <xsl:apply-templates select="d:audiodata"/>
 
     <!-- add any fallback content -->
     <xsl:call-template name="audio.fallback"/>
   </audio>
 </xsl:template>
 
-<xsl:template match="videodata">
+<xsl:template match="d:videodata">
 
   <xsl:variable name="filename">
     <xsl:call-template name="mediaobject.filename">
 
     <xsl:apply-templates select="@format" mode="source.attribute"/>
 
-    <xsl:apply-templates select="multimediaparam" mode="source.attribute"/>
+    <xsl:apply-templates select="d:multimediaparam" mode="source.attribute"/>
     
   </source>
 </xsl:template>
 
-<xsl:template match="audiodata">
+<xsl:template match="d:audiodata">
 
   <xsl:variable name="filename">
     <xsl:call-template name="mediaobject.filename">
 
     <xsl:apply-templates select="@format" mode="source.attribute"/>
 
-    <xsl:apply-templates select="multimediaparam" mode="source.attribute"/>
+    <xsl:apply-templates select="d:multimediaparam" mode="source.attribute"/>
     
   </source>
 </xsl:template>
 <xsl:template name="video.poster">
   <!-- context is videoobject -->
   <xsl:variable name="imageobject" 
-                select="../../imageobject[@role = 'poster'][1] | 
-                           ../imageobject[@role = 'poster'][1]"/>
+                select="../../d:imageobject[@role = 'poster'][1] |
+                           ../d:imageobject[@role = 'poster'][1]"/>
   <xsl:if test="$imageobject">
     <xsl:attribute name="poster">
-      <xsl:value-of select="$imageobject/imagedata/@fileref"/>
+      <xsl:value-of select="$imageobject/d:imagedata/@fileref"/>
     </xsl:attribute> 
   </xsl:if>
 </xsl:template>
 
-<xsl:template match="videodata/@fileref" mode="source.attribute">
+<xsl:template match="d:videodata/@fileref" mode="source.attribute">
   <!-- process in normal mode -->
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="videodata/@fileref" mode="video.attribute"/>
+<xsl:template match="d:videodata/@fileref" mode="video.attribute"/>
 
-<xsl:template match="audiodata/@fileref" mode="source.attribute">
+<xsl:template match="d:audiodata/@fileref" mode="source.attribute">
   <!-- process in normal mode -->
   <xsl:apply-templates select="."/>
 </xsl:template>
 
-<xsl:template match="audiodata/@fileref" mode="audio.attribute"/>
+<xsl:template match="d:audiodata/@fileref" mode="audio.attribute"/>
 
-<xsl:template match="videodata/@contentwidth | videodata/@width" 
+<xsl:template match="d:videodata/@contentwidth | d:videodata/@width"
               mode="video.attribute">
   <xsl:attribute name="width">
     <xsl:value-of select="."/>
   </xsl:attribute>
 </xsl:template>
 
-<xsl:template match="videodata/@contentdepth | videodata/@depth"
+<xsl:template match="d:videodata/@contentdepth | d:videodata/@depth"
               mode="video.attribute">
   <xsl:attribute name="height">
     <xsl:value-of select="."/>
   </xsl:attribute>
 </xsl:template>
 
-<xsl:template match="multimediaparam" mode="source.attribute"/>
-<xsl:template match="multimediaparam" mode="video.attribute"/>
+<xsl:template match="d:multimediaparam" mode="source.attribute"/>
+<xsl:template match="d:multimediaparam" mode="video.attribute"/>
 
-<xsl:template match="multimediaparam[@name = 'autoplay' or
+<xsl:template match="d:multimediaparam[@name = 'autoplay' or
                                        @name = 'controls' or
                                        @name = 'height' or
                                        @name = 'loop' or
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="multimediaparam[@name = 'autoplay' or
+<xsl:template match="d:multimediaparam[@name = 'autoplay' or
                                        @name = 'controls' or
                                        @name = 'loop' or
                                        @name = 'muted' or
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="multimediaparam[not(@name = 'autoplay' or
+<xsl:template match="d:multimediaparam[not(@name = 'autoplay' or
                                        @name = 'controls' or
                                        @name = 'height' or
                                        @name = 'loop' or
 
 <xsl:template name="video.fallback">
   <xsl:param name="videoobject" select="."/>
-  <xsl:variable name="textobject" select="$videoobject/../textobject"/>
+  <xsl:variable name="textobject" select="$videoobject/../d:textobject"/>
 
   <xsl:choose>
     <xsl:when test="$textobject">
 
 <xsl:template name="audio.fallback">
   <xsl:param name="audiodata" select="."/>
-  <xsl:variable name="textobject" select="$audiodata/../../textobject"/>
+  <xsl:variable name="textobject" select="$audiodata/../../d:textobject"/>
 
   <xsl:choose>
     <xsl:when test="$textobject">
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="textobject" mode="fallback">
+<xsl:template match="d:textobject" mode="fallback">
   <div>
     <xsl:apply-templates select="." mode="class.attribute"/>
     <xsl:apply-templates/>
index 07a5fc4d0f0bdd82cb80757295489fc65d6af45b..be47476319f7ab7438cb6e5d101e46e96e31da05 100644 (file)
@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="ASCII"?>
 <!--This file was created automatically by html2xhtml-->
 <!--from the HTML stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="doc">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+               xmlns="http://www.w3.org/1999/xhtml"
+               version="1.0"
+               exclude-result-prefixes="doc d">
 
 <!-- ********************************************************************
 
index dfe401d62c2cd2d2cf8ee16c747a6ecb26767ae9..0ceb1aff445cec659f7617f08390cea46545666a 100644 (file)
@@ -1,5 +1,10 @@
 <?xml version="1.0" encoding="ASCII"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns="http://www.w3.org/1999/xhtml"
+               version="1.0"
+               exclude-result-prefixes="exsl d">
 
 <!-- ********************************************************************
 
index c7afac5dd98b9d9ced96e95001bb53a53ba27d52..c5b5fb63f5078020b50ad49110bc15e73dd1bc05 100644 (file)
@@ -1,5 +1,17 @@
 <?xml version="1.0" encoding="ASCII"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="db ng exsl exslt exslt" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:ng="http://docbook.org/docbook-ng"
+               xmlns:db="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns:exslt="http://exslt.org/common"
+               xmlns="http://www.w3.org/1999/xhtml"
+               exslt:dummy="dummy"
+               ng:dummy="dummy"
+               db:dummy="dummy"
+               extension-element-prefixes="exslt"
+               exclude-result-prefixes="db ng exsl exslt exslt d"
+               version="1.0">
 
 
 <!-- ********************************************************************
index 8311969b2d3fcd0f830b3eeaa96d939e38e9fc63..772c8b0a7af1bd5de0bc91281eed60650fa93de9 100644 (file)
@@ -3,7 +3,19 @@
 <!--from the HTML stylesheets.-->
 <!--This file was created automatically by xsl2profile-->
 <!--from the DocBook XSL stylesheets.-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" exslt:dummy="dummy" ng:dummy="dummy" db:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="db ng exsl exslt exslt" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+               xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:ng="http://docbook.org/docbook-ng"
+               xmlns:db="http://docbook.org/ns/docbook"
+               xmlns:exsl="http://exslt.org/common"
+               xmlns:exslt="http://exslt.org/common"
+               xmlns="http://www.w3.org/1999/xhtml"
+               exslt:dummy="dummy"
+               ng:dummy="dummy"
+               db:dummy="dummy"
+               extension-element-prefixes="exslt"
+               exclude-result-prefixes="db ng exsl exslt exslt d"
+               version="1.0">
 
 <xsl:output method="xml" encoding="UTF-8" indent="no"/>
 
@@ -67,7 +79,7 @@
 <xsl:include href="../xhtml/chunker.xsl"/>
 <xsl:include href="../xhtml/html-rtf.xsl"/>
 <xsl:include href="../xhtml/annotations.xsl"/>
-<xsl:include href="../common/stripns.xsl"/>
+<xsl:include href="../common/addns.xsl"/>
 
 <xsl:param name="stylesheet.result.type" select="'xhtml'"/>
 <xsl:param name="htmlhelp.output" select="0"/>
   <meta name="generator" content="DocBook {$DistroTitle} V{$VERSION}"/>
 
   <xsl:if test="$generate.meta.abstract != 0">
-    <xsl:variable name="info" select="(articleinfo                                       |bookinfo                                       |prefaceinfo                                       |chapterinfo                                       |appendixinfo                                       |sectioninfo                                       |sect1info                                       |sect2info                                       |sect3info                                       |sect4info                                       |sect5info                                       |referenceinfo                                       |refentryinfo                                       |partinfo                                       |info                                       |docinfo)[1]"/>
-    <xsl:if test="$info and $info/abstract">
+    <xsl:variable name="info" select="(d:articleinfo                                       |d:bookinfo                                       |d:prefaceinfo                                       |d:chapterinfo                                       |d:appendixinfo                                       |d:sectioninfo                                       |d:sect1info                                       |d:sect2info                                       |d:sect3info                                       |d:sect4info                                       |d:sect5info                                       |d:referenceinfo                                       |d:refentryinfo                                       |d:partinfo                                       |d:info                                       |d:docinfo)[1]"/>
+    <xsl:if test="$info and $info/d:abstract">
       <meta name="description">
         <xsl:attribute name="content">
-          <xsl:for-each select="$info/abstract[1]/*">
+          <xsl:for-each select="$info/d:abstract[1]/*">
             <xsl:value-of select="normalize-space(.)"/>
             <xsl:if test="position() &lt; last()">
               <xsl:text> </xsl:text>
@@ -199,30 +211,30 @@ body { background-image: url('</xsl:text>
 <!-- ============================================================ -->
 
 <xsl:template match="*" mode="head.keywords.content">
-  <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="sectioninfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
-  <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:chapterinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:appendixinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:prefaceinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:bookinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:setinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:articleinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:artheader/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect1info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect2info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect3info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect4info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sect5info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:sectioninfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect1info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect2info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refsect3info/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:bibliographyinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:glossaryinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:indexinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:refentryinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:partinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:referenceinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:docinfo/d:keywordset" mode="html.header"/>
+  <xsl:apply-templates select="d:info/d:keywordset" mode="html.header"/>
 
   <xsl:if test="$inherit.keywords != 0                 and parent::*">
     <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
@@ -238,12 +250,12 @@ body { background-image: url('</xsl:text>
               in this chunk should be referenced. I don't think it
               does any harm to reference them all, but it adds
               unnecessary bloat to each chunk. -->
-  <xsl:if test="$annotation.support != 0 and //annotation">
+  <xsl:if test="$annotation.support != 0 and //d:annotation">
     <xsl:call-template name="add.annotation.links"/>
     <script type="text/javascript">
       <xsl:text>
 // Create PopupWindow objects</xsl:text>
-      <xsl:for-each select="//annotation">
+      <xsl:for-each select="//d:annotation">
         <xsl:text>
 var popup_</xsl:text>
         <xsl:value-of select="generate-id(.)"/>
@@ -300,7 +312,7 @@ var popup_</xsl:text>
   <xsl:param name="node" select="."/>
 </xsl:template>
 
-<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. cut : stripped namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="stripNS"/></xslo:variable><xslo:message>Note: namesp. cut : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:choose><xslo:when test="*/self::ng:* or */self::db:*"><xslo:message>Note: namesp. add : added namespace before processing</xslo:message><xslo:variable name="stripped-content"><xslo:apply-templates select="/" mode="addNS"/></xslo:variable><xslo:message>Note: namesp. add : processing stripped document</xslo:message><xslo:apply-templates select="exslt:node-set($stripped-content)" mode="profile"/></xslo:when><xslo:otherwise><xslo:apply-templates select="/" mode="profile"/></xslo:otherwise></xslo:choose></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/><xsl:template match="/">
   <!-- * Get a title for current doc so that we let the user -->
   <!-- * know what document we are processing at this point. -->
   <xsl:variable name="doc.title">
index 05fe68d4543822b6804095bfdca7f8387def3aa5..49382eb3931a85c30b04d081f4d239c9f5ae1293 100644 (file)
@@ -1,5 +1,7 @@
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
+<xsl:stylesheet exclude-result-prefixes="d"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:d="http://docbook.org/ns/docbook"
+               xmlns:xslo="http://www.w3.org/1999/XSL/TransformAlias"
                 version="1.0">
 
 <xsl:output indent="no" method="xml"/>