]> granicus.if.org Git - docbook-dsssl/commitdiff
Consolidated processing of all FO PIs into wrapper templates in
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 3 Jul 2007 11:48:38 +0000 (11:48 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 3 Jul 2007 11:48:38 +0000 (11:48 +0000)
one place (the fo/pi.xsl file) and added embedded documentation
for all of them.  This makes it possible to now include generated
documentation for the PIs in the output docs. Next stop: HTML PIs,
then on to the common ones...

This touched a lot of files and it is likely that I made some
mistakes in moving the PI processing over. Meaning that some PIs
might quit working or not work as expected after this change. So
it will need to tested. Which is why we do dot-zero releases...

xsl/fo/block.xsl
xsl/fo/formal.xsl
xsl/fo/glossary.xsl
xsl/fo/graphics.xsl
xsl/fo/htmltbl.xsl
xsl/fo/lists.xsl
xsl/fo/pi.xsl
xsl/fo/qandaset.xsl
xsl/fo/table.xsl
xsl/fo/titlepage.xsl
xsl/fo/verbatim.xsl

index 046ca8cbcba13fa6358945a9abbbf8a1e52d5294..2d42c8a913be0b6188aa54d5e25b6c8f0dd2d64e 100644 (file)
 <xsl:template match="sidebar" name="sidebar">
   <!-- Also does margin notes -->
   <xsl:variable name="pi-type">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'float-type'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_float-type"/>
   </xsl:variable>
 
   <xsl:variable name="id">
                                          not(self::sidebarinfo)]"/>
         </fo:block>
       </xsl:variable>
-    
+
       <xsl:variable name="pi-width">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis"
-                          select="processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'sidebar-width'"/>
-        </xsl:call-template>
+        <xsl:call-template name="pi.dbfo_sidebar-width"/>
       </xsl:variable>
 
       <xsl:variable name="position">
   </xsl:param>
 
   <xsl:variable name="pi-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'sidebar-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_sidebar-width"/>
   </xsl:variable>
 
   <xsl:variable name="position" select="$margin.note.float.type"/>
index cfdd116c3d0bd0271214a7642960fb6767881790..0233d79f38e3b20cbd2194003d97210573a40f20 100644 (file)
   </xsl:variable>
 
   <xsl:variable name="keep.together">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'keep-together'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 
   <xsl:choose>
   </xsl:variable>
 
   <xsl:variable name="keep.together">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'keep-together'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 
   <xsl:choose>
 
   <!-- Example doesn't have a pgwide attribute, so may use a PI -->
   <xsl:variable name="pgwide.pi">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'pgwide'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_pgwide"/>
   </xsl:variable>
 
   <xsl:variable name="pgwide">
 
   <!-- Equation doesn't have a pgwide attribute, so may use a PI -->
   <xsl:variable name="pgwide">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'pgwide'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_pgwide"/>
   </xsl:variable>
 
   <xsl:variable name="equation">
index ffd8a9a0bfd04e84b41a8e24ca7b8fad5431f6ed..718bdb6981537e7c2723e1f027eaec86a786f92d 100644 (file)
   </xsl:variable>
 
   <xsl:variable name="presentation">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'glossary-presentation'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_glossary-presentation"/>
   </xsl:variable>
 
   <xsl:variable name="term-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'glossterm-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_glossterm-width"/>
   </xsl:variable>
 
   <xsl:variable name="width">
   &setup-language-variable;
 
   <xsl:variable name="presentation">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'glosslist-presentation'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_glosslist-presentation"/>
   </xsl:variable>
 
   <xsl:variable name="term-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'glossterm-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_glossterm-width"/>
   </xsl:variable>
 
   <xsl:variable name="width">
   </xsl:variable>
 
   <xsl:variable name="presentation">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'glossary-presentation'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_glossary-presentation"/>
   </xsl:variable>
 
   <xsl:variable name="term-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'glossterm-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_glossterm-width"/>
   </xsl:variable>
 
   <xsl:variable name="width">
