You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@jakarta.apache.org by hl...@apache.org on 2005/10/31 16:32:38 UTC

svn commit: r329839 [3/4] - in /jakarta/site: ./ docs/site/ docs/site/news/ xdocs/stylesheets/ xdocs/stylesheets/xsltslt-1.2.1/

Added: jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/markup.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/markup.xsl?rev=329839&view=auto
==============================================================================
--- jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/markup.xsl (added)
+++ jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/markup.xsl Mon Oct 31 07:32:25 2005
@@ -0,0 +1,789 @@
+<xsl:stylesheet version='1.0'
+  xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+  xmlns:doc='http://xsltsl.org/xsl/documentation/1.0'
+  xmlns:markup='http://xsltsl.org/markup'
+  xmlns:str='http://xsltsl.org/string'
+  extension-element-prefixes='doc markup str'>
+
+  <doc:reference xmlns=''>
+    <referenceinfo>
+      <releaseinfo role="meta">
+	$Id: markup.xsl,v 1.5 2003/03/31 21:07:28 balls Exp $
+      </releaseinfo>
+      <author>
+	<surname>Ball</surname>
+	<firstname>Steve</firstname>
+      </author>
+      <copyright>
+	<year>2003</year>
+	<year>2001</year>
+	<holder>Steve Ball</holder>
+      </copyright>
+    </referenceinfo>
+
+    <title>XML Markup Templates</title>
+
+    <partintro>
+      <section>
+	<title>Introduction</title>
+
+	<para>This stylesheet module provides functions for generating literal XML markup.</para>
+
+      </section>
+    </partintro>
+
+  </doc:reference>
+
+  <doc:template name="markup:xml-declaration" xmlns="">
+    <refpurpose>Create an XML Declaration</refpurpose>
+
+    <refdescription>
+      <para>This template returns an XML Declaration.  Although the XSLT standard provides control over the generation of the XML Declaration, this template may be useful in circumstances where the values must be computed at runtime.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>version</term>
+	  <listitem>
+	    <para>Version number.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>standalone</term>
+	  <listitem>
+	    <para>Standalone indication.  Must be value "yes" or "no".</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>encoding</term>
+	  <listitem>
+	    <para>Character encoding.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an XML Declaration as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:xml-declaration'>
+    <xsl:param name='version' select="'1.0'"/>
+    <xsl:param name='standalone'/>
+    <xsl:param name='encoding'/>
+
+    <xsl:text disable-output-escaping='yes'>&lt;?xml version="</xsl:text>
+    <xsl:copy-of select="$version"/>
+    <xsl:text>"</xsl:text>
+
+    <xsl:choose>
+      <xsl:when test="string-length($standalone) = 0"/>
+      <xsl:when test='$standalone = "yes" or $standalone = "no"'>
+        <xsl:text> standalone="</xsl:text>
+        <xsl:copy-of select="$standalone"/>
+        <xsl:text>"</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:message terminate="yes">invalid value "<xsl:value-of select="$standalone"/>" for standalone attribute</xsl:message>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test='string-length($encoding) &gt; 0'>
+      <xsl:text> encoding="</xsl:text>
+      <xsl:copy-of select='$encoding'/>
+      <xsl:text>"</xsl:text>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>?&gt;
+</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:doctype-declaration" xmlns="">
+    <refpurpose>Create a Document Type Declaration</refpurpose>
+
+    <refdescription>
+      <para>This template returns a Document Type Declaration.  Although the XSLT standard provides control over the generation of a Document Type Declaration, this template may be useful in circumstances where the values for the identifiers or the internal subset must be computed at runtime.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>docel</term>
+	  <listitem>
+	    <para>The name of the document element.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>publicid</term>
+	  <listitem>
+	    <para>The public identifier for the external DTD subset.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>systemid</term>
+	  <listitem>
+	    <para>The system identifier for the external DTD subset.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>internaldtd</term>
+	  <listitem>
+	    <para>The internal DTD subset.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns a Document Type Declaration as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:doctype-declaration'>
+    <xsl:param name='docel'/>
+    <xsl:param name='publicid'/>
+    <xsl:param name='systemid'/>
+    <xsl:param name='internaldtd'/>
+
+    <xsl:if test='string-length($docel) = 0'>
+      <xsl:message terminate='yes'>No document element specified</xsl:message>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE </xsl:text>
+    <xsl:copy-of select="$docel"/>
+
+    <xsl:call-template name='markup:external-identifier'>
+      <xsl:with-param name='publicid' select='$publicid'/>
+      <xsl:with-param name='systemid' select='$systemid'/>
+      <xsl:with-param name='leading-space' select='true()'/>
+    </xsl:call-template>
+
+    <xsl:if test='string-length($internaldtd) &gt; 0'>
+      <xsl:text> [</xsl:text>
+      <xsl:copy-of select='$internaldtd'/>
+      <xsl:text>]</xsl:text>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&gt;
+</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:element-declaration" xmlns="">
+    <refpurpose>Create an Element Declaration</refpurpose>
+
+    <refdescription>
+      <para>This template returns an element declaration..</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>type</term>
+	  <listitem>
+	    <para>The element type.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>content-spec</term>
+	  <listitem>
+	    <para>The content specification.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an element declaration as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:element-declaration'>
+    <xsl:param name='type'/>
+    <xsl:param name='content-spec' select="'ANY'"/>
+
+    <xsl:if test='string-length($type) = 0'>
+      <xsl:message terminate='yes'>element type must be specified</xsl:message>
+    </xsl:if>
+    <xsl:if test='string-length($content-spec) = 0'>
+      <xsl:message terminate='yes'>content specification must be specified</xsl:message>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&lt;!ELEMENT </xsl:text>
+    <xsl:copy-of select='$type'/>
+    <xsl:text> </xsl:text>
+    <xsl:copy-of select='$content-spec'/>
+    <xsl:text disable-output-escaping='yes'>&gt;</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:attlist-declaration" xmlns="">
+    <refpurpose>Create an Attribute List Declaration</refpurpose>
+
+    <refdescription>
+      <para>This template returns an attribute list declaration.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>type</term>
+	  <listitem>
+	    <para>The element type.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>attr-defns</term>
+	  <listitem>
+	    <para>Attribute definitions.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an attribute list declaration as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:attlist-declaration'>
+    <xsl:param name='type'/>
+    <xsl:param name='attr-defns'/>
+
+    <xsl:if test='string-length($type) = 0'>
+      <xsl:message terminate='yes'>element type must be specified</xsl:message>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&lt;!ATTLIST </xsl:text>
+    <xsl:copy-of select='$type'/>
+    <xsl:text> </xsl:text>
+    <xsl:copy-of select='$attr-defns'/>
+    <xsl:text disable-output-escaping='yes'>&gt;</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:attribute-definition" xmlns="">
+    <refpurpose>Create an Attribute Definition</refpurpose>
+
+    <refdescription>
+      <para>This template returns an attribute definition.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>name</term>
+	  <listitem>
+	    <para>The attribute name.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>type</term>
+	  <listitem>
+	    <para>The attribute type.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>default</term>
+	  <listitem>
+	    <para>The attribute default.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an attribute definition as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:attribute-definition'>
+    <xsl:param name='name'/>
+    <xsl:param name='type'/>
+    <xsl:param name='default'/>
+
+    <xsl:if test='string-length($name) = 0'>
+      <xsl:message terminate='yes'>attribute name must be specified</xsl:message>
+    </xsl:if>
+    <xsl:if test='string-length($type) = 0'>
+      <xsl:message terminate='yes'>attribute type must be specified</xsl:message>
+    </xsl:if>
+    <xsl:if test='string-length($default) = 0'>
+      <xsl:message terminate='yes'>attribute default must be specified</xsl:message>
+    </xsl:if>
+
+    <xsl:text> </xsl:text>
+    <xsl:copy-of select='$name'/>
+    <xsl:text> </xsl:text>
+    <xsl:copy-of select='$type'/>
+    <xsl:text> </xsl:text>
+    <xsl:copy-of select='$default'/>
+  </xsl:template>
+
+  <doc:template name="markup:entity-declaration" xmlns="">
+    <refpurpose>Create an Entity Declaration</refpurpose>
+
+    <refdescription>
+      <para>This template returns an entity declaration.</para>
+      <para>If the 'text' parameter is given a value, then an internal entity is created.  If either the 'publicid' or 'systemid' parameters are given a value then an external entity is created.  It is an error for the 'text' parameter to have value as well as the 'publicid', 'systemid' or 'notation' parameters.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>name</term>
+	  <listitem>
+	    <para>The entity name.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>parameter</term>
+	  <listitem>
+	    <para>Boolean value to determine whether a parameter entity is created.  Default is 'false()'.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>text</term>
+	  <listitem>
+	    <para>The replacement text.  Must be a string.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>nodes</term>
+	  <listitem>
+	    <para>The replacement text as a nodeset.  The nodeset is formatted as XML using the as-xml template.  If both text and nodes are specified then nodes takes precedence.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>publicid</term>
+	  <listitem>
+	    <para>The public identifier for an external entity.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>systemid</term>
+	  <listitem>
+	    <para>The system identifier for an external entity.</para>
+	  </listitem>
+	</varlistentry>
+ 	<varlistentry>
+	  <term>notation</term>
+	  <listitem>
+	    <para>The notation for an external entity.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an entity declaration as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:entity-declaration'>
+    <xsl:param name='name'/>
+    <xsl:param name='parameter' select='false()'/>
+    <xsl:param name='text'/>
+    <xsl:param name='nodes'/>
+    <xsl:param name='publicid'/>
+    <xsl:param name='systemid'/>
+    <xsl:param name='notation'/>
+
+    <xsl:if test='string-length($name) = 0'>
+      <xsl:message terminate='yes'>entity name must be specified</xsl:message>
+    </xsl:if>
+    <xsl:if test='string-length($text) &gt; 0 and 
+                  (string-length($publicid) &gt; 0 or
+                   string-length($systemid) &gt; 0 or
+                   string-length($notation) &gt; 0)'>
+      <xsl:message terminate='yes'>both replacement text and external identifier specified</xsl:message>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&lt;!ENTITY </xsl:text>
+    <xsl:copy-of select='$name'/>
+    <xsl:text> </xsl:text>
+    <xsl:if test="$parameter">
+      <xsl:text>% </xsl:text>
+    </xsl:if>
+
+    <xsl:choose>
+      <xsl:when test="$nodes">
+        <xsl:call-template name='markup:quote-value'>
+          <xsl:with-param name='value'>
+            <xsl:call-template name="markup:as-xml">
+              <xsl:with-param name="nodes" select="$nodes"/>
+            </xsl:call-template>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test='$text'>
+        <xsl:call-template name='markup:quote-value'>
+          <xsl:with-param name='value' select='$text'/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name='markup:external-identifier'>
+          <xsl:with-param name='publicid' select='$publicid'/>
+          <xsl:with-param name='systemid' select='$systemid'/>
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
+
+    <xsl:if test='$notation'>
+      <xsl:text> NDATA "</xsl:text>
+      <xsl:copy-of select='$notation'/>
+      <xsl:text>"</xsl:text>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&gt;</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:quote-value" xmlns="">
+    <refpurpose>Quote an Attribute Value</refpurpose>
+
+    <refdescription>
+      <para>This template returns a quoted value.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>value</term>
+	  <listitem>
+	    <para>The value to quote.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns a quote value as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:quote-value'>
+    <xsl:param name='value'/>
+
+    <xsl:variable name="quoted">
+      <xsl:call-template name='markup:quote-value-aux'>
+        <xsl:with-param name='value' select='$value'/>
+      </xsl:call-template>
+    </xsl:variable>
+
+    <xsl:choose>
+      <xsl:when test="contains($value, '&lt;')">
+        <xsl:call-template name='str:subst'>
+          <xsl:with-param name='text' select='$quoted'/>
+          <xsl:with-param name='replace'>&lt;</xsl:with-param>
+          <xsl:with-param name='with'>
+            <xsl:text disable-output-escaping='yes'>&amp;lt;</xsl:text>
+          </xsl:with-param>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select='$quoted'/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name='markup:quote-value-aux'>
+    <xsl:param name='value'/>
+
+    <!-- Quoting hell! -->
+    <xsl:variable name="quot">&quot;</xsl:variable>
+    <xsl:variable name="apos">&apos;</xsl:variable>
+
+    <xsl:choose>
+      <xsl:when test='contains($value, $quot) and contains($value, $apos)'>
+        <xsl:text>"</xsl:text>
+        <xsl:call-template name='str:subst'>
+          <xsl:with-param name='text' select='$value'/>
+          <xsl:with-param name='replace'>"</xsl:with-param>
+          <xsl:with-param name='with'>
+            <xsl:text disable-output-escaping='yes'>&amp;quot;</xsl:text>
+          </xsl:with-param>
+        </xsl:call-template>
+        <xsl:text>"</xsl:text>
+      </xsl:when>
+      <xsl:when test='contains($value, $quot)'>
+        <xsl:text>'</xsl:text>
+        <xsl:value-of select='$value'/>
+        <xsl:text>'</xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>"</xsl:text>
+        <xsl:value-of select='$value'/>
+        <xsl:text>"</xsl:text>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <doc:template name="markup:external-identifier" xmlns="">
+    <refpurpose>Create an External Identifier</refpurpose>
+
+    <refdescription>
+      <para>This template returns an external identifier.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>publicid</term>
+	  <listitem>
+	    <para>The public identifier.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>systemid</term>
+	  <listitem>
+	    <para>The system identifier.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an external identifier as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:external-identifier'>
+    <xsl:param name='publicid'/>
+    <xsl:param name='systemid'/>
+    <xsl:param name='leading-space' select='false()'/>
+
+    <xsl:choose>
+      <xsl:when test='string-length($publicid) &gt; 0'>
+        <xsl:if test='$leading-space'>
+          <xsl:text> </xsl:text>
+        </xsl:if>
+        <xsl:text disable-output-escaping='yes'>PUBLIC "</xsl:text>
+        <xsl:value-of select='$publicid' disable-output-escaping='yes'/>
+        <xsl:text disable-output-escaping='yes'>"</xsl:text>
+        <xsl:if test='string-length($systemid) &gt; 0'>
+          <xsl:text disable-output-escaping='yes'> "</xsl:text>
+          <xsl:value-of select='$systemid' disable-output-escaping='yes'/>
+          <xsl:text disable-output-escaping='yes'>"</xsl:text>
+        </xsl:if>
+      </xsl:when>
+      <xsl:when test="string-length($systemid) &gt; 0">
+        <xsl:if test='$leading-space'>
+          <xsl:text> </xsl:text>
+        </xsl:if>
+        <xsl:text disable-output-escaping='yes'>SYSTEM "</xsl:text>
+        <xsl:value-of select='$systemid' disable-output-escaping='yes'/>
+        <xsl:text disable-output-escaping='yes'>"</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+  <doc:template name="markup:entity-reference" xmlns="">
+    <refpurpose>Create an Entity Reference</refpurpose>
+
+    <refdescription>
+      <para>This template returns an entity reference.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>name</term>
+	  <listitem>
+	    <para>The name of the entity.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an entity reference as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:entity-reference'>
+    <xsl:param name='name'/>
+
+    <xsl:text disable-output-escaping='yes'>&amp;</xsl:text>
+    <xsl:value-of select='$name'/>
+    <xsl:text>;</xsl:text>
+
+  </xsl:template>
+
+  <doc:template name="markup:notation-declaration" xmlns="">
+    <refpurpose>Create a Notation Declaration</refpurpose>
+
+    <refdescription>
+      <para>This template returns a notation declaration.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>name</term>
+	  <listitem>
+	    <para>The notation name.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>publicid</term>
+	  <listitem>
+	    <para>The public identifier for the notation.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>systemid</term>
+	  <listitem>
+	    <para>The system identifier for the notation.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns a notation declaration as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:notation-declaration'>
+    <xsl:param name='name'/>
+    <xsl:param name='publicid'/>
+    <xsl:param name='systemid'/>
+
+    <xsl:if test='string-length($name) = 0'>
+      <xsl:message terminate='yes'>notation name must be specified</xsl:message>
+    </xsl:if>
+    <xsl:if test='string-length($publicid) = 0 and string-length($systemid) = 0'>
+      <xsl:message terminate='yes'>external identifier must be specified</xsl:message>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&lt;!NOTATION </xsl:text>
+    <xsl:copy-of select='$name'/>
+
+    <xsl:call-template name='markup:external-identifier'>
+      <xsl:with-param name='publicid' select='$publicid'/>
+      <xsl:with-param name='systemid' select='$systemid'/>
+      <xsl:with-param name='leading-space' select='true()'/>
+    </xsl:call-template>
+
+    <xsl:text disable-output-escaping='yes'>&gt;</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:cdata-section" xmlns="">
+    <refpurpose>Create a CDATA Section</refpurpose>
+
+    <refdescription>
+      <para>This template returns a CDATA Section.  The XSLT specification provides a mechanism for instructing the XSL processor to output character data in a CDATA section for certain elements, but this template may be useful in those circumstances where not all instances of an element are to have their content placed in a CDATA section.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>text</term>
+	  <listitem>
+	    <para>The content of the CDATA section.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns a CDATA section as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:cdata-section'>
+    <xsl:param name='text'/>
+
+    <xsl:if test="contains($text, ']]&gt;')">
+      <xsl:message terminate="yes">CDATA section contains "]]&gt;"</xsl:message>
+    </xsl:if>
+
+    <xsl:text disable-output-escaping='yes'>&lt;![CDATA[</xsl:text>
+    <xsl:copy-of select='$text'/>
+    <xsl:text disable-output-escaping='yes'>]]&gt;</xsl:text>
+  </xsl:template>
+
+  <doc:template name="markup:as-xml" xmlns="">
+    <refpurpose>Format Nodeset As XML Markup</refpurpose>
+
+    <refdescription>
+      <para>This template returns XML markup.  Each node in the given nodeset is converted to its equivalent XML markup.</para>
+
+      <para>BUG: This version may not adequately handle XML Namespaces.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>nodes</term>
+	  <listitem>
+	    <para>Nodeset to format as XML.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns XML markup.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='markup:as-xml'>
+    <xsl:param name='nodes'/>
+
+    <xsl:if test="$nodes">
+      <xsl:choose>
+        <xsl:when test="$nodes[1]/self::*">
+          <xsl:text disable-output-escaping='yes'>&lt;</xsl:text>
+          <xsl:value-of select="name($nodes[1])"/>
+          <xsl:for-each select="$nodes[1]/@*">
+            <xsl:text> </xsl:text>
+            <xsl:value-of select="name()"/>
+            <xsl:text>=</xsl:text>
+            <xsl:call-template name='markup:quote-value'>
+              <xsl:with-param name='value' select='.'/>
+            </xsl:call-template>
+          </xsl:for-each>
+
+          <xsl:choose>
+            <xsl:when test='$nodes[1]/node()'>
+              <xsl:text disable-output-escaping='yes'>&gt;</xsl:text>
+              <xsl:call-template name='markup:as-xml'>
+                <xsl:with-param name='nodes' select='$nodes[1]/node()'/>
+              </xsl:call-template>
+              <xsl:text disable-output-escaping='yes'>&lt;/</xsl:text>
+              <xsl:value-of select="name($nodes[1])"/>
+              <xsl:text disable-output-escaping='yes'>&gt;</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text disable-output-escaping='yes'>/&gt;</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+        </xsl:when>
+        <xsl:when test="$nodes[1]/self::text()">
+          <xsl:value-of select="$nodes[1]"/>
+        </xsl:when>
+        <xsl:when test="$nodes[1]/self::comment()">
+          <xsl:text disable-output-escaping='yes'>&lt;!--</xsl:text>
+          <xsl:value-of select="$nodes[1]"/>
+          <xsl:text disable-output-escaping='yes'>--&gt;</xsl:text>
+        </xsl:when>
+        <xsl:when test="$nodes[1]/self::processing-instruction()">
+          <xsl:text disable-output-escaping='yes'>&lt;?</xsl:text>
+          <xsl:value-of select="name($nodes[1])"/>
+          <xsl:text> </xsl:text>
+          <xsl:value-of select="$nodes[1]"/>
+          <xsl:text disable-output-escaping='yes'>?&gt;</xsl:text>
+        </xsl:when>
+
+        <xsl:when test="not($nodes[1]/parent::*)"/> <!-- root node -->
+        <xsl:when test="count($nodes[1] | $nodes[1]/../namespace::*) = count($nodes[1]/../namespace::*)"/> <!-- namespace node -->
+        <xsl:when test="count($nodes[1] | $nodes[1]/../@*) = count($nodes[1]/../@*)"/> <!-- attribute node -->
+      </xsl:choose>
+
+      <xsl:call-template name="markup:as-xml">
+        <xsl:with-param name="nodes" select="$nodes[position() &gt; 1]"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/math.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/math.xsl?rev=329839&view=auto
==============================================================================
--- jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/math.xsl (added)
+++ jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/math.xsl Mon Oct 31 07:32:25 2005
@@ -0,0 +1,618 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:doc="http://xsltsl.org/xsl/documentation/1.0"
+  xmlns:math="http://xsltsl.org/math"
+  exclude-result-prefixes="doc math">
+
+  <doc:reference xmlns="">
+    <referenceinfo>
+      <releaseinfo role="meta">
+        $Id: math.xsl,v 1.4 2004/10/08 06:37:25 balls Exp $
+      </releaseinfo>
+      <author>
+        <surname>Ball</surname>
+        <firstname>Steve</firstname>
+      </author>
+      <copyright>
+        <year>2004</year>
+        <year>2002</year>
+        <holder>Steve Ball</holder>
+      </copyright>
+    </referenceinfo>
+
+    <title>Math Module</title>
+
+    <partintro>
+      <section>
+        <title>Introduction</title>
+
+        <para>This module provides mathematical functions.</para>
+      </section>
+    </partintro>
+
+  </doc:reference>
+
+  <doc:template name="math:power" xmlns="">
+    <refpurpose>Power</refpurpose>
+
+    <refdescription>
+      <para>Raises a number to a power.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+        <varlistentry>
+          <term>base</term>
+          <listitem>
+            <para>The base number.  Must be a number.</para>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
+          <term>power</term>
+          <listitem>
+            <para>The power to raise the number to.  Must be an integer.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns base multiplied by itself power times.  If the base or power are not numbers or if the power is fractional then an empty string is returned.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="math:power">
+    <xsl:param name="base"/>
+    <xsl:param name="power"/>
+
+    <xsl:choose>
+      <xsl:when test='$power = "0" and $base = "0"'>
+        <xsl:text>1</xsl:text>
+      </xsl:when>
+      <xsl:when test='$power = "0" and number($base)'>
+        <xsl:text>1</xsl:text>
+      </xsl:when>
+      <xsl:when test='$power = "0" and not(number($base))'/>
+      <xsl:when test='$base = "0" and number($power)'>
+        <xsl:text>0</xsl:text>
+      </xsl:when>
+
+      <xsl:when test='not(number($base)) or not(number($power))'/>
+
+      <xsl:when test='floor(number($power)) != number($power)'/>
+
+      <xsl:when test='number($power) &lt; 0'>
+        <xsl:variable name='x'>
+          <xsl:call-template name='math:power'>
+            <xsl:with-param name='base' select='$base'/>
+            <xsl:with-param name='power' select='-1 * $power'/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select='1 div $x'/>
+      </xsl:when>
+
+      <xsl:when test='number($power) = 1'>
+        <xsl:value-of select='$base'/>
+      </xsl:when>
+
+      <xsl:when test='number($power) &gt; 0'>
+        <xsl:variable name='x'>
+          <xsl:call-template name='math:power'>
+            <xsl:with-param name='base' select='$base'/>
+            <xsl:with-param name='power' select='$power - 1'/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:value-of select='$base * $x'/>
+      </xsl:when>
+      <xsl:otherwise/>
+    </xsl:choose>
+  </xsl:template>
+
+  <doc:template name="math:cvt-hex-decimal" xmlns="">
+    <refpurpose>Conversion</refpurpose>
+
+    <refdescription>
+      <para>Converts a hexidecimal value to a decimal value.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+        <varlistentry>
+          <term>value</term>
+          <listitem>
+            <para>The hexidecimal number.  Must be a number in hexidecimal format.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns the value as a decimal string.  If the value is not a number then a NaN value is returned.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="math:cvt-hex-decimal">
+    <xsl:param name="value"/>
+
+    <xsl:choose>
+      <xsl:when test='$value = ""'/>
+
+      <xsl:when test='string-length($value) = 1'>
+        <xsl:call-template name='math:cvt-hex-decimal-digit'>
+          <xsl:with-param name='digit' select='$value'/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:variable name='first-digit'>
+          <xsl:call-template name='math:cvt-hex-decimal-digit'>
+            <xsl:with-param name='digit' select='substring($value, 1, 1)'/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:variable name='remainder'>
+          <xsl:call-template name='math:cvt-hex-decimal'>
+            <xsl:with-param name='value' select='substring($value, 2)'/>
+          </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:value-of select='$first-digit * 16 + $remainder'/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name='math:cvt-hex-decimal-digit'>
+    <xsl:param name='digit' select='0'/>
+    <xsl:choose>
+      <xsl:when test='$digit &lt;= 9'>
+        <xsl:value-of select='$digit'/>
+      </xsl:when>
+      <xsl:when test='$digit = "a" or $digit = "A"'>10</xsl:when>
+      <xsl:when test='$digit = "b" or $digit = "B"'>11</xsl:when>
+      <xsl:when test='$digit = "c" or $digit = "C"'>12</xsl:when>
+      <xsl:when test='$digit = "d" or $digit = "D"'>13</xsl:when>
+      <xsl:when test='$digit = "e" or $digit = "E"'>14</xsl:when>
+      <xsl:when test='$digit = "f" or $digit = "F"'>15</xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+  <doc:template name="math:ordinal" xmlns="">
+    <refpurpose>Ordinal number</refpurpose>
+
+    <refdescription>
+      <para>Gives the ordinal number of a given counting number.  For example, 1 becomes "1st".</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+        <varlistentry>
+          <term>number</term>
+          <listitem>
+            <para>An integer number.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns the number with an ordinal suffix.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="math:ordinal">
+    <xsl:param name="number"/>
+
+    <xsl:choose>
+      <xsl:when test='$number &lt; 0'/>
+      <xsl:otherwise>
+        <xsl:value-of select='$number'/>
+        <xsl:choose>
+          <xsl:when test='$number = 11 or $number = 12 or $number = 13'>th</xsl:when>
+          <xsl:when test='$number mod 10 = 1'>st</xsl:when>
+          <xsl:when test='$number mod 10 = 2'>nd</xsl:when>
+          <xsl:when test='$number mod 10 = 3'>rd</xsl:when>
+          <xsl:otherwise>th</xsl:otherwise>
+        </xsl:choose>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+
+  <doc:template name="math:ordinal-as-word" xmlns="">
+    <refpurpose>Returns an ordinal number</refpurpose>
+
+    <refdescription>
+      <para>This template returns the ordinal number for a given counting number as a word.  For example "first" for 1.</para>
+      <para>Only handles numbers less than 10000000 (ten million).</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>number</term>
+	  <listitem>
+	    <para>The counting number.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>conjunctive</term>
+	  <listitem>
+	    <para>Whether to add the word "and" to the result, for example "one hundred and first" rather than "one hundred first".  Default is "yes".</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns the ordinal number as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="math:ordinal-as-word">
+    <xsl:param name="number" select="0"/>
+    <xsl:param name='conjunctive' select='"yes"'/>
+    <xsl:param name='preceding' select='0'/>
+
+    <xsl:choose>
+      <xsl:when test='$preceding = 1 and $number = 0'/>
+      <xsl:when test='$number = 0'>zeroth</xsl:when>
+
+      <xsl:when test="$number &lt; 1 or $number != floor($number)"/>
+
+      <xsl:when test='$number = 1'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>first</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 2'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>second</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 3'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>third</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 4'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>fourth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 5'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>fifth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 6'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>sixth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 7'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>seventh</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 8'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>eighth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 9'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>ninth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 10'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>tenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 11'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>eleventh</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 12'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>twelveth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 13'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>thirteenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 14'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>fourteenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 15'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>fifteenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 16'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>sixteenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 17'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>seventeenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 18'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>eighteenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 19'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>nineteenth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 20'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>twentieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 30'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>thirtieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 40'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>fortieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 50'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>fiftieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 60'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>sixtieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 70'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>seventieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 80'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>eightieth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number = 90'>
+        <xsl:if test='$preceding = 1'> and </xsl:if>
+        <xsl:text>ninetieth</xsl:text>
+      </xsl:when>
+
+      <xsl:when test='$number mod 1000000 = 0'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000000)'/>
+        </xsl:call-template>
+        <xsl:text> millionth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number &lt; 1000000 and $number mod 1000 = 0'>
+        <xsl:if test='$preceding = 1 and $conjunctive'> and </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000)'/>
+        </xsl:call-template>
+        <xsl:text> thousandth</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number &lt; 1000 and $number mod 100 = 0'>
+        <xsl:if test='$preceding = 1 and $conjunctive'> and </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 100)'/>
+        </xsl:call-template>
+        <xsl:text> hundredth</xsl:text>
+      </xsl:when>
+
+      <xsl:when test='$number &gt; 1000000'>
+        <xsl:if test='$preceding = 1'>
+          <xsl:text> </xsl:text>
+          <xsl:if test='$conjunctive'>and </xsl:if>
+        </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000000) * 1000000'/>
+        </xsl:call-template>
+        <xsl:choose>
+          <xsl:when
+            test='(floor(floor(($number mod 1000000) + 0.1) div 100000) > 0 and $number mod 100000 > 0) or
+            (floor(floor(($number mod 100000) + 0.1) div 10000) > 0 and $number mod 10000 > 0) or
+            (floor(floor(($number mod 10000) + 0.1) div 1000) > 0 and $number mod 1000 > 0) or
+            (floor(floor(($number mod 1000) + 0.1) div 100) > 0 and $number mod 100 > 0) or
+            (floor(floor(($number mod 100) + 0.1) div 10) > 0 and $number mod 10 > 0 and $number mod 100 > 20)'>
+            <xsl:text> </xsl:text>
+            <xsl:call-template name='math:ordinal-as-word'>
+              <xsl:with-param name='number' select='floor(($number mod 1000000) + 0.1)'/>
+              <xsl:with-param name='conjunctive' select='$conjunctive'/>
+              <xsl:with-param name='preceding' select='0'/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name='math:ordinal-as-word'>
+              <xsl:with-param name='number' select='floor(($number mod 1000000) + 0.1)'/>
+              <xsl:with-param name='conjunctive' select='$conjunctive'/>
+              <xsl:with-param name='preceding' select='1'/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test='$number &gt; 1000'>
+        <xsl:if test='$preceding = 1'>
+          <xsl:text> </xsl:text>
+          <xsl:if test='$conjunctive'>and </xsl:if>
+        </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000) * 1000'/>
+          <xsl:with-param name='conjunctive' select='$conjunctive'/>
+        </xsl:call-template>
+        <xsl:choose>
+          <xsl:when test='floor(floor(($number mod 1000) + 0.1) div 100) > 0'>
+            <xsl:text> </xsl:text>
+            <xsl:call-template name='math:ordinal-as-word'>
+              <xsl:with-param name='number' select='floor(($number mod 1000) + 0.1)'/>
+              <xsl:with-param name='conjunctive' select='$conjunctive'/>
+              <xsl:with-param name='preceding' select='0'/>
+            </xsl:call-template>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:call-template name='math:ordinal-as-word'>
+              <xsl:with-param name='number' select='floor(($number mod 1000) + 0.1)'/>
+              <xsl:with-param name='conjunctive' select='$conjunctive'/>
+              <xsl:with-param name='preceding' select='1'/>
+            </xsl:call-template>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:when test='$number &gt; 100'>
+        <xsl:if test='$preceding = 1'>
+          <xsl:text> </xsl:text>
+          <xsl:if test='$conjunctive'>and </xsl:if>
+        </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 100) * 100'/>
+        </xsl:call-template>
+        <xsl:call-template name='math:ordinal-as-word'>
+          <xsl:with-param name='number' select='floor(($number mod 100) + 0.1)'/>
+          <xsl:with-param name='conjunctive' select='$conjunctive'/>
+          <xsl:with-param name='preceding' select='1'/>
+        </xsl:call-template>
+      </xsl:when>
+
+      <xsl:when test='$number &gt; 20'>
+        <xsl:if test='$preceding = 1'>
+          <xsl:text> </xsl:text>
+          <xsl:if test='$conjunctive'>and </xsl:if>
+        </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 10) * 10'/>
+        </xsl:call-template>
+        <xsl:text> </xsl:text>
+        <xsl:call-template name='math:ordinal-as-word'>
+          <xsl:with-param name='number' select='floor(($number mod 10) + 0.1)'/>
+          <xsl:with-param name='conjunctive' select='$conjunctive'/>
+        </xsl:call-template>
+      </xsl:when>
+
+      <xsl:otherwise/>
+    </xsl:choose>
+  </xsl:template>
+
+  <doc:template name="math:number-as-word" xmlns="">
+    <refpurpose>Returns a number as a word</refpurpose>
+
+    <refdescription>
+      <para>This template returns the word for a given integer number, for example "one" for 1.</para>
+      <para>Only handles numbers less than 10000000 (ten million).</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>number</term>
+	  <listitem>
+	    <para>The counting number.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>conjunctive</term>
+	  <listitem>
+	    <para>Adds the word "and" where appropriate, for example.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns the number as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="math:number-as-word">
+    <xsl:param name="number" select="0"/>
+    <xsl:param name='conjunctive' select='true()'/>
+
+    <xsl:choose>
+
+      <xsl:when test='$number = 0'>zero</xsl:when>
+
+      <xsl:when test='$number &lt; 0'>
+        <xsl:text>minus </xsl:text>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='-1 * $number'/>
+        </xsl:call-template>
+      </xsl:when>
+
+      <xsl:when test="$number != floor($number)"/>
+
+      <xsl:when test='$number mod 1000000 = 0'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000000)'/>
+        </xsl:call-template>
+        <xsl:text> million</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number &gt;= 1000000'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000000)'/>
+        </xsl:call-template>
+        <xsl:text> million </xsl:text>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor(($number mod 1000000) + 0.1)'/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test='$number mod 1000 = 0'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000)'/>
+        </xsl:call-template>
+        <xsl:text> thousand</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number &gt;= 1000'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 1000)'/>
+        </xsl:call-template>
+        <xsl:text> thousand </xsl:text>
+        <xsl:if test='$conjunctive and floor(floor(($number mod 1000) + 0.1) div 100) = 0'>and </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor(($number mod 1000) + 0.1)'/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:when test='$number mod 100 = 0'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 100)'/>
+        </xsl:call-template>
+        <xsl:text> hundred</xsl:text>
+      </xsl:when>
+      <xsl:when test='$number &gt;= 100'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 100)'/>
+        </xsl:call-template>
+        <xsl:text> hundred </xsl:text>
+        <xsl:if test='$conjunctive'>and </xsl:if>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor(($number mod 100) + 0.1)'/>
+        </xsl:call-template>
+      </xsl:when>
+
+      <xsl:when test='$number = 1'>one</xsl:when>
+      <xsl:when test='$number = 2'>two</xsl:when>
+      <xsl:when test='$number = 3'>three</xsl:when>
+      <xsl:when test='$number = 4'>four</xsl:when>
+      <xsl:when test='$number = 5'>five</xsl:when>
+      <xsl:when test='$number = 6'>six</xsl:when>
+      <xsl:when test='$number = 7'>seven</xsl:when>
+      <xsl:when test='$number = 8'>eight</xsl:when>
+      <xsl:when test='$number = 9'>nine</xsl:when>
+      <xsl:when test='$number = 10'>ten</xsl:when>
+      <xsl:when test='$number = 11'>eleven</xsl:when>
+      <xsl:when test='$number = 12'>twelve</xsl:when>
+      <xsl:when test='$number = 13'>thirteen</xsl:when>
+      <xsl:when test='$number = 14'>fourteen</xsl:when>
+      <xsl:when test='$number = 15'>fifteen</xsl:when>
+      <xsl:when test='$number = 16'>sixteen</xsl:when>
+      <xsl:when test='$number = 17'>seventeen</xsl:when>
+      <xsl:when test='$number = 18'>eighteen</xsl:when>
+      <xsl:when test='$number = 19'>nineteen</xsl:when>
+      <xsl:when test='$number = 20'>twenty</xsl:when>
+      <xsl:when test='$number = 30'>thirty</xsl:when>
+      <xsl:when test='$number = 40'>forty</xsl:when>
+      <xsl:when test='$number = 50'>fifty</xsl:when>
+      <xsl:when test='$number = 60'>sixty</xsl:when>
+      <xsl:when test='$number = 70'>seventy</xsl:when>
+      <xsl:when test='$number = 80'>eighty</xsl:when>
+      <xsl:when test='$number = 90'>ninety</xsl:when>
+
+      <xsl:when test='$number &lt; 100'>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor($number div 10) * 10'/>
+        </xsl:call-template>
+        <xsl:text> </xsl:text>
+        <xsl:call-template name='math:number-as-word'>
+          <xsl:with-param name='number' select='floor(($number mod 10) + 0.1)'/>
+        </xsl:call-template>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+</xsl:stylesheet>
+

