+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: "Christopher R. Maden" <crism@xxxxxxxxx>
Date: Fri, 29 Jun 2001 23:09:42 -0700
Re:  given @id="1.2.3" .... -1 || +1  to the "3" in @id
At 15:28 29-06-2001, Anthony E. wrote:
given @id="1.2.3", how do I add or subtract 1 from the
'.3' in the string "1.2.3" in a stylesheet?

I need to create "prev | next" links generated from
the current @id number for a file. ie - 'prev' link
would be equal to '1.2.2', and 'next' link would be
equal to '1.2.4'

You sure about that? How do you know if it's the last one in its section? What do you do then for the next? Or what if it's the first (for prev)?


If this section has an 'id' attribute (which is obviously not an ID attribute), perhaps the next and previous sections have 'id' attributes, too, and using their values would work better than just doing the calculation.

-Chris
--
Christopher R. Maden, XML Consultant
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.