[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Strings Position
Bruno LLopes wrote:
I have a string for exemple '00643cam 022002291 04500' and I need look at every position of the string a see if each element has the correct value... How can I shift the string position by position?
If the string contains multiple parts, you can program unrolled code, like <xsl:variable name="part1" select="substring-before($str,' ')"/> <xsl:variable name="tail1" select="substring-after($str,' ')"/> <xsl:variable name="part2" select="substring-before($tail1,' ')"/> <xsl:variable name="tail2" select="substring-after($tail1,' ')"/> or use a recursive template as described in the XSL FAQ: http://www.dpawson.co.uk/xsl/sect2/N7240.html#d8065e280 J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|