index 09563a5d50efc29cd968c589ab8b57bc0c66ff32..4e94fec5c62959d833671a48a6b107a20ff66f97 100644 (file)
   </xsl:variable>
 
   <xsl:variable name="bgcolor">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="../processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'background-color'"/>
+    <xsl:call-template name="pi.dbfo_background-color">
+      <xsl:with-param name="node" select=".."/>
     </xsl:call-template>
   </xsl:variable>
 
index e699fbc8a2d261e565a1ba4c8de969b621dafeac..1954d956b2c49a99d66dd49c04b6f08221e0f6e2 100644 (file)
 
 <xsl:template match="td" mode="htmlTable">
   <xsl:variable name="bgcolor">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'bgcolor'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_bgcolor"/>
   </xsl:variable>
   <fo:table-cell xsl:use-attribute-sets="table.cell.padding">
     <xsl:call-template name="table.cell.properties">
 
 <xsl:template match="th" mode="htmlTable">
   <xsl:variable name="bgcolor">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'bgcolor'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_bgcolor"/>
   </xsl:variable>
-
   <fo:table-cell xsl:use-attribute-sets="th.style table.cell.padding">
     <xsl:call-template name="table.cell.properties">
       <xsl:with-param name="bgcolor.pi" select="$bgcolor"/>
index 21a8aa3c4f070116e84f266f10162d88c5c2c38b..ee31ed09329afcbf89a72479e8bd2e7ce37e59eb 100644 (file)
   </xsl:variable>
 
   <xsl:variable name="pi-label-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'label-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_label-width"/>
   </xsl:variable>
 
   <xsl:variable name="label-width">
   </xsl:variable>
 
   <xsl:variable name="pi-label-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'label-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_label-width"/>
   </xsl:variable>
 
   <xsl:variable name="label-width">
 
 <xsl:template match="variablelist">
   <xsl:variable name="presentation">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'list-presentation'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_list-presentation"/>
   </xsl:variable>
 
   <xsl:choose>
   </xsl:variable>
 
   <xsl:variable name="term-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'term-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_term-width"/>
   </xsl:variable>
 
   <xsl:variable name="termlength">
   <fo:inline><xsl:variable name="localized-choice-separator">
     <xsl:choose>
       <xsl:when test="processing-instruction('dbchoice')">
-       <xsl:call-template name="select.choice.separator"/>
+        <xsl:call-template name="select.choice.separator"/>
       </xsl:when>
       <xsl:otherwise>
-       <!-- empty -->
+        <!-- empty -->
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
 <xsl:template match="simplelist[@type='horiz']">
 
   <xsl:variable name="explicit.table.width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'list-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_list-width"/>
   </xsl:variable>
 
   <xsl:variable name="table.width">
 
 <xsl:template match="segmentedlist">
   <xsl:variable name="presentation">
-    <xsl:call-template name="pi-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'list-presentation'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_list-presentation"/>
   </xsl:variable>
 
   <xsl:variable name="id">
index c55b58e28426425f6d31640c2e865ea647f607aa..5f0a2c264738574557788d703ef3ba45d02dcfe9 100644 (file)
@@ -1,6 +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"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                exclude-result-prefixes="doc"
                 version='1.0'>
 
 <!-- ********************************************************************
 
      ******************************************************************** -->
 
-<xsl:template match="processing-instruction()">
-</xsl:template>
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id$
+</releaseinfo>
+<authorgroup>
+  <author>
+    <orgname>The DocBook Project Development Team</orgname>
+  </author>
+</authorgroup>
+<copyright>
+  <year>2007</year>
+  <holder>The DocBook Project</holder>
+</copyright>
+</referenceinfo>
+<title>FO Processing Instruction Reference</title>
+
+<partintro id="partintro">
+<title>Introduction</title>
+
+<para>This is generated reference documentation for all
+  user-configurable processing instructions (PIs) in the DocBook
+  XSL stylesheets for FO output.
+  <note>
+    <para>You add these PIs at particular points in a document to
+      cause specific “exceptions” to formatting/output behavior. To
+      make global changes in formatting/output behavior across an
+      entire document, it’s better to do it by setting an
+      appropriate stylesheet parameter (if there is one).</para>
+  </note>
+</para>
+</partintro>
+</doc:reference>
 
 <!-- ==================================================================== -->
 
