+1 to the "3" in @id

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

Re: given @id="1.2.3" .... -1 || +1 to the "3" in @id

Subject: Re: given @id="1.2.3" .... -1 || +1 to the "3" in @id??
From: Goetz Bock <bock@xxxxxxxxxxx>
Date: Sat, 30 Jun 2001 02:02:30 +0200
Re:  given @id="1.2.3" .... -1 || +1  to the "3" in @id
On Fri, Jun 29 '01 at 15:41, Anthony E. wrote:
> ...in other words, i want to add or subtract '1' from
> the substring after the last '.' in $x = '1.2.3.4'.
While my first idea was not at all, this is wrong. All you have to do
is:
- find position of last '.'
- get number after last '.'
- conver it to a number (and placing it into variable)
- create a new strig with oldstr + <xsl:value-of select="$var+1"/>

I leave the real implementation as an exercise to the dear reader (all
info you need is e.g. on the XSL-T quick reference offered by
mulberrytech.com)
-- 
Goetz Bock                                              IT Consultant
Dipl.-Inf. Univ.

Attachment: pgp00015.pgp
Description: PGP signature

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.