This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how do you redefine a variable[off topic]
- To: "Tim Watts" <timw at 3d3 dot com>
- Subject: Re: [xsl] how do you redefine a variable[off topic]
- From: Jeni Tennison <mail at jenitennison dot com>
- Date: Wed, 28 Feb 2001 09:54:57 +0000
- CC: xsl-list at lists dot mulberrytech dot com
- Organization: Jeni Tennison Consulting Ltd
- References: <000901c0a13e$aac16820$8c01a8c0@3d38kw1n0b1udc>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Tim,
> I noted your answer to Daniel about testing the value of position()
> mod 2 for alternating the colors in table rows.
>
> What is the "mod 2" that you are refering to?
'mod' is an XPath operator. If you do:
N mod M
then you get the remainder of N divided by M. So doing:
position() mod 2
you get either 0 (if the position() is even) or 1 (if the position()
is odd).
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list