[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

last two characters

Subject: last two characters
From: ram <ram_kurra@xxxxxxxxxxx>
Date: Mon, 15 Nov 2010 04:10:49 +0530 (IST)
 last two characters
Hi,
  I have an xml which contains 

<Number>12345678912345678501234</Number>
I want to remove last two characters of this string and store it in variable
and also i need last two characters which i have stripped off.

<xsl:template
match="/">
	<xsl:variable name="s" select="/Number" />
	<xsl:value-of
select="substring($s, 1, string-length($s) - 2)" />
 </xsl:template>
This template removes last two characters and gives me 123456789123456785012.
I need 34 in another variable.is there any function something like last(xxx)
available .

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.