-<xsl:template name="dbfo-attribute">
-  <xsl:param name="pis" select="processing-instruction('dbfo')"/>
-  <xsl:param name="attribute">filename</xsl:param>
+<doc:pi name="dbfo_background-color" xmlns="">
+<refpurpose>Sets background color for an image</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo background-color</tag> PI before or
+    after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>,
+    <tag>imagedata</tag>, or <tag>videodata</tag> element) as a
+    sibling to the element, to set a background color for the
+    image.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo background-color="<replaceable>color</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>background-color="<replaceable>color</replaceable>"</term>
+      <listitem>
+        <para>FIXME: A color value? [In hex, as a name, or what?]</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_background-color">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'background-color'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <xsl:call-template name="pi-attribute">
-    <xsl:with-param name="pis" select="$pis"/>
-    <xsl:with-param name="attribute" select="$attribute"/>
+<doc:pi name="dbfo_bgcolor" xmlns="">
+<refpurpose>Sets background color on an table row or table cell</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo bgcolor</tag> PI as child of a table row
+    or cell to set a background color for that table row or cell.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo bgcolor="<replaceable>color</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>bgcolor="<replaceable>color</replaceable>"</term>
+      <listitem>
+        <para>FIXME: A color value? [In hex, as a name, or what?]</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_bgcolor">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'bgcolor'"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template name="dbfo-filename">
-  <xsl:param name="pis" select="./processing-instruction('dbfo')"/>
+<doc:pi name="dbfo_float-type" xmlns="">
+<refpurpose>Specifies float behavior for a sidebar</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo float-type</tag> PI to specify the float
+    behavior for a <tag>sidebar</tag> (to cause the sidebar to be
+  displayed as a marginal note).</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo float-type="margin.note"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>float-type="margin.note"</term>
+      <listitem>
+        <para>Specifies that the <tag>sidebar</tag> should be
+          displayed as a marginal note.</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_float-type">
+  <xsl:param name="node" select="."/>
   <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$pis"/>
-    <xsl:with-param name="attribute">filename</xsl:with-param>
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'float-type'"/>
   </xsl:call-template>
 </xsl:template>
 
-<xsl:template name="dbfo-dir">
-  <xsl:param name="pis" select="./processing-instruction('dbfo')"/>
+<doc:pi name="dbfo_glossary-presentation" xmlns="">
+<refpurpose>Specifies presentation style for a glossary</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo glossary-presentation</tag> PI as a child of
+    a <tag>glossary</tag> to control its presentation style.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo glossary-presentation="list"|"blocks"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>glossary-presentation="list"</term>
+      <listitem>
+        <para>Displayed the glossary as a list</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>glossary-presentation="blocks"</term>
+      <listitem>
+        <para>Displays the glossary as blocks</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_glossary-presentation">
+  <xsl:param name="node" select="."/>
   <xsl:call-template name="dbfo-attribute">
-    <xsl:with-param name="pis" select="$pis"/>
-    <xsl:with-param name="attribute">dir</xsl:with-param>
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'glossary-presentation'"/>
   </xsl:call-template>
 </xsl:template>
 
-<!-- ==================================================================== -->
+<doc:pi name="dbfo_glosslist-presentation" xmlns="">
+<refpurpose>Specifies presentation style for a glosslist</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo glosslist-presentation</tag> PI as a child of
+    a <tag>glosslist</tag> to control its presentation style.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo glosslist-presentation="list"|"blocks"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>glosslist-presentation="list"</term>
+      <listitem>
+        <para>Displayed the glosslist as a list</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>glosslist-presentation="blocks"</term>
+      <listitem>
+        <para>Displays the glosslist as blocks</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_glosslist-presentation">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'glosslist-presentation'"/>
+  </xsl:call-template>
+</xsl:template>
 
