Modules | Implementer Page: str.padding.html Function Syntaxstring str:padding(number, string?) Template Syntax<xsl:call-template name="str:padding"> <xsl:with-param name="length" select="number" /> <xsl:with-param name="chars" select="string" />? </xsl:call-template>
The The first argument gives the length of the padding string to be created.
The second argument gives a string to be used to create the padding. This string is repeated as many times as is necessary to create a string of the length specified by the first argument; if the string is more than a character long, it may have to be truncated to produce the required length. If no second argument is specified, it defaults to a space ( Implementations
The following XSLT processors support
Implementations of
ExamplesFunctionThe following example shows how to use the Source<a> <c>Is this EXSLT? No. no</c> </a> Stylesheet<xsl:template match="a"> <xsl:apply-templates /> </xsl:template> <xsl:template match="*"> <xsl:value-of select="str:padding(20, '---4567----23----890----------')" /> <xsl:value-of select="." /> <xsl:value-of select="str:padding(10, '+-+')" /> <xsl:apply-templates select="*" /> </xsl:template> |
http://www.exslt.org/str/functions/padding/index.html last modified 2002-11-12