Bip looping
Longtime back,
i answered this in the forum :)
try these
http://sourceware.org/ml/xsl-list/2001-05/msg00517.html
http://www.biglist.com/lists/xsl-list/archives/200105/msg00515.html
http://www.biglist.com/lists/xsl-list/archives/200105/msg00536.html
string-length function.
http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/addressbook.html?stylesheetFile=XSLT/stringFunctions.xslt
TEMPLATE
++++++++++++++
<?xdoxslt:set_variable($_XDOCTX, 'cnt',string-length(.))?>
<?for-each:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'cnt'),1)?>
X
<?end for-each?>
------------------------------------------------------------------------------------------------------
XML
<TEST>FIVE</TEST>
this will print no.of X for the length of the string passed.
so it will print "XXXX"
Hope this helps
i answered this in the forum :)
try these
http://sourceware.org/ml/xsl-list/2001-05/msg00517.html
http://www.biglist.com/lists/xsl-list/archives/200105/msg00515.html
http://www.biglist.com/lists/xsl-list/archives/200105/msg00536.html
string-length function.
http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/addressbook.html?stylesheetFile=XSLT/stringFunctions.xslt
TEMPLATE
++++++++++++++
<?xdoxslt:set_variable($_XDOCTX, 'cnt',string-length(.))?>
<?for-each:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'cnt'),1)?>
X
<?end for-each?>
------------------------------------------------------------------------------------------------------
XML
<TEST>FIVE</TEST>
this will print no.of X for the length of the string passed.
so it will print "XXXX"
Hope this helps
Comments