-<xsl:template name="process.cmdsynopsis.list">
-  <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
-  <xsl:param name="count" select="1"/>
+<doc:pi name="dbfo_glossterm-width" xmlns="">
+<refpurpose>Specifies the glossterm width for a glossary or
+  glosslist</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo glossterm-width</tag> PI as a child of a
+    <tag>glossary</tag> or <tag>glosslist</tag> to specify the
+    width for output of <tag>glossterm</tag> instances in the
+    output.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo glossterm-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>glossterm-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the glossterm width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_glossterm-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'glossterm-width'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <xsl:choose>
-    <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
-
-       <dt>
-       <a>
-         <xsl:attribute name="href">
-           <xsl:call-template name="object.id">
-             <xsl:with-param name="object" select="$cmdsyn"/>
-           </xsl:call-template>
-         </xsl:attribute>
-
-         <xsl:choose>
-           <xsl:when test="$cmdsyn/@xreflabel">
-             <xsl:call-template name="xref.xreflabel">
-               <xsl:with-param name="target" select="$cmdsyn"/>
-             </xsl:call-template>
-           </xsl:when>
-           <xsl:otherwise>
-             <xsl:apply-templates select="$cmdsyn" mode="xref-to">
-               <xsl:with-param name="target" select="$cmdsyn"/>
-             </xsl:apply-templates>
-           </xsl:otherwise>
-         </xsl:choose>
-       </a>
-       </dt>
-
-        <xsl:call-template name="process.cmdsynopsis.list">
-          <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
-          <xsl:with-param name="count" select="$count+1"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
+<doc:pi name="dbfo_keep-together" xmlns="">
+<refpurpose>Specifies “keep” behavior for a table, example,
+  figure, or equation</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo keep-together</tag> PI as a child of a
+    formal object (<tag>table</tag>, <tag>example</tag>,
+    <tag>figure</tag>, or <tag>equation</tag>) or their informal
+    equivalents) to specify “keep” behavior for the object (to
+    allow the object to “break” across a page).</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo keep-together="auto"|"always"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>keep-together="auto"</term>
+      <listitem>
+        <para>Enables the object to break across a page</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>keep-together="always"</term>
+      <listitem>
+        <para>Prevents the object from breaking across a page (the
+          default stylesheet behavior)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_keep-together">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'keep-together'"/>
+  </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="processing-instruction('dbcmdlist')">
-  <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
+<doc:pi name="dbfo_label-width" xmlns="">
+<refpurpose>Specifies the label width for an itemizedlist,
+  orderedlist, or qandaset</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo label-width</tag> PI as a child of an
+    <tag>itemizedlist</tag>, <tag>orderedlist</tag>, or
+    <tag>qandaset</tag> to specify the width of labels.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo label-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>label-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the label width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_label-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'label-width'"/>
+  </xsl:call-template>
+</xsl:template> 
+
+<doc:pi name="dbfo_linenumbering.everyNth" xmlns="">
+<refpurpose>Specifies the interval at which lines are numbered
+  output of verbatim environments</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo linenumbering.everyNth</tag> PI as a child
+    of a “verbatim” element – <tag>programlisting</tag>,
+    <tag>screen</tag>, <tag>synopsis</tag> — to specify
+    the interval at which lines are numbered.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo linenumbering.everyNth="<replaceable>N</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>linenumbering.everyNth="<replaceable>N</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies numbering interval; a number is
+          output before every <replaceable>N</replaceable>th line</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_linenumbering.everyNth">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis"
+      select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
+  </xsl:call-template>
+</xsl:template>
+
+<doc:pi name="dbfo_linenumbering.separator" xmlns="">
+<refpurpose>Specifies the separator text used between line numbers
+  and content in output of verbatim environments</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo linenumbering.separator</tag> PI as a child
+    of a “verbatim” element – <tag>programlisting</tag>,
+    <tag>screen</tag>, <tag>synopsis</tag> — to specify
+    the separator text output between the line numbers and content.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo linenumbering.separator="<replaceable>text</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>linenumbering.separator="<replaceable>text</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the text (zero or more characters)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_linenumbering.separator">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis"
+      select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <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>
-  </xsl:if>
+<doc:pi name="dbfo_linenumbering.width" xmlns="">
+<refpurpose>Specifies the width set aside for line numbers in
+  output of verbatim environments</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo linenumbering.width</tag> PI as a child
+    of a “verbatim” element – <tag>programlisting</tag>,
+    <tag>screen</tag>, <tag>synopsis</tag> — to specify
+    the width set aside for line numbers.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo linenumbering.width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>linenumbering.width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_linenumbering.width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis"
+      select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'linenumbering.width'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <dl>
-    <xsl:call-template name="process.cmdsynopsis.list">
-      <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
-    </xsl:call-template>
-  </dl>
+<doc:pi name="dbfo_list-width" xmlns="">
+<refpurpose>Specifies the width of a horizontal simplelist</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo list-width</tag> PI as a child of a
+    <tag>simplelist</tag> whose <tag class="attribute">class</tag>
+    value is <literal>horizontal</literal>, to specify the width
+    of the <tag>simplelist</tag>.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo list-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>list-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the <tag>simplelist</tag> width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_list-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'list-width'"/>
+  </xsl:call-template>
 </xsl:template>
 
