Re: Pyjama stripes - for each 5 rows

2004-09-08 Thread J.Pietschmann
Avula, Srini wrote:
I have long list of students to display for each centre. I would like to
change background colour of each 5th row or space between 5 and 6th
rows.
Also check Jeni's pages
  http://www.jenitennison.com/xslt/grouping/index.html
and google for the term grouping by position.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Pyjama stripes - for each 5 rows

2004-09-07 Thread Pascal Sancho
Hi,
You can use a pattern like this:
(position() div 5) mod 2
When the result is 0, apply background color #1,
When the result is 1, apply background color #2.

If you need to know an ancestor element position, you may  replace position() 
with count(ancestor::ref_element/preceding-sibling::ref_element) -- this gives 
same result as position() - 1

But this looks like an XSLT problem. Ask on the XSL list for better code:
  http://www.mulberrytech.com/xsl/xsl-list  

-Message d'origine-
De : Avula, Srini [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 6 septembre 2004 13:59
À : [EMAIL PROTECTED]
Objet : Pyjama stripes - for each 5 rows

Hi

I have long list of students to display for each centre. I would like to change 
background colour of each 5th row or space between 5 and 6th rows.

any ideas how can I do it.

Much appreciate your help.

Kind Regards
Srini

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]