<?xml version="1.0" encoding="utf-8"?>
<exslt:function xmlns:exslt="http://exslt.org/documentation" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:vcf="http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-03.txt" version="1" module="str" status="new">
   <exslt:name>align</exslt:name>
   <rdf:Description ID="str:align">
      <dc:subject>EXSLT</dc:subject>
      <dc:subject>str</dc:subject>
      <dc:subject>align</dc:subject>
      <exslt:revision>
         <rdf:Description ID="str:align.1">
            <exslt:version>1</exslt:version>
            <dc:creator rdf:parseType="Resource">
               <vcf:fn>Jeni Tennison</vcf:fn>
               <vcf:email>mail@jenitennison.com</vcf:email>
               <vcf:url>http://www.jenitennison.com/</vcf:url>
            </dc:creator>
            <dc:date>2001-06-08</dc:date>
            <dc:description>
               <dc:description>
                  <html:div>
                     The <html:code>str:align</html:code> function aligns a string within another string.
                  </html:div>
               </dc:description>
            </dc:description>
         </rdf:Description>
      </exslt:revision>
      <exslt:revision>
         <rdf:Description ID="str:align.1.1">
            <exslt:version>1.1</exslt:version>
            <dc:creator rdf:parseType="Resource">
               <vcf:fn>Jeni Tennison</vcf:fn>
               <vcf:email>mail@jenitennison.com</vcf:email>
               <vcf:url>http://www.jenitennison.com/</vcf:url>
            </dc:creator>
            <dc:date>2001-06-21</dc:date>
            <dc:description>
               <dc:description>
                  <html:div>
                     Added Javascript and MSXML implementations.
                  </html:div>
               </dc:description>
            </dc:description>
         </rdf:Description>
      </exslt:revision>
      <exslt:revision>
         <rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                          xmlns:dc="http://purl.org/dc/elements/1.1/"
                          ID="str:align.1.2">
            <exslt:version>1.2</exslt:version>
            <dc:creator email="craig.stewart@nottingham.ac.uk" 
                        url="">Craig Stewart</dc:creator>
            <dc:date>2002-08-21</dc:date>
            <dc:description xmlns="http://www.w3.org/1999/xhtml">Added 4XSLT and libxslt implementation to the list.</dc:description>
         </rdf:Description>
      </exslt:revision>
      <exslt:revision>
         <rdf:Description xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                          xmlns:dc="http://purl.org/dc/elements/1.1/"
                          ID="str:align.1.3">
            <exslt:version>1.3</exslt:version>
            <dc:creator email="craig.stewart@nottingham.ac.uk" 
                        url="">Craig Stewart</dc:creator>
            <dc:date>2002-11-12</dc:date>
            <dc:description xmlns="http://www.w3.org/1999/xhtml">Updated 4XSLT version to 0.12.0a3.</dc:description>
         </rdf:Description>
      </exslt:revision>
   </rdf:Description>
   <exslt:doc>
      <html:div>
         <html:p>
         The <html:code>str:align</html:code> function aligns a string within another string.
      </html:p>
         <html:p>
         The first argument gives the target string to be aligned.  The second argument gives the padding string within which it is to be aligned.
      </html:p>
         <html:p>
         If the target string is shorter than the padding string then a range of characters in the padding string are repaced with those in the target string.  Which characters are replaced depends on the value of the third argument, which gives the type of alignment.  It can be one of <html:code>'left'</html:code>, <html:code>'right'</html:code> or <html:code>'center'</html:code>.  If no third argument is given or if it is not one of these values, then it defaults to left alignment.
      </html:p>
         <html:p>
         With left alignment, the range of characters replaced by the target string begins with the first character in the padding string.  With right alignment, the range of characters replaced by the target string ends with the last character in the padding string.  With center alignment, the range of characters replaced by the target string is in the middle of the padding string, such that either the number of unreplaced characters on either side of the range is the same or there is one less on the left than there is on the right.
      </html:p>
         <html:p>
         If the target string is longer than the padding string, then it is truncated to be the same length as the padding string and returned.
      </html:p>
      </html:div>
   </exslt:doc>
   <exslt:definition>
      <exslt:return type="string">
         <html:div/>
      </exslt:return>
      <exslt:arg name="string" type="string" default="''" optional="no">
         <html:div/>
      </exslt:arg>
      <exslt:arg name="padding" type="string" default="''" optional="no">
         <html:div/>
      </exslt:arg>
      <exslt:arg name="alignment" type="string" default="'left'" optional="yes">
         <html:div/>
      </exslt:arg>
   </exslt:definition>
   <exslt:implementations>
      <exslt:vendor-implementation
              version="1"
              vendor="4XSLT, from 4Suite."
              vendor-url="http://4Suite.org"
              vendor-version="0.12.0a3" />
      <exslt:vendor-implementation
              version="1"
              vendor="libxslt from Daniel Veillard et al."
              vendor-url="http://xmlsoft.org/XSLT/"
              vendor-version="1.0.19" />
      <exslt:implementation src="str.align.function.xsl" language="exslt:exslt" version="1"/>
      <exslt:implementation src="str.align.template.xsl" language="exslt:xslt" version="1"/>
      <exslt:implementation src="str.align.js" language="exslt:javascript" version="1">
         <rdf:Description ID="str:align.msxsl">
            <dc:subject>EXSLT</dc:subject>
            <dc:subject>str</dc:subject>
            <dc:subject>align</dc:subject>
            <dc:subject>Javascript</dc:subject>
            <exslt:revision>
               <rdf:Description ID="str:align.js.1">
                  <exslt:version>1</exslt:version>
                  <dc:creator rdf:parseType="Resource">
                     <vcf:fn>Chris Bayes</vcf:fn>
                     <vcf:email>chris@bayes.co.uk</vcf:email>
                     <vcf:url>http://www.bayes.co.uk</vcf:url>
                  </dc:creator>
                  <dc:date>2001-06-21</dc:date>
               </rdf:Description>
            </exslt:revision>
         </rdf:Description>
      </exslt:implementation>
      <exslt:implementation src="str.align.msxsl.xsl" language="exslt:msxsl" version="1">
         <rdf:Description ID="str:align.msxsl">
            <dc:subject>EXSLT</dc:subject>
            <dc:subject>str</dc:subject>
            <dc:subject>align</dc:subject>
            <dc:subject>MSXML</dc:subject>
            <exslt:revision>
               <rdf:Description ID="str:align.msxsl.1">
                  <exslt:version>1</exslt:version>
                  <dc:creator rdf:parseType="Resource">
                     <vcf:fn>Chris Bayes</vcf:fn>
                     <vcf:email>chris@bayes.co.uk</vcf:email>
                     <vcf:url>http://www.bayes.co.uk</vcf:url>
                  </dc:creator>
                  <dc:date>2001-06-21</dc:date>
               </rdf:Description>
            </exslt:revision>
         </rdf:Description>
      </exslt:implementation>
   </exslt:implementations>
   <exslt:use-cases>
      <exslt:use-case type="example" xslt="str.align.1.xsl" data="str.align.data.1.xml">
         <rdf:Description ID="str:align.use-case">
            <dc:subject>EXSLT</dc:subject>
            <dc:subject>str</dc:subject>
            <dc:subject>align</dc:subject>
            <dc:subject>example</dc:subject>
            <exslt:revision>
               <rdf:Description ID="str:align.use-case.1">
                  <exslt:version/>
                  <dc:creator rdf:parseType="Resource">
                     <vcf:fn>Chris Bayes</vcf:fn>
                     <vcf:email>chris@bayes.co.uk</vcf:email>
                     <vcf:url>http://www.bayes.co.uk</vcf:url>
                  </dc:creator>
                  <dc:date>2001-06-26</dc:date>
                  <dc:description/>
               </rdf:Description>
            </exslt:revision>
         </rdf:Description>
      </exslt:use-case>
   </exslt:use-cases>
</exslt:function>
