]> granicus.if.org Git - docbook-dsssl/commitdiff
Add support for info element.
authorBob Stayton <bobs@sagehill.net>
Sat, 11 Nov 2006 08:46:43 +0000 (08:46 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 11 Nov 2006 08:46:43 +0000 (08:46 +0000)
xsl/fo/biblio.xsl
xsl/fo/block.xsl
xsl/fo/component.xsl
xsl/fo/glossary.xsl
xsl/fo/index.xsl
xsl/fo/lists.xsl
xsl/fo/qandaset.xsl
xsl/fo/refentry.xsl
xsl/fo/sections.xsl

index 0a73c020dadd3e5d92e8c54bd62ebbde7bf3c87e..8d7458a7fe9d8c8a47514cee49870d24074e329f 100644 (file)
@@ -95,6 +95,7 @@
 </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:if>
 
     <xsl:apply-templates select="*[not(self::blockinfo)
+                                   and not(self::info)
                                    and not(self::title)
                                    and not(self::titleabbrev)]"/>
   </fo:block>
   </fo:inline>
 </xsl:template>
 
-<xsl:template match="artheader|articleinfo" mode="bibliography.mode">
+<xsl:template match="artheader|articleinfo|article/info" 
+              mode="bibliography.mode">
   <fo:inline>
     <xsl:apply-templates mode="bibliography.mode"/>
     <xsl:value-of select="$biblioentry.item.separator"/>
index b712bb389c82478b8284d28022b9f7400240c2b9..164d49a96c4c76d875930abed738dafbf521612c 100644 (file)
@@ -16,7 +16,7 @@
 <!-- ==================================================================== -->
 <!-- What should we do about styling blockinfo? -->
 
-<xsl:template match="blockinfo">
+<xsl:template match="blockinfo|info">
   <!-- suppress -->
 </xsl:template>
 
   </fo:block>
 </xsl:template>
 
-<xsl:template match="formalpara/title">
+<!-- Only use title from info -->
+<xsl:template match="formalpara/info">
+  <xsl:apply-templates select="title"/>
+</xsl:template>
+
+<xsl:template match="formalpara/title|formalpara/info/title">
   <xsl:variable name="titleStr">
       <xsl:apply-templates/>
   </xsl:variable>
@@ -90,7 +95,7 @@
   <fo:block xsl:use-attribute-sets="blockquote.properties">
     <xsl:call-template name="anchor"/>
     <fo:block>
-      <xsl:if test="title">
+      <xsl:if test="title|info/title">
         <fo:block xsl:use-attribute-sets="formal.title.properties">
           <xsl:apply-templates select="." mode="object.title.markup"/>
         </fo:block>
     <xsl:otherwise>
       <xsl:variable name="content">
         <fo:block xsl:use-attribute-sets="sidebar.properties"
-                 id="{$id}">
-         <xsl:call-template name="sidebar.titlepage"/>
+                  id="{$id}">
+          <xsl:call-template name="sidebar.titlepage"/>
           <xsl:apply-templates select="node()[not(self::title) and
-                                        not(self::sidebarinfo)]"/>
+                                         not(self::info) and
+                                         not(self::sidebarinfo)]"/>
         </fo:block>
       </xsl:variable>
     
 
 </xsl:template>
 
-<xsl:template match="sidebar/title|sidebarinfo"/>
+<xsl:template match="sidebar/title|sidebarinfo|sidebar/info"/>
 
-<xsl:template match="sidebar/title|sidebarinfo/title"
+<xsl:template match="sidebar/title|sidebarinfo/title|sidebar/info/title"
               mode="titlepage.mode" priority="1">
   <fo:block xsl:use-attribute-sets="sidebar.title.properties">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="abstract/title">
+<xsl:template match="abstract/title|abstract/info/title">
   <fo:block xsl:use-attribute-sets="abstract.title.properties">
     <xsl:apply-templates/>
   </fo:block>
index b566af84b37fe32c04282f0131e04089c7b09449..4fc045cecd5476a85db5c0b11b28a57331a8124d 100644 (file)
 </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>
 
 <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>
 
 <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="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>
index a90be8eadcdcc656e1d35f7bb15cd480597b100e..00f44e8cf0febbaaa3ea070785cb1d61affaf9af 100644 (file)
 </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:choose>
   </xsl:variable>
 
-  <xsl:if test="title">
-    <xsl:apply-templates select="title" mode="list.title.mode"/>
+  <xsl:if test="title or info/title">
+    <xsl:apply-templates select="(title|info/title)[1]" mode="list.title.mode"/>
   </xsl:if>
 
   <xsl:choose>
index ccc528e79895a0dba7e21790b0bf5f6ce44a44cd..25f9f96599ae8f4b4eff23abaf7d6d612d287bcf 100644 (file)
  </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:variable name="parent" select="local-name($parentnode)"/>
 
-  <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|variablelist|warning|'"/>
+  <xsl:variable name="block.parents" select="'|answer|appendix|appendixinfo|article|articleinfo|bibliodiv|bibliography|bibliographyinfo|blockinfo|blockquote|bookinfo|callout|caution|chapter|chapterinfo|dedication|example|figure|formalpara|funcsynopsisinfo|glossary|glossaryinfo|glossdef|glossdiv|glossentry|highlights|important|index|indexinfo|info|informalexample|informalfigure|informaltable|itemizedlist|legalnotice|listitem|msgexplan|msgtext|note|objectinfo|orderedlist|partinfo|partintro|preface|prefaceinfo|procedure|qandadiv|qandaset|question|refentry|refentryinfo|referenceinfo|refmeta|refmiscinfo|refsect1|refsect1info|refsect2|refsect2info|refsect3|refsect3info|refsection|refsectioninfo|refsynopsisdiv|refsynopsisdivinfo|revdescription|screeninfo|sect1|sect1info|sect2|sect2info|sect3|sect3info|sect4|sect4info|sect5|sect5info|section|sectioninfo|setindex|setindexinfo|setinfo|sidebar|sidebarinfo|simplesect|step|table|task|taskprerequisites|taskrelated|tasksummary|tip|variablelist|warning|'"/>
 
   <xsl:choose>
     <xsl:when test="contains($parent, $block.parents)">fo:block</xsl:when>
index c660e081db3a80360b06de1311829e2d034e703c..8466cb0727c7d4247da1b5680f86fef6046f9595 100644 (file)
   <fo:block id="{$id}"
             text-align="{$alignment}">
     <!-- The above restores alignment altered by image align attribute -->
-    <xsl:if test="title">
-      <xsl:apply-templates select="title" mode="list.title.mode"/>
+    <xsl:if test="title|info/title">
+      <xsl:apply-templates select="(title|info/title)[1]" 
+                           mode="list.title.mode"/>
     </xsl:if>
 
     <!-- Preserve order of PIs and comments -->
index ea0e9a69787599bf283857cf842a431b056391e5..ca525880831a96e148aee0dbfc4babf2c01bc69b 100644 (file)
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="qandaset/blockinfo">
+<xsl:template match="qandaset/blockinfo|qandaset/info">
   <!-- what should this template really do? -->
   <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
 </xsl:template>
index 48ff5525537879a84d13f929e2f1cb5424198dc3..0225fa1a5e5019af70956a6527ab0874e25e2065 100644 (file)
 </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>
 
   </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:stylesheet>
index 27426b3ebeab8054fd9b4b72c831a25652786104..cd89dae5683b9e2c1176d5ea7571ce422aac3bf2 100644 (file)
 </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>