Added: jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/node.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/node.xsl?rev=329839&view=auto
==============================================================================
--- jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/node.xsl (added)
+++ jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/node.xsl Mon Oct 31 07:32:25 2005
@@ -0,0 +1,229 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:doc="http://xsltsl.org/xsl/documentation/1.0"
+	xmlns:node="http://xsltsl.org/node"
+	extension-element-prefixes="doc node">
+
+  <doc:reference xmlns="">
+    <referenceinfo>
+      <releaseinfo role="meta">
+	$Id: node.xsl,v 1.6 2003/03/31 21:07:30 balls Exp $
+      </releaseinfo>
+      <author>
+	<surname>Ball</surname>
+	<firstname>Steve</firstname>
+      </author>
+      <copyright>
+	<year>2001</year>
+	<holder>Steve Ball</holder>
+      </copyright>
+    </referenceinfo>
+
+    <title>Node Templates</title>
+
+    <partintro>
+      <section>
+	<title>Introduction</title>
+
+	<para>This stylesheet module provides functions for reporting on or manipulating nodes and nodesets.</para>
+
+      </section>
+    </partintro>
+
+  </doc:reference>
+
+  <doc:template name="node:xpath" xmlns="">
+    <refpurpose>Returns an XPath location path</refpurpose>
+
+    <refdescription>
+      <para>This template returns an XPath location path that uniquely identifies the given node within the document.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>node</term>
+	  <listitem>
+	    <para>The node to create an XPath for.  If this parameter is given as a nodeset, then the first node in the nodeset is used.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns an XPath location path as a string.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="node:xpath">
+    <xsl:param name="node" select="."/>
+
+    <xsl:choose>
+
+      <xsl:when test="$node">
+
+        <xsl:for-each select="$node[1]/ancestor-or-self::*">
+          <xsl:text/>/<xsl:value-of select="name()"/>
+          <xsl:text/>[<xsl:value-of select="count(preceding-sibling::*[name() = name(current())]) + 1"/>]<xsl:text/>
+        </xsl:for-each>
+
+        <xsl:choose>
+
+          <xsl:when test="$node[1]/self::comment()">
+            <xsl:text>/comment()</xsl:text>
+            <xsl:text/>[<xsl:value-of select="count($node[1]/preceding-sibling::comment()) + 1" />]<xsl:text/>
+          </xsl:when>
+
+          <xsl:when test="$node[1]/self::processing-instruction()">
+            <xsl:text>/processing-instruction()</xsl:text>
+            <xsl:text/>[<xsl:value-of select="count($node[1]/preceding-sibling::processing-instruction()) + 1" />]<xsl:text/>
+          </xsl:when>
+
+          <xsl:when test="$node[1]/self::text()">
+            <xsl:text>/text()</xsl:text>
+            <xsl:text/>[<xsl:value-of select="count($node[1]/preceding-sibling::text()) + 1" />]<xsl:text/>
+          </xsl:when>
+
+          <xsl:when test="not($node[1]/..)">
+            <xsl:text>/</xsl:text>
+          </xsl:when>
+
+          <xsl:when test="count($node[1]/../namespace::* | $node[1]) = count($node[1]/../namespace::*)">
+            <xsl:text/>/namespace::<xsl:value-of select="name($node[1])" />
+          </xsl:when>
+
+          <xsl:when test="count($node[1]/../@* | $node[1]) = count($node[1]/../@*)">
+            <xsl:text/>/@<xsl:value-of select="name($node[1])" />
+          </xsl:when>
+
+        </xsl:choose>      
+      </xsl:when>
+
+      <xsl:otherwise>
+        <xsl:text>/..</xsl:text>
+      </xsl:otherwise>
+
+    </xsl:choose>
+
+  </xsl:template>
+
+  <doc:template name="node:type" xmlns="">
+    <refpurpose>Return node type</refpurpose>
+
+    <refdescription>
+      <para>Returns the type of a node as a string.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>node</term>
+	  <listitem>
+	    <para>The node to get the type for.  If this parameter is given as a nodeset, then the first node in the nodeset is used.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns node type as a string.  Values returned are:</para>
+      <variablelist>
+	<varlistentry>
+	  <term>Element</term>
+	  <listitem>
+	    <para><literal>element</literal></para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>Text Node</term>
+	  <listitem>
+	    <para><literal>text</literal></para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>Comment</term>
+	  <listitem>
+	    <para><literal>comment</literal></para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term>Processing Instruction</term>
+	  <listitem>
+	    <para><literal>processing instruction</literal></para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name="node:type">
+    <xsl:param name="node" select="."/>
+
+    <xsl:choose>
+      <xsl:when test="not($node)"/>
+      <xsl:when test="$node[1]/self::*">
+	<xsl:text>element</xsl:text>
+      </xsl:when>
+      <xsl:when test="$node[1]/self::text()">
+	<xsl:text>text</xsl:text>
+      </xsl:when>
+      <xsl:when test="$node[1]/self::comment()">
+	<xsl:text>comment</xsl:text>
+      </xsl:when>
+      <xsl:when test="$node[1]/self::processing-instruction()">
+	<xsl:text>processing instruction</xsl:text>
+      </xsl:when>
+      <xsl:when test="not($node[1]/parent::*)">
+        <xsl:text>root</xsl:text>
+      </xsl:when>
+      <xsl:when test="count($node[1] | $node[1]/../namespace::*) = count($node[1]/../namespace::*)">
+        <xsl:text>namespace</xsl:text>
+      </xsl:when>
+      <xsl:when test="count($node[1] | $node[1]/../@*) = count($node[1]/../@*)">
+        <xsl:text>attribute</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+  <doc:template name="node:copy" xmlns="">
+    <refpurpose>Copy Nodes</refpurpose>
+
+    <refdescription>
+      <para>Makes a copy of the given nodes, including attributes and descendants.</para>
+    </refdescription>
+
+    <refparameter>
+      <variablelist>
+	<varlistentry>
+	  <term>nodes</term>
+	  <listitem>
+	    <para>The nodes to copy.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </refparameter>
+
+    <refreturn>
+      <para>Returns the copied nodes as a result tree fragment.</para>
+    </refreturn>
+  </doc:template>
+
+  <xsl:template name='node:copy'>
+    <xsl:param name='nodes' select='.'/>
+
+    <xsl:for-each select='$nodes'>
+      <xsl:copy>
+        <xsl:for-each select='@*'>
+          <xsl:copy/>
+        </xsl:for-each>
+
+        <xsl:for-each select='node()'>
+          <xsl:call-template name='node:copy'/>
+        </xsl:for-each>
+      </xsl:copy>
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>
+