-<!-- ==================================================================== -->
+<doc:pi name="dbfo_list-presentation" xmlns="">
+<refpurpose>Specifies presentation style for a variablelist or
+  segmentedlist</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo list-presentation</tag> PI as a child of
+    a <tag>variablelist</tag> or <tag>segmentedlist</tag> to
+    control the presentation style for the list (to cause it, for
+    example, to be displayed as a table).</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo list-presentation="list"|"blocks"|"table"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>list-presentation="list"</term>
+      <listitem>
+        <para>Displayed the list as a list</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>list-presentation="blocks"</term>
+      <listitem>
+        <para>(<tag>variablelist</tag> only) Displays the list as blocks</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>list-presentation="table"</term>
+      <listitem>
+        <para>(<tag>segmentedlist</tag> only) Displays the list as a table</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_list-presentation">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'list-presentation'"/>
+  </xsl:call-template>
+</xsl:template>
 
-<xsl:template name="process.funcsynopsis.list">
-  <xsl:param name="funcsynopses"/><!-- empty node list by default -->
-  <xsl:param name="count" select="1"/>
+<doc:pi name="dbfo_orientation" xmlns="">
+<refpurpose>Specifies the orientation for table row or cell</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo orientation</tag> PI as a child of an
+    <tag>table</tag> row or cell to specify the orientation
+    (rotation) for the row or cell.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>orientation="0"|"90"|"180"|"270"|"-90"|"-180"|"-270"</term>
+      <listitem>
+        <para>Specifies the number of degrees by which the cell or
+          row is rotated</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_orientation">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'orientation'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <xsl:choose>
-    <xsl:when test="$count>count($funcsynopses)"></xsl:when>
-    <xsl:otherwise>
-      <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
-
-       <dt>
-       <a>
-         <xsl:attribute name="href">
-           <xsl:call-template name="object.id">
-             <xsl:with-param name="object" select="$cmdsyn"/>
-           </xsl:call-template>
-         </xsl:attribute>
-
-         <xsl:choose>
-           <xsl:when test="$cmdsyn/@xreflabel">
-             <xsl:call-template name="xref.xreflabel">
-               <xsl:with-param name="target" select="$cmdsyn"/>
-             </xsl:call-template>
-           </xsl:when>
-           <xsl:otherwise>
-              <xsl:apply-templates select="$cmdsyn" mode="xref-to">
-                <xsl:with-param name="target" select="$cmdsyn"/>
-              </xsl:apply-templates>
-           </xsl:otherwise>
-         </xsl:choose>
-       </a>
-       </dt>
-
-        <xsl:call-template name="process.funcsynopsis.list">
-          <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
-          <xsl:with-param name="count" select="$count+1"/>
-        </xsl:call-template>
-      </xsl:otherwise>
-    </xsl:choose>
+<doc:pi name="dbfo_pgwide" xmlns="">
+  <refpurpose>Species whether an <tag>equation</tag> or
+    <tag>example</tag> should rendered across the full width of a
+    page</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo pgwide</tag> PI as a child of an
+    <tag>equation</tag> or <tag>example</tag> to specify that the
+    content should rendered across the full width of the page.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo pgwide="0"|"1"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>pgwide="0"</term>
+      <listitem>
+        <para>If zero, the content is rendered across the current
+        text flow</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>pgwide="1"</term>
+      <listitem>
+        <para>If <code>1</code> (or any non-zero value), the
+          content is rendered across the full width of the page</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_pgwide">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'pgwide'"/>
+  </xsl:call-template>
 </xsl:template>
 
