This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: given @id="1.2.3" .... -1 || +1 to the "3" in @id??
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] given @id="1.2.3" .... -1 || +1 to the "3" in @id??
- From: "Anthony E." <apwebdesign at yahoo dot com>
- Date: Mon, 2 Jul 2001 11:20:29 -0700 (PDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
the sections for the prev & next links are in
different xml files, so I can't use xpath to determine
if it's the first or last element. I will have an
attribute first="1.1.1" and last="1.1.3" in each
<section> element. Then I can compare if the current
"id" attribute is equal to first or last and determine
whether or not there is a prev or next link.
--- "Christopher R. Maden" <crism@maden.org> wrote:
> 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
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list