The string-repeat() function
Smartsite 7.2 - ...
The string-repeat() extension function returns a new string, in which the specified string as first argument is repeated the number of times as specified by the second argument.
| XML |
|
|---|---|
string exf:string-repeat(arg1, int count) |
|
Parameters:
- arg1: a node reference or string literal.
- int count: the number of times the string must be repeated.
Example
| XML |
|
|---|---|
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:exf="http://smartsite.nl/namespaces/xforms/1.0">
<head>
<title>Example</title>
<xf:model>
<xf:instance>
<data xmlns="">
</data>
</xf:instance>
</xf:model>
</head>
<body>
<xf:group ref="/data" appearance="full">
<xf:label />
<xf:output value="exf:string-repeat('hi',3)" />
</xf:group>
</body>
</html>
|
|
The result will be:
hihihi
Namespace
This function is available within the Smartsite XForms namespace (http://smartsite.nl/namespaces/xforms/1.0).