-<xsl:template match="processing-instruction('dbfunclist')">
-  <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
+<doc:pi name="dbfo_rotated-width" xmlns="">
+  <refpurpose>Specifies the width for a table <tag>entry</tag> or
+    <tag>row</tag></refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo rotated-width</tag> PI as a child of an
+    <tag>entry</tag> or <tag>row</tag> instance to specify the
+    width of that the <tag>entry</tag> or <tag>row</tag>; or
+    use it higher up in table to cause the width to be inherited
+    recursively down.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo rotated-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>rotated-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the width of a row or cell (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_rotated-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis"
+      select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'rotated-width'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <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>
-  </xsl:if>
+<doc:pi name="dbfo_sidebar-width" xmlns="">
+<refpurpose>Specifies the width of a sidebar</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo sidebar-width</tag> PI as a child of a
+    <tag>sidebar</tag> to specify the width of the sidebar.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo sidebar-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>sidebar-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the <tag>sidebar</tag> width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_sidebar-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'sidebar-width'"/>
+  </xsl:call-template>
+</xsl:template>
 
-  <dl>
-    <xsl:call-template name="process.funcsynopsis.list">
-      <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
-    </xsl:call-template>
-  </dl>
+<doc:pi name="dbfo_table-width" xmlns="">
+<refpurpose>Specifies the width for a table or for revhistory
+  output</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo table-width</tag> PI as a child of a
+    <tag>table</tag> or <tag>revhistory</tag> instance (which is
+    rendered as a table in output) to specify the width of the
+    table in output.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo table-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>table-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the table width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_table-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'table-width'"/>
+  </xsl:call-template>
 </xsl:template>
 
-<!-- ==================================================================== -->
+<doc:pi name="dbfo_term-width" xmlns="">
+<refpurpose>Specifies the term width for a variablelist</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo term-width</tag> PI as a child of a
+    <tag>variablelist</tag> to specify the width for
+    <tag>term</tag> output.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo term-width="<replaceable>width</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>term-width="<replaceable>width</replaceable>"</term>
+      <listitem>
+        <para>FIXME: Specifies the term width (in what units?)</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_term-width">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'term-width'"/>
+  </xsl:call-template>
+</xsl:template>
 
-<!-- "need" processing instruction, a kind of soft page break -->
-<!-- A "need" is a request for space on a page.  If the requested space
-     is not available, the page breaks and the content that follows
-     the need request appears on the next page. If the requested
-     space is available, then the request is ignored. -->
+<doc:pi name="dbfo_toc" xmlns="">
+<refpurpose>Species whether a TOC should be generated for a qandaset</refpurpose>
+<refdescription>
+  <para>Use the <tag>dbfo toc</tag> PI as a child of a
+    <tag>jandaset</tag> to specify whether a table of contents
+    (TOC) is generated for the <tag>qandaset</tag>.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo toc="0"|"1"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>toc="0"</term>
+      <listitem>
+        <para>If zero, no TOC is generated</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>toc="1"</term>
+      <listitem>
+        <para>If <code>1</code> (or any non-zero value),
+          a TOC is generated</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo_toc">
+  <xsl:param name="node" select="."/>
+  <xsl:call-template name="dbfo-attribute">
+    <xsl:with-param name="pis" select="$node/processing-instruction('dbfo')"/>
+    <xsl:with-param name="attribute" select="'toc'"/>
+  </xsl:call-template>
+</xsl:template>
 
-<xsl:template match="processing-instruction('dbfo-need')">
+<!-- ==================================================================== -->
 
+<doc:pi name="dbfo-need" xmlns="">
+<refpurpose>Specify a need for space (a kind of soft page break)</refpurpose>
+<refdescription>
+  <para>A “need” is a request for space on a page.  If the
+    requested space is not available, the page breaks and the
+    content that follows the need request appears on the next
+    page. If the requested space is available, then the request is
+    ignored.</para>
+</refdescription>
+  <refsynopsisdiv>
+    <synopsis><tag class="xmlpi">dbfo-need height="<replaceable>n</replaceable>"</tag></synopsis>
+    <synopsis><tag class="xmlpi">dbfo-need space-before="<replaceable>n</replaceable>"</tag></synopsis>
+  </refsynopsisdiv>
+<refparameter>
+  <variablelist>
+    <varlistentry><term>height="<replaceable>n</replaceable>"</term>
+      <listitem>
+        <para>FIXME: the amount of height(?) needed? In what units? pt?.</para>
+      </listitem>
+    </varlistentry>
+    <varlistentry><term>space-before"<replaceable>n</replaceable>"</term>
+      <listitem>
+        <para>FIXME: the amount of space needed before the
+          [something]? In what units? pt?.</para>
+      </listitem>
+    </varlistentry>
+  </variablelist>
+</refparameter>
+</doc:pi>
+<xsl:template name="pi.dbfo-need">
   <xsl:variable name="pi-height">
     <xsl:call-template name="dbfo-attribute">
       <xsl:with-param name="pis" select="."/>
   </xsl:choose>
 </xsl:template>
 
+<!-- ==================================================================== -->
+
+<xsl:template name="dbfo-attribute">
+  <!-- * dbfo-attribute is an interal utility template for retrieving -->
+  <!-- * pseudo-attributes/parameters from PIs -->
+  <xsl:param name="pis" select="processing-instruction('dbfo')"/>
+  <xsl:param name="attribute">filename</xsl:param>
+  <xsl:call-template name="pi-attribute">
+    <xsl:with-param name="pis" select="$pis"/>
+    <xsl:with-param name="attribute" select="$attribute"/>
+  </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<xsl:template match="processing-instruction()">
+</xsl:template>
 
 <!-- ==================================================================== -->
 
+<xsl:template match="processing-instruction('dbfo-need')">
+  <xsl:call-template name="pi.dbfo-need"/>
+</xsl:template>
+
 </xsl:stylesheet>
index 6096ded7f2c304c5f6bcf3fedaf0bc41d00fa746..a29692f671202df036ca1c0aa9eceb5da711ee04 100644 (file)
   </xsl:variable>
 
   <xsl:variable name="label-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'label-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_label-width"/>
   </xsl:variable>
 
   <xsl:variable name="label-length">
   </xsl:variable>
   
   <xsl:variable name="toc">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'toc'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_toc"/>
   </xsl:variable>
 
   <xsl:variable name="toc.params">
   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
 
   <xsl:variable name="label-width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'label-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_label-width"/>
   </xsl:variable>
 
   <xsl:variable name="label-length">
index 467580958b562be13d8b429490f94df0136bb416..276afeade10388a18dd869083713b597abf456a9 100644 (file)
@@ -72,11 +72,7 @@ works</quote>.</para>
 <xsl:template name="calsTable">
 
   <xsl:variable name="keep.together">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'keep-together'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_keep-together"/>
   </xsl:variable>
 
   <xsl:for-each select="tgroup">
@@ -530,24 +526,20 @@ works</quote>.</para>
   <xsl:variable name="explicit.table.width">
     <xsl:choose>
       <xsl:when test="self::entrytbl">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis" 
-                          select="processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'table-width'"/>
-        </xsl:call-template>
+        <xsl:call-template name="pi.dbfo_table-width"/>
       </xsl:when>
       <xsl:when test="self::table or self::informaltable">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis" 
-                          select="processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'table-width'"/>
-        </xsl:call-template>
+        <xsl:call-template name="pi.dbfo_table-width"/>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis" 
-                          select="../processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'table-width'"/>
+        <!-- * no dbfo@table-width PI as a child of this table, so check -->
+        <!-- * the parent of this table to see if the table has any -->
+        <!-- * sibling dbfo@table-width PIs (FIXME: 2007-07 MikeSmith: we -->
+        <!-- * should really instead be checking here just to see if the -->
+        <!-- * first preceding sibling of this table is a -->
+        <!-- * dbfo@table-width PI) -->
+        <xsl:call-template name="pi.dbfo_table-width">
+          <xsl:with-param name="node" select=".."/>
         </xsl:call-template>
       </xsl:otherwise>
     </xsl:choose>
@@ -749,10 +741,7 @@ works</quote>.</para>
 <!-- customize this template to add row properties -->
 <xsl:template name="table.row.properties">
   <xsl:variable name="bgcolor">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'bgcolor'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_bgcolor"/>
   </xsl:variable>
   <xsl:if test="$bgcolor != ''">
     <xsl:attribute name="background-color">
@@ -948,34 +937,26 @@ works</quote>.</para>
       </xsl:variable>
 
       <xsl:variable name="cell-orientation">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis"
-                          select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'orientation'"/>
+        <xsl:call-template name="pi.dbfo_orientation">
+          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="row-orientation">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis"
-                          select="ancestor-or-self::row/processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'orientation'"/>
+        <xsl:call-template name="pi.dbfo_orientation">
+          <xsl:with-param name="node" select="ancestor-or-self::row"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="cell-width">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis"
-                          select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'rotated-width'"/>
+        <xsl:call-template name="pi.dbfo_rotated-width">
+          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
         </xsl:call-template>
       </xsl:variable>
 
       <xsl:variable name="row-width">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis"
-                          select="ancestor-or-self::row/processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'rotated-width'"/>
+        <xsl:call-template name="pi.dbfo_rotated-width">
+          <xsl:with-param name="node" select="ancestor-or-self::row"/>
         </xsl:call-template>
       </xsl:variable>
 
@@ -1002,10 +983,8 @@ works</quote>.</para>
       </xsl:variable>
 
       <xsl:variable name="bgcolor">
-        <xsl:call-template name="dbfo-attribute">
-          <xsl:with-param name="pis"
-                          select="ancestor-or-self::entry/processing-instruction('dbfo')"/>
-          <xsl:with-param name="attribute" select="'bgcolor'"/>
+        <xsl:call-template name="pi.dbfo_bgcolor">
+          <xsl:with-param name="node" select="ancestor-or-self::entry"/>
         </xsl:call-template>
       </xsl:variable>
 
index dccd7f3d3297f64ebbb0aa197fe6bbba2ed2ea00..679756535fde0e722ed74047a05593e47c51978b 100644 (file)
 <xsl:template match="revhistory" mode="titlepage.mode">
 
   <xsl:variable name="explicit.table.width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'table-width'"/>
-    </xsl:call-template>
+    <xsl:call-template name="pi.dbfo_table-width"/>
   </xsl:variable>
 
   <xsl:variable name="table.width">
index d975f769f59540e67ecdf3e96a992d7f2ae43761..2286c1b6f12219339bbfcbe7e4a0ced707cec4ca 100644 (file)
 
   <!-- Extract the <?dbfo linenumbering.*?> PI values -->
   <xsl:variable name="pi.linenumbering.everyNth">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="$pi.context/processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
+    <xsl:call-template name="pi.dbfo_linenumbering.everyNth">
+      <xsl:with-param name="node" select="$pi.context"/>
     </xsl:call-template>
   </xsl:variable>
 
   <xsl:variable name="pi.linenumbering.separator">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="$pi.context/processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
+    <xsl:call-template name="pi.dbfo_linenumbering.separator">
+      <xsl:with-param name="node" select="$pi.context"/>
     </xsl:call-template>
   </xsl:variable>
 
   <xsl:variable name="pi.linenumbering.width">
-    <xsl:call-template name="dbfo-attribute">
-      <xsl:with-param name="pis"
-                      select="$pi.context/processing-instruction('dbfo')"/>
-      <xsl:with-param name="attribute" select="'linenumbering.width'"/>
+    <xsl:call-template name="pi.dbfo_linenumbering.width">
+      <xsl:with-param name="node" select="$pi.context"/>
     </xsl:call-template>
   </xsl:variable>