Added: jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/stdlib.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/stdlib.xsl?rev=329839&view=auto
==============================================================================
--- jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/stdlib.xsl (added)
+++ jakarta/site/xdocs/stylesheets/xsltslt-1.2.1/stdlib.xsl Mon Oct 31 07:32:25 2005
@@ -0,0 +1,340 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+  <!ENTITY version "1.2.1">
+]>
+
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:doc="http://xsltsl.org/xsl/documentation/1.0"
+  exclude-result-prefixes="doc"
+  version="1.0">
+
+  <xsl:import href="string.xsl"/>
+  <xsl:import href="date-time.xsl"/>
+  <xsl:import href="node.xsl"/>
+  <xsl:import href="uri.xsl"/>
+  <xsl:import href="markup.xsl"/>
+  <xsl:import href="math.xsl"/>
+  <xsl:import href="cmp.xsl"/>
+
+  <xsl:import href="svg.xsl"/>
+<!--
+  <xsl:import href="html/html.xsl"/>
+  <xsl:import href="fo/fo.xsl"/>
+-->
+
+  <!-- For a new module, add an import element here -->
+  <xsl:import href="example.xsl"/>
+
+  <doc:book xmlns="">
+    <bookinfo>
+      <title>XSLT Standard Library</title>
+      <subtitle>Version &version;</subtitle>
+      <!-- $Id: stdlib.xsl,v 1.15 2004/10/10 06:18:57 balls Exp $ -->
+
+      <author>
+        <surname>Ball</surname>
+        <firstname>Steve</firstname>
+      </author>
+      <copyright>
+        <year>2004</year>
+        <year>2002</year>
+        <holder>Steve Ball</holder>
+      </copyright>
+    </bookinfo>
+
+    <preface>
+      <para>The <ulink url="http://www.w3.org/Style/XSL">XSLT</ulink> Standard Library, <acronym>xsltsl</acronym>, provides the XSLT developer with a set of XSLT templates for commonly used functions.  These are implemented purely in XSLT, that is they do not use any extensions.</para>
+      <para><acronym>xsltsl</acronym> is a <ulink url="http://sourceforge.net/projects/xsltsl/">SourceForge project</ulink>.</para>
+      <para><ulink url="http://sourceforge.net/"><inlinemediaobject>
+	  <imageobject>
+	    <imagedata fileref="sflogo.gif" width="88" height="31"/>
+	  </imageobject>
+	  <textobject>
+	    <phrase>SourceForge Logo</phrase>
+	  </textobject>
+	</inlinemediaobject></ulink></para>
+      <para>Goals of the <acronym>xsltsl</acronym> project include:</para>
+      <itemizedlist>
+        <listitem>
+          <para>Provision of a high-quality library of XSLT templates, suitable for inclusion by vendors in XSLT processor software products.</para>
+        </listitem>
+        <listitem>
+          <para>Demonstration of best practice in XSLT stylesheet development and documentation.</para>
+        </listitem>
+        <listitem>
+          <para>Provide examples of various techniques used to develop XSLT stylesheets (ie. a working FAQ).</para>
+        </listitem>
+      </itemizedlist>
+    </preface>
+
+    <chapter>
+      <title>Using The Library</title>
+
+      <para>There are two ways of using the library:</para>
+      <itemizedlist>
+	<listitem>
+	  <para>Use a local copy of the library.</para>
+	  <orderedlist>
+	    <listitem>
+	      <para>Download the distribution (see below).</para>
+	    </listitem>
+	    <listitem>
+	      <para>Unpack the distribution, using either gunzip/tar or unzip.</para>
+	    </listitem>
+	    <listitem>
+	      <para>In your stylesheet import or include either the main stylesheet, <filename>stdlib.xsl</filename>, or the stylesheet module you wish to use, such as <filename>string.xsl</filename>.  This example assumes that the distribution has been extracted into the same directory as your own stylesheet:</para>
+	      <informalexample>
+		<programlisting><![CDATA[
+<xsl:import href="stdlib.xsl"/>
+]]></programlisting>
+	      </informalexample>
+	    </listitem>
+	  </orderedlist>
+	</listitem>
+	<listitem>
+          <para>Import or include either the main stylesheet, or the stylesheet module you wish to use, directly from the library website; http://xsltsl.sourceforge.net/modules/.  The <filename>modules</filename> directory always contains the latest stable release.  For example:</para>
+	  <informalexample>
+	    <programlisting><![CDATA[
+<xsl:import href="http://xsltsl.sourceforge.net/modules/stdlib.xsl"/>
+]]></programlisting>
+	  </informalexample>
+          <para>Older versions of the library are available in subdirectories.  For example, to access version 1.1 of the library use:</para>
+	  <informalexample>
+	    <programlisting><![CDATA[
+<xsl:import href="http://xsltsl.sourceforge.net/modules/1.1/stdlib.xsl"/>
+]]></programlisting>
+	  </informalexample>
+	</listitem>
+      </itemizedlist>
+      <para>Next, add XML Namespace declarations for the modules you wish to use.  For example, to use templates from the string module, your stylesheet should have the following declaration:</para>
+      <informalexample>
+	<programlisting><![CDATA[
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:str="http://xsltsl.org/string">
+
+<xsl:import href="http://xsltsl.sourceforge.net/modules/stdlib.xsl"/>
+]]></programlisting>
+      </informalexample>
+      <para>Finally, use a template with the <sgmltag>call-template</sgmltag> element.  Most templates require parameters, which are passed using the <sgmltag>with-param</sgmltag> element.  For example:</para>
+      <informalexample>
+	<programlisting><![CDATA[
+<xsl:template match="foo">
+  <xsl:call-template name="str:subst">
+    <xsl:with-param name="text" select="."/>
+    <xsl:with-param name="replace">a word</xsl:with-param>
+    <xsl:with-param name="with">another word</xsl:with-param>
+  </xsl:call-template>
+</xsl:template>
+]]></programlisting>
+      </informalexample>
+    </chapter>
+
+    <chapter>
+      <title>Obtaining The Library</title>
+
+      <para>The XSLT Standard Library is available for download as either:</para>
+      <itemizedlist>
+	<listitem>
+	  <para>Gzip'd tarball: <ulink url="http://prdownloads.sourceforge.net/xsltsl/xsltsl-&version;.tar.gz">http://prdownloads.sourceforge.net/xsltsl/xsltsl-&version;.tar.gz</ulink></para>
+	</listitem>
+	<listitem>
+	  <para>Zip file: <ulink url="http://prdownloads.sourceforge.net/xsltsl/xsltsl-&version;.zip">http://prdownloads.sourceforge.net/xsltsl/xsltsl-&version;.zip</ulink></para>
+	</listitem>
+      </itemizedlist>
+    </chapter>
+
+    <chapter>
+      <title>Getting Involved</title>
+
+      <para>Contributions to the project are most welcome, and may be in the form of stylesheet modules, patches, bug reports or sample code.  Any contributed code must use the LGPL license to be accepted into the library.</para>
+
+      <para>See the SourceForge Project Page <ulink url="http://sourceforge.net/projects/xsltsl/">http://sourceforge.net/projects/xsltsl/</ulink> for information on the development of the project.  Bug reports may be submitted here.</para>
+
+      <para>See the project Web Page <ulink url="http://xsltsl.sourceforge.net/">http://xsltsl.sourceforge.net/</ulink> for documentation.</para>
+
+      <para>There are three mailing lists for the project:</para>
+      <variablelist>
+	<varlistentry>
+	  <term><email>xsltsl-users@lists.sourceforge.net</email></term>
+	  <listitem>
+	    <para>Discussion of the use of <acronym>xsltsl</acronym>.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><email>xsltsl-devel@lists.sourceforge.net</email></term>
+	  <listitem>
+	    <para>Discussion of the development of <acronym>xsltsl</acronym>.</para>
+	  </listitem>
+	</varlistentry>
+	<varlistentry>
+	  <term><email>xsltsl-announce@lists.sourceforge.net</email></term>
+	  <listitem>
+	    <para>Project announcements.</para>
+	  </listitem>
+	</varlistentry>
+      </variablelist>
+    </chapter>
+
+    <chapter>
+      <title>XML Namespaces</title>
+
+      <para>Apart from the XSLT XML Namespace (http://www.w3.org/1999/XSL/Transform), <acronym>xsltsl</acronym> employs a number of XML Namespaces to allow inclusion of the library in developer stylesheets.  In addition, documentation is defined in a separate namespace.</para>
+      <para>Each module is allocated a namespace URI by appending the module name to the URI for the project, http://xsltsl.org/.  For example, the string module has the namespace URI http://xsltsl.org/string.</para>
+      <para>All documentation is written using an <ulink url="docbook-extensions.html">extension</ulink> of <ulink url="http://www.docbook.org/">DocBook</ulink> designed for <ulink url="docbook-extensions.html">embedding DocBook into XSLT stylesheets</ulink>.  The namespace URI for DocBook embedded in stylesheets is http://xsltsl.org/xsl/documentation/1.0</para>
+    </chapter>
+
+    <chapter>
+      <title>Engineering Standards</title>
+
+      <para>In order to maintain a high engineering standard, all modules and contributions to the <acronym>xsltsl</acronym> project must adhere to the following coding and documentation standards.  Submissions which do not meet (or exceed) this standard will not be accepted.</para>
+      <itemizedlist>
+        <listitem>
+          <para>All stylesheets must be indented, with each level indented by two spaces.  NB. a simple stylesheet could be used to enforce/fix this.</para>
+        </listitem>
+        <listitem>
+          <para>Templates are named using a qualified name (QName).  The namespace URI for the template's containing stylesheet is assigned as above.</para>
+        </listitem>
+        <listitem>
+          <para>Parameters for templates should use sensible names.  Where possible (or if in doubt), follow these conventions:</para>
+          <itemizedlist>
+            <listitem>
+              <para>A parameter containing a single node is named <parametername>node</parametername>.  Where more than one parameter contains a single node, the suffix <parametername>Node</parametername> is appended to the parameter name, eg. <parametername>referenceNode</parametername></para>
+            </listitem>
+            <listitem>
+              <para>A parameter which potentially contains multiple nodes is named <parametername>nodes</parametername>.  Where more than one parameter potentially contains multiple nodes, the suffix <parametername>Nodes</parametername> is appended to the parameter name, eg. <parametername>copyNodes</parametername></para>
+            </listitem>
+            <listitem>
+              <para>A parameter which contains a string value is named <parametername>text</parametername>.</para>
+            </listitem>
+          </itemizedlist>
+        </listitem>
+        <listitem>
+          <para>All templates in each stylesheet must be documented.  A template is documented as a <ulink url="http://www.docbook.org/">DocBook</ulink> RefEntry.</para>
+        </listitem>
+        <listitem>
+          <para>Every stylesheet must include a test suite.  The test system is in the <filename>test</filename> subdirectory.  See <ulink url="test/test.html">test/test.html</ulink> for further details.</para>
+        </listitem>
+      </itemizedlist>
+
+      <para>An <ulink url="example.xsl">example stylesheet</ulink> has been provided, which acts as a template for new stylesheet modules.</para>
+
+    </chapter>
+
+    <chapter>
+      <title>Related Work</title>
+
+      <para>The <ulink url="http://www.exslt.org/">EXSLT</ulink> project is creating a library to standardise extension functions.  The XSLT Standard Library is complementary to the EXSLT project.</para>
+
+    </chapter>
+
+    <chapter>
+      <title>Reference Documentation</title>
+
+      <para>Reference documentation is available for each module.</para>
+
+      <section>
+        <title>String Processing</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="string.html">string.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Nodes</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="node.html">node.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Date/Time Processing</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="date-time.html">date-time.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Mathematics</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="math.html">math.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>URI (Uniform Resource Identifier) Processing</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="uri.html">uri.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Comparing Nodesets</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="cmp.html">cmp.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Generating XML Markup</title>
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="markup.html">markup.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Presentation Media Support</title>
+
+        <itemizedlist>
+          <listitem>
+            <para>Scalable Vector Graphics: <ulink url="svg.html">svg.xsl</ulink></para>
+          </listitem>
+<!--
+          <listitem>
+            <para><ulink url="html/html.html">html/html.xsl</ulink></para>
+          </listitem>
+          <listitem>
+            <para><ulink url="fo/fo.html">fo/fo.xsl</ulink></para>
+          </listitem>
+-->
+        </itemizedlist>
+      </section>
+
+      <section>
+        <title>Example</title>
+
+        <!-- Add a new module in a similar fashion -->
+
+        <itemizedlist>
+          <listitem>
+            <para><ulink url="example.html">example.xsl</ulink></para>
+          </listitem>
+        </itemizedlist>
+      </section>
+    </chapter>
+
+  </doc:book>
+
+</xsl:stylesheet>



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: site-cvs-help@jakarta.apache.org