Modules | Supported Version: 1 Source<func:function name="str:padding"> <xsl:param name="length" select="0" /> <xsl:param name="chars" select="' '" /> <xsl:choose> <xsl:when test="not($length) or not($chars)" /> <xsl:otherwise> <xsl:variable name="string" select="concat($chars, $chars, $chars, $chars, $chars, $chars, $chars, $chars, $chars, $chars)" /> <xsl:choose> <xsl:when test="string-length($string) >= $length"> <func:result select="substring($string, 1, $length)" /> </xsl:when> <xsl:otherwise> <func:result select="str:padding($length, $string)" /> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </func:function> Change HistorySubmitted: 2001-07-18 |
http://www.exslt.org/str/functions/padding/str.padding.function.xsl.html last modified 2001-07-18