]> granicus.if.org Git - docbook-dsssl/commitdiff
Moved logging template and related templates to separate
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Jun 2007 13:05:06 +0000 (13:05 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Jun 2007 13:05:06 +0000 (13:05 +0000)
utility.xsl file so that can be imported without importing the
whole common.xsl file (which is necessary for the build and for
using the logging template in standalone namespace-stripping
because the common.xsl file assumes it will be imported along with
all the params, which it can't be when building lib.xsl).

14 files changed:
xsl/common/common.xsl
xsl/common/stripns.xsl
xsl/common/utility.xsl [new file with mode: 0644]
xsl/doc/utility/.cvsignore [new file with mode: 0644]
xsl/doc/utility/Makefile [new file with mode: 0644]
xsl/docsrc/reference.dbk
xsl/docsrc/reference.xml
xsl/docsrc/utility/.cvsignore [new file with mode: 0644]
xsl/docsrc/utility/Makefile [new file with mode: 0644]
xsl/fo/docbook.xsl
xsl/fo/table.xsl
xsl/html/docbook.xsl
xsl/lib/lib.xweb
xsl/template/titlepage.xsl

index fd95fcca015cdf344e400d5bc77624603544d45b..cc1e630ad0ac0d3842469b78a2dd08c3a8ff8b5f 100644 (file)
@@ -25,7 +25,7 @@ $Id$
 </releaseinfo>
 <author><surname>Walsh</surname>
 <firstname>Norman</firstname></author>
-<copyright><year>1999</year><year>2000</year>
+<copyright><year>1999</year><year>2007</year>
 <holder>Norman Walsh</holder>
 </copyright>
 </referenceinfo>
@@ -34,17 +34,16 @@ $Id$
 <partintro id="partintro">
 <title>Introduction</title>
 
-<para>This is technical reference documentation for the DocBook XSL
-Stylesheets; it documents (some of) the parameters, templates, and
-other elements of the stylesheets.</para>
+<para>This is technical reference documentation for the “common”
+templates in the DocBook XSL Stylesheets. The common templates are
+“common” because they are shared across output formats (that is,
+they’re not output-format-dependent).</para>
 
-<para>This is not intended to be <quote>user</quote> documentation.
-It is provided for developers writing customization layers for the
-stylesheets, and for anyone who's interested in <quote>how it
-works</quote>.</para>
+<para>This documentation is not intended to be <quote>user</quote>
+documentation.  It is provided for developers writing
+customization layers for the stylesheets, and for anyone who's
+interested in <quote>how it works</quote>.</para>
 
-<para>Although I am trying to be thorough, this documentation is known
-to be incomplete. Don't forget to read the source, too :-)</para>
 </partintro>
 
 </doc:reference>
@@ -2023,254 +2022,4 @@ engine does not support it.
     </xsl:choose>
   </xsl:template>
 
-<!-- ===================================== -->
-
-<doc:template name="log.message" xmlns="">
-  <refpurpose>Logs/emits formatted notes and warnings</refpurpose>
-
-  <refdescription>
-    <para>The <function>log.message</function> template is a utility
-    template for logging/emitting formatted messages&#xa0;– that is,
-    notes and warnings, along with a given log "level" and an
-    identifier for the "source" that the message relates to.</para>
-  </refdescription>
-
-  <refparameter>
-    <variablelist>
-      <varlistentry>
-        <term>level</term>
-        <listitem>
-          <para>Text to log/emit in the message-level field to
-            indicate the message level
-          (<literal>Note</literal> or
-          <literal>Warning</literal>)</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>source</term>
-        <listitem>
-          <para>Text to log/emit in the source field to identify the
-            “source” to which the notification/warning relates.
-            This can be any arbitrary string, but because the
-            message lacks line and column numbers to identify the
-            exact part of the source document to which it
-            relates, the intention is that the value you pass
-            into the <literal>source</literal> parameter should
-            give the user some way to identify the portion of
-            their source document on which to take potentially
-            take action in response to the log message (for
-            example, to edit, change, or add content).</para>
-          <para>So the <literal>source</literal> value should be,
-            for example, an ID, book/chapter/article title, title
-            of some formal object, or even a string giving an
-            XPath expression.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>context-desc</term>
-        <listitem>
-          <para>Text to log/emit in the context-description field to
-            describe the context for the message.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>context-desc-field-length</term>
-        <listitem>
-          <para>Specifies length of the context-description field
-            (in characters); default is 12</para>
-          <para>If the text specified by the
-            <literal>context-desc</literal> parameter is longer
-            than the number of characters specified in
-            <literal>context-desc-field-length</literal>, it is
-            truncated to <literal>context-desc-field-length</literal>
-            (12 characters by default).</para>
-          <para>If the specified text is shorter than
-            <literal>context-desc-field-length</literal>,
-          it is right-padded out to
-          <literal>context-desc-field-length</literal> (12 by
-          default).</para>
-        <para>If no value has been specified for the
-          <literal>context-desc</literal> parameter, the field is
-          left empty and the text of the log message begins with
-          the value of the <literal>message</literal>
-          parameter.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>message</term>
-        <listitem>
-          <para>Text to log/emit in the actual message field</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term>message-field-length</term>
-        <listitem>
-          <para>Specifies length of the message
-            field (in characters); default is 45</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-  </refparameter>
-  <refreturn>
-  <para>Outputs a message (generally, to standard error).</para></refreturn>
-</doc:template>
-<xsl:template name="log.message">
-  <xsl:param name="level"/>
-  <xsl:param name="source"/>
-  <xsl:param name="context-desc"/>
-  <xsl:param name="context-desc-field-length">12</xsl:param>
-  <xsl:param name="context-desc-padded">
-    <xsl:if test="not($context-desc = '')">
-      <xsl:call-template name="pad-string">
-        <xsl:with-param name="leftRight">right</xsl:with-param>
-        <xsl:with-param name="padVar"
-          select="substring($context-desc, 1, $context-desc-field-length)"/>
-        <xsl:with-param name="length" select="$context-desc-field-length"/>
-      </xsl:call-template>
-    </xsl:if>
-  </xsl:param>
-  <xsl:param name="message"/>
-  <xsl:param name="message-field-length" select="45"/>
-  <xsl:param name="message-padded">
-    <xsl:variable name="spaces-for-blank-level">
-      <!-- * if the level field is blank, we'll need to pad out -->
-      <!-- * the message field with spaces to compensate -->
-      <xsl:choose>
-        <xsl:when test="$level = ''">
-          <xsl:value-of select="4 + 2"/>
-          <!-- * 4 = hard-coded length of comment text ("Note" or "Warn") -->
-          <!-- * + 2 = length of colon-plus-space separator ": " -->
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="0"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="spaces-for-blank-context-desc">
-      <!-- * if the context-description field is blank, we'll need -->
-      <!-- * to pad out the message field with spaces to compensate -->
-      <xsl:choose>
-        <xsl:when test="$context-desc = ''">
-          <xsl:value-of select="$context-desc-field-length + 2"/>
-          <!-- * + 2 = length of colon-plus-space separator ": " -->
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="0"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="extra-spaces"
-      select="$spaces-for-blank-level + $spaces-for-blank-context-desc"/>
-    <xsl:call-template name="pad-string">
-      <xsl:with-param name="leftRight">right</xsl:with-param>
-      <xsl:with-param name="padVar"
-        select="substring($message, 1, ($message-field-length + $extra-spaces))"/>
-      <xsl:with-param name="length"
-        select="$message-field-length + $extra-spaces"/>
-    </xsl:call-template>
-  </xsl:param>
-  <!-- * emit the actual log message -->
-  <xsl:message>
-    <xsl:if test="not($level = '')">
-      <xsl:value-of select="$level"/>
-      <xsl:text>: </xsl:text>
-    </xsl:if>
-    <xsl:if test="not($context-desc = '')">
-      <xsl:value-of select="$context-desc-padded"/>
-      <xsl:text>: </xsl:text>
-    </xsl:if>
-    <xsl:value-of select="$message-padded"/>
-    <xsl:text>  </xsl:text>
-    <xsl:value-of select="$source"/>
-  </xsl:message>
-</xsl:template>
-
-<!-- ===================================== -->
-<doc:template name="get.doc.title" xmlns="">
-  <refpurpose>Get a title for the current document</refpurpose>
-  <refdescription>
-    <para>The <function>get.doc.title</function> template is a
-      utility template for returning the first title found in the
-      current document.</para>
-  </refdescription>
-  <refreturn>
-  <para>Returns a string containing some identifying title for the
-    current document .</para></refreturn>
-</doc:template>
-<xsl:template name="get.doc.title">
-  <xsl:choose>
-    <xsl:when test="//*[local-name() = 'title'
-      or local-name() = 'refname']">
-      <xsl:value-of select="//*[local-name() = 'title'
-        or local-name() = 'refname'][1]"/>
-    </xsl:when>
-    <xsl:when test="substring(local-name(*[1]),
-      string-length(local-name(*[1])-3) = 'info')
-      and *[1]/*[local-name() = 'title']">
-      <xsl:value-of select="*[1]/*[local-name() = 'title'][1]"/>
-    </xsl:when>
-  </xsl:choose>
-</xsl:template>
-
-<!-- ===================================== -->
-<doc:template name="pad.string" xmlns="">
-  <refpurpose>Right-pad or left-pad a string out to a certain length</refpurpose>
-  <refdescription>
-    <para>This function takes string <parameter>padVar</parameter> and
-      pads it out in the direction <parameter>rightLeft</parameter> to
-      the string-length <parameter>length</parameter>, using string
-      <parameter>padChar</parameter> (a space character by default) as
-      the padding string (note that <parameter>padChar</parameter> can
-      be a string; it is not limited to just being a single
-      character).</para>
-
-    <note>
-      <para>This function began as a copy of Nate Austin's
-        <function>prepend-pad</function> function in the <ulink
-          url="http://www.dpawson.co.uk/xsl/sect2/padding.html" >Padding
-          Content</ulink> section of Dave Pawson's <ulink
-          url="http://www.dpawson.co.uk/xsl/index.html" >XSLT
-          FAQ</ulink>.</para>
-    </note>
-  </refdescription>
-  <refreturn>
-  <para>Returns a (padded) string.</para></refreturn>
-</doc:template>
-
-<xsl:template name="pad-string">
-  <!-- * recursive template to right/left pad the value with -->
-  <!-- * whatever padChar is passed in -->
-  <xsl:param name="padChar" select="' '"/>
-  <xsl:param name="leftRight">left</xsl:param>
-  <xsl:param name="padVar"/>
-  <xsl:param name="length"/>
-  <xsl:choose>
-    <xsl:when test="string-length($padVar) &lt; $length">
-      <xsl:call-template name="pad-string">
-        <xsl:with-param name="padChar" select="$padChar"/>
-        <xsl:with-param name="leftRight" select="$leftRight"/>
-        <xsl:with-param name="padVar">
-          <xsl:choose>
-            <!-- * determine whether string should be -->
-            <!-- * right- or left-padded -->
-            <xsl:when test="$leftRight = 'left'">
-              <!-- * pad it to left -->
-              <xsl:value-of select="concat($padChar,$padVar)"/>
-            </xsl:when>
-            <xsl:otherwise>
-              <!-- * otherwise, right-pad the string -->
-              <xsl:value-of select="concat($padVar,$padChar)"/>
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:with-param>
-        <xsl:with-param name="length" select="$length"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of 
-        select="substring($padVar,string-length($padVar) - $length + 1)"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
 </xsl:stylesheet>
index ad3d4f5db5c9e333af633758d59e86152a6f6fe3..a5bedab98624662273d193675f916d3fc3ebc663 100644 (file)
@@ -20,7 +20,7 @@
      versions of the DocBook stylesheets.
      ******************************************************************** -->
 
-<xsl:import href="../common/common.xsl"/>
+<xsl:import href="utility.xsl"/>
 
 <!-- * Get a title for current doc so that we let the user -->
 <!-- * know what document we are processing at this point. -->
diff --git a/xsl/common/utility.xsl b/xsl/common/utility.xsl
new file mode 100644 (file)
index 0000000..7a19d30
--- /dev/null
@@ -0,0 +1,304 @@
+<?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:dyn="http://exslt.org/dynamic"
+                xmlns:saxon="http://icl.com/saxon"
+                exclude-result-prefixes="doc dyn saxon"
+                version='1.0'>
+
+<!-- ********************************************************************
+     $Id: common.xsl 6867 2007-06-25 04:36:37Z xmldoc $
+     ********************************************************************
+
+     This file is part of the XSL DocBook Stylesheet distribution.
+     See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+     and other information.
+
+     ******************************************************************** -->
+
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id: common.xsl 6867 2007-06-25 04:36:37Z xmldoc $
+</releaseinfo>
+<corpauthor>The DocBook Project Development Team</corpauthor>
+<copyright><year>2007</year>
+<holder>The DocBook Project</holder>
+</copyright>
+</referenceinfo>
+<title>Utility Template Reference</title>
+
+<partintro id="partintro">
+<title>Introduction</title>
+
+<para>This is technical reference documentation for the
+  miscellaneous utility templates in the DocBook XSL
+  Stylesheets.</para>
+
+<note>
+<para>These templates are defined in a separate file from the set
+  of “common” templates because some of the comment templates
+  reference DocBook XSL stylesheet parameters, requiring the
+  entire set of parameters to be imported/included in any
+  stylesheet that imports/includes the common templates.</para>
+<para>The utility templates don’t import or include any DocBook
+  XSL stylesheet parameters, so the utility templates can be used
+  without importing the whole set of parameters.</para>
+</note>
+
+<para>The following documentation is not intended to be
+  <quote>user</quote> documentation.  It is provided for developers
+  writing customization layers for the stylesheets, and for anyone
+  who's interested in <quote>how it works</quote>.</para>
+</partintro>
+</doc:reference>
+
+<!-- ====================================================================== -->
+
+<doc:template name="log.message" xmlns="">
+  <refpurpose>Logs/emits formatted notes and warnings</refpurpose>
+
+  <refdescription>
+    <para>The <function>log.message</function> template is a utility
+    template for logging/emitting formatted messages&#xa0;– that is,
+    notes and warnings, along with a given log “level” and an
+    identifier for the “source” that the message relates to.</para>
+  </refdescription>
+
+  <refparameter>
+    <variablelist>
+      <varlistentry>
+        <term>level</term>
+        <listitem>
+          <para>Text to log/emit in the message-level field to
+            indicate the message level
+          (<literal>Note</literal> or
+          <literal>Warning</literal>)</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>source</term>
+        <listitem>
+          <para>Text to log/emit in the source field to identify the
+            “source” to which the notification/warning relates.
+            This can be any arbitrary string, but because the
+            message lacks line and column numbers to identify the
+            exact part of the source document to which it
+            relates, the intention is that the value you pass
+            into the <literal>source</literal> parameter should
+            give the user some way to identify the portion of
+            their source document on which to take potentially
+            take action in response to the log message (for
+            example, to edit, change, or add content).</para>
+          <para>So the <literal>source</literal> value should be,
+            for example, an ID, book/chapter/article title, title
+            of some formal object, or even a string giving an
+            XPath expression.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>context-desc</term>
+        <listitem>
+          <para>Text to log/emit in the context-description field to
+            describe the context for the message.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>context-desc-field-length</term>
+        <listitem>
+          <para>Specifies length of the context-description field
+            (in characters); default is 12</para>
+          <para>If the text specified by the
+            <literal>context-desc</literal> parameter is longer
+            than the number of characters specified in
+            <literal>context-desc-field-length</literal>, it is
+            truncated to <literal>context-desc-field-length</literal>
+            (12 characters by default).</para>
+          <para>If the specified text is shorter than
+            <literal>context-desc-field-length</literal>,
+          it is right-padded out to
+          <literal>context-desc-field-length</literal> (12 by
+          default).</para>
+        <para>If no value has been specified for the
+          <literal>context-desc</literal> parameter, the field is
+          left empty and the text of the log message begins with
+          the value of the <literal>message</literal>
+          parameter.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>message</term>
+        <listitem>
+          <para>Text to log/emit in the actual message field</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>message-field-length</term>
+        <listitem>
+          <para>Specifies length of the message
+            field (in characters); default is 45</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </refparameter>
+  <refreturn>
+  <para>Outputs a message (generally, to standard error).</para></refreturn>
+</doc:template>
+<xsl:template name="log.message">
+  <xsl:param name="level"/>
+  <xsl:param name="source"/>
+  <xsl:param name="context-desc"/>
+  <xsl:param name="context-desc-field-length">12</xsl:param>
+  <xsl:param name="context-desc-padded">
+    <xsl:if test="not($context-desc = '')">
+      <xsl:call-template name="pad-string">
+        <xsl:with-param name="leftRight">right</xsl:with-param>
+        <xsl:with-param name="padVar"
+          select="substring($context-desc, 1, $context-desc-field-length)"/>
+        <xsl:with-param name="length" select="$context-desc-field-length"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:param>
+  <xsl:param name="message"/>
+  <xsl:param name="message-field-length" select="45"/>
+  <xsl:param name="message-padded">
+    <xsl:variable name="spaces-for-blank-level">
+      <!-- * if the level field is blank, we'll need to pad out -->
+      <!-- * the message field with spaces to compensate -->
+      <xsl:choose>
+        <xsl:when test="$level = ''">
+          <xsl:value-of select="4 + 2"/>
+          <!-- * 4 = hard-coded length of comment text ("Note" or "Warn") -->
+          <!-- * + 2 = length of colon-plus-space separator ": " -->
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="0"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="spaces-for-blank-context-desc">
+      <!-- * if the context-description field is blank, we'll need -->
+      <!-- * to pad out the message field with spaces to compensate -->
+      <xsl:choose>
+        <xsl:when test="$context-desc = ''">
+          <xsl:value-of select="$context-desc-field-length + 2"/>
+          <!-- * + 2 = length of colon-plus-space separator ": " -->
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="0"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="extra-spaces"
+      select="$spaces-for-blank-level + $spaces-for-blank-context-desc"/>
+    <xsl:call-template name="pad-string">
+      <xsl:with-param name="leftRight">right</xsl:with-param>
+      <xsl:with-param name="padVar"
+        select="substring($message, 1, ($message-field-length + $extra-spaces))"/>
+      <xsl:with-param name="length"
+        select="$message-field-length + $extra-spaces"/>
+    </xsl:call-template>
+  </xsl:param>
+  <!-- * emit the actual log message -->
+  <xsl:message>
+    <xsl:if test="not($level = '')">
+      <xsl:value-of select="$level"/>
+      <xsl:text>: </xsl:text>
+    </xsl:if>
+    <xsl:if test="not($context-desc = '')">
+      <xsl:value-of select="$context-desc-padded"/>
+      <xsl:text>: </xsl:text>
+    </xsl:if>
+    <xsl:value-of select="$message-padded"/>
+    <xsl:text>  </xsl:text>
+    <xsl:value-of select="$source"/>
+  </xsl:message>
+</xsl:template>
+
+<!-- ===================================== -->
+<doc:template name="get.doc.title" xmlns="">
+  <refpurpose>Gets a title from the current document</refpurpose>
+  <refdescription>
+    <para>The <function>get.doc.title</function> template is a
+      utility template for returning the first title found in the
+      current document.</para>
+  </refdescription>
+  <refreturn>
+  <para>Returns a string containing some identifying title for the
+    current document .</para></refreturn>
+</doc:template>
+<xsl:template name="get.doc.title">
+  <xsl:choose>
+    <xsl:when test="//*[local-name() = 'title'
+      or local-name() = 'refname']">
+      <xsl:value-of select="//*[local-name() = 'title'
+        or local-name() = 'refname'][1]"/>
+    </xsl:when>
+    <xsl:when test="substring(local-name(*[1]),
+      string-length(local-name(*[1])-3) = 'info')
+      and *[1]/*[local-name() = 'title']">
+      <xsl:value-of select="*[1]/*[local-name() = 'title'][1]"/>
+    </xsl:when>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ===================================== -->
+<doc:template name="pad-string" xmlns="">
+  <refpurpose>Right-pads or left-pads a string out to a certain length</refpurpose>
+  <refdescription>
+    <para>This function takes string <parameter>padVar</parameter> and
+      pads it out in the direction <parameter>rightLeft</parameter> to
+      the string-length <parameter>length</parameter>, using string
+      <parameter>padChar</parameter> (a space character by default) as
+      the padding string (note that <parameter>padChar</parameter> can
+      be a string; it is not limited to just being a single
+      character).</para>
+    <note>
+      <para>This function began as a copy of Nate Austin's
+        <function>prepend-pad</function> function in the <ulink
+          url="http://www.dpawson.co.uk/xsl/sect2/padding.html" >Padding
+          Content</ulink> section of Dave Pawson's <ulink
+          url="http://www.dpawson.co.uk/xsl/index.html" >XSLT
+          FAQ</ulink>.</para>
+    </note>
+  </refdescription>
+  <refreturn>
+  <para>Returns a (padded) string.</para></refreturn>
+</doc:template>
+<xsl:template name="pad-string">
+  <!-- * recursive template to right/left pad the value with -->
+  <!-- * whatever padChar is passed in -->
+  <xsl:param name="padChar" select="' '"/>
+  <xsl:param name="leftRight">left</xsl:param>
+  <xsl:param name="padVar"/>
+  <xsl:param name="length"/>
+  <xsl:choose>
+    <xsl:when test="string-length($padVar) &lt; $length">
+      <xsl:call-template name="pad-string">
+        <xsl:with-param name="padChar" select="$padChar"/>
+        <xsl:with-param name="leftRight" select="$leftRight"/>
+        <xsl:with-param name="padVar">
+          <xsl:choose>
+            <!-- * determine whether string should be -->
+            <!-- * right- or left-padded -->
+            <xsl:when test="$leftRight = 'left'">
+              <!-- * pad it to left -->
+              <xsl:value-of select="concat($padChar,$padVar)"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <!-- * otherwise, right-pad the string -->
+              <xsl:value-of select="concat($padVar,$padChar)"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:with-param>
+        <xsl:with-param name="length" select="$length"/>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of 
+        select="substring($padVar,string-length($padVar) - $length + 1)"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xsl/doc/utility/.cvsignore b/xsl/doc/utility/.cvsignore
new file mode 100644 (file)
index 0000000..2d19fc7
--- /dev/null
@@ -0,0 +1 @@
+*.html
diff --git a/xsl/doc/utility/Makefile b/xsl/doc/utility/Makefile
new file mode 100644 (file)
index 0000000..b5a0698
--- /dev/null
@@ -0,0 +1,4 @@
+include ../../../releasetools/Variables.mk
+VPATH=../../docsrc/utility
+HTMLFILES = utility.html
+include ../Makefile.incl
index 36444c49b56b1f03a147a50f982a6722c98c1d49..339d713836b83f47cad4d1c194034d955bec1933 100644 (file)
         href="./refentry/refentry.refsect1.xml"
         xpointer="xpointer(/reference/title/node())"/></para>
       </listitem>
+      <listitem>
+        <para><xi:include
+        href="./utility/utility.refsect1.xml"
+        xpointer="xpointer(/reference/title/node())"/></para>
+      </listitem>
       <listitem>
         <para><xi:include
         href="./fo/table.refsect1.xml"
index 42b139ff63cb00d68da94ee35b0de7745e134c06..05e14a242c235025a96fe5a3ac966f3c47aeaf66 100644 (file)
@@ -2,6 +2,7 @@
 PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
 <!ENTITY common.xml SYSTEM "common/common.xml" NDATA SGML>
+<!ENTITY utility.xml SYSTEM "utility/utility.xml" NDATA SGML>
 <!ENTITY refentry.xml SYSTEM "refentry/refentry.xml" NDATA SGML>
 <!ENTITY lib.xml SYSTEM "../lib/lib.xml" NDATA SGML>
 <!ENTITY html-param.xml SYSTEM "html/docparam.xml" NDATA SGML>
@@ -90,6 +91,9 @@ PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
       <listitem><para><olink type="title" localinfo="refentry/refentry.html"
       targetdocent="refentry.xml"/></para>
       </listitem>
+      <listitem><para><olink type="title" localinfo="utility/utility.html"
+      targetdocent="utility.xml"/></para>
+      </listitem>
       <listitem><para><olink type="title" localinfo="fo/table.html"
       targetdocent="fo-table.xml"/></para>
       </listitem>
diff --git a/xsl/docsrc/utility/.cvsignore b/xsl/docsrc/utility/.cvsignore
new file mode 100644 (file)
index 0000000..6722cd9
--- /dev/null
@@ -0,0 +1 @@
+*.xml
diff --git a/xsl/docsrc/utility/Makefile b/xsl/docsrc/utility/Makefile
new file mode 100644 (file)
index 0000000..259c187
--- /dev/null
@@ -0,0 +1,4 @@
+include ../../../releasetools/Variables.mk
+VPATH=../../common
+XMLFILES = utility.xml utility.refsect1.xml
+include ../Makefile.incl
index 553329136dfc661ea6208d5d873fec85f9c0e6a7..f4956e96ce3f8ad2ce8fc47c7281bbc261d66969 100644 (file)
@@ -29,6 +29,7 @@
 <xsl:include href="../lib/lib.xsl"/>
 <xsl:include href="../common/l10n.xsl"/>
 <xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/utility.xsl"/>
 <xsl:include href="../common/labels.xsl"/>
 <xsl:include href="../common/titles.xsl"/>
 <xsl:include href="../common/subtitles.xsl"/>
index 0389be4778bd3a6fca58e48c67a6273bd46ae8e1..cf2f4ac2a46031b42291f0e624408bec3288ddf0 100644 (file)
@@ -38,17 +38,14 @@ $Id$
 <partintro id="partintro">
 <title>Introduction</title>
 
-<para>This is technical reference documentation for the DocBook XSL
-Stylesheets; it documents (some of) the parameters, templates, and
-other elements of the stylesheets.</para>
+<para>This is technical reference documentation for the FO
+table-processing templates in the DocBook XSL Stylesheets.</para>
 
 <para>This is not intended to be <quote>user</quote> documentation.
 It is provided for developers writing customization layers for the
 stylesheets, and for anyone who's interested in <quote>how it
 works</quote>.</para>
 
-<para>Although I am trying to be thorough, this documentation is known
-to be incomplete. Don't forget to read the source, too :-)</para>
 </partintro>
 </doc:reference>
 
index 87c7c958724f3ea5f1a64dbf1182e821951c8034..c756895c9a04d415910c79a86f11127294f8fe4d 100644 (file)
@@ -27,6 +27,7 @@
 <xsl:include href="../lib/lib.xsl"/>
 <xsl:include href="../common/l10n.xsl"/>
 <xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/utility.xsl"/>
 <xsl:include href="../common/labels.xsl"/>
 <xsl:include href="../common/titles.xsl"/>
 <xsl:include href="../common/subtitles.xsl"/>
index f53a373aa83c52cec130cf0b77542c2d6a048acc..aebceccef5696179e496d5c0f9fd8f1414068eb9 100644 (file)
 
 <preface id="intro"><title>Introduction</title>
 
-<para>This is technical reference documentation for the DocBook XSL
-Stylesheets; it documents (some of) the parameters, templates, and
-other elements of the stylesheets.</para>
+<para>This is technical reference documentation for the
+vocabulary-independent “library” templates in the DocBook XSL
+Stylesheets.</para>
 
 <para>This is not intended to be <quote>user</quote> documentation.
 It is provided for developers writing customization layers for the
 stylesheets, and for anyone who's interested in <quote>how it
 works</quote>.</para>
 
-<para>Although I am trying to be thorough, this documentation is known
-to be incomplete. Don't forget to read the source, too :-)</para>
-
 </preface>
 
 <reference id="generallibrary">
index a461e3da7f074c37befff2b361d2bfe959a0bb0f..5dd7107a4994f71e69ac67974faf9e673ed472cc 100644 (file)
@@ -42,17 +42,14 @@ $Id$
 <partintro id="intro_partintro">
 <title>Introduction</title>
 
-<para>This is technical reference documentation for the DocBook XSL
-Stylesheets; it documents (some of) the parameters, templates, and
-other elements of the stylesheets.</para>
+<para>This is technical reference documentation for the
+“titlepage” templates in the DocBook XSL Stylesheets.</para>
 
 <para>This is not intended to be <quote>user</quote> documentation.
 It is provided for developers writing customization layers for the
 stylesheets, and for anyone who's interested in <quote>how it
 works</quote>.</para>
 
-<para>Although I am trying to be thorough, this documentation is known
-to be incomplete. Don't forget to read the source, too :-)</para>
 </partintro>
 
 </doc:reference>