]> granicus.if.org Git - docbook-dsssl/commitdiff
Added reference.autolabel parameter for controlling labels on
authorMichael Smith <xmldoc@users.sourceforge.net>
Fri, 1 Sep 2006 06:40:59 +0000 (06:40 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Fri, 1 Sep 2006 06:40:59 +0000 (06:40 +0000)
reference output.

xsl/common/labels.xsl
xsl/params/reference.autolabel.xml [new file with mode: 0644]

index 38e1f5e553e4fe6b334e0dc7038eaacbfa49f7ca..c447275d7b73ae5fd33149d6da0063201252f258 100644 (file)
@@ -192,10 +192,10 @@ element label.</para>
     <xsl:when test="@label">
       <xsl:value-of select="@label"/>
     </xsl:when>
-    <xsl:when test="string($part.autolabel) != 0">
+    <xsl:when test="string($reference.autolabel) != 0">
       <xsl:variable name="format">
         <xsl:call-template name="autolabel.format">
-          <xsl:with-param name="format" select="$part.autolabel"/>
+          <xsl:with-param name="format" select="$reference.autolabel"/>
         </xsl:call-template>
       </xsl:variable>
       <xsl:number from="book" count="reference" format="{$format}" level="any"/>
diff --git a/xsl/params/reference.autolabel.xml b/xsl/params/reference.autolabel.xml
new file mode 100644 (file)
index 0000000..53f771f
--- /dev/null
@@ -0,0 +1,63 @@
+<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+          id="reference.autolabel">
+<refmeta>
+<refentrytitle>reference.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>reference.autolabel</refname>
+<refpurpose>Specifies the labeling format for Reference titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='reference.autolabel.frag'><xsl:param name="reference.autolabel" select="'I'"/></src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If zero, then references will not be numbered.
+Otherwise references will be numbered, using the parameter value
+as the number format if the value matches one of the following:
+</para>
+
+<variablelist>
+  <varlistentry>
+    <term>1 or arabic</term>
+    <listitem>
+      <para>Arabic numeration (1, 2, 3 ...).</para>
+    </listitem>
+  </varlistentry>
+  <varlistentry>
+    <term>A or upperalpha</term>
+    <listitem>
+      <para>Uppercase letter numeration (A, B, C ...).</para>
+    </listitem>
+  </varlistentry>
+  <varlistentry>
+    <term>a or loweralpha</term>
+    <listitem>
+      <para>Lowercase letter numeration (a, b, c ...).</para>
+    </listitem>
+  </varlistentry>
+  <varlistentry>
+    <term>I or upperroman</term>
+    <listitem>
+      <para>Uppercase roman numeration (I, II, III ...).</para>
+    </listitem>
+  </varlistentry>
+  <varlistentry>
+    <term>i or lowerroman</term>
+    <listitem>
+      <para>Lowercase roman letter numeration (i, ii, iii ...).</para>
+    </listitem>
+  </varlistentry>
+</variablelist>
+
+<para>Any nonzero value other than the above will generate
+the default number format (upperroman).
+</para>
+
+
+</refsect1>
+</refentry>