Modules | Version: 1 Function Syntaxstring str:align(string, string, string?) Template Syntax<xsl:call-template name="str:align"> <xsl:with-param name="string" select="string" /> <xsl:with-param name="padding" select="string" /> <xsl:with-param name="alignment" select="string" />? </xsl:call-template>
The The first argument gives the target string to be aligned. The second argument gives the padding string within which it is to be aligned.
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 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. 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. An implementation of this extension function in the EXSLT str namespace must conform to the behaviour described in this document. Implementations
Built-in support for
The following implementations of
Use CasesUse Case Package: str.align.use-cases.zip
The following use cases illustrate the functionality of
Change HistorySubmitted: 2001-06-08
|
http://www.exslt.org/str/functions/align/str.align.1.html last modified 2002-11-12