You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Debasish Jana <de...@anshinsoft.com> on 2006/04/11 11:41:54 UTC

FOP - help in alternate color setting in table

Hi:

 

Is there any way to set alternate colors for rows and columns for a
fo:table? For example, I would like to set the first row as red, second as
blue, third as red and so on.

 

If there is no such attribute to do so, is there any workaround to
accomplish this?

 

Pls help.

 

Regards,

 

Debasish Jana

 


Re: FOP - help in alternate color setting in table

Posted by Cinzia <ci...@dsl.pipex.com>.
Debasish wrote:

> I mean to say, using fo:table Tag of XSL-FO, do we have some attribute to
> achieve alternate color for table rows ?
> 
No I'm afraid.
Cinzia

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - help in alternate color setting in table

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Debasish Jana wrote:
> I mean to say, using fo:table Tag of XSL-FO, do we have some attribute to
> achieve alternate color for table rows ?

No. You have to set the background color for the table cells
explicitly. This should be always possible.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: FOP - help in alternate color setting in table

Posted by Debasish Jana <de...@anshinsoft.com>.
I mean to say, using fo:table Tag of XSL-FO, do we have some attribute to
achieve alternate color for table rows ?

Regards,

Debasish

-----Original Message-----
From: Cinzia [mailto:cinzianet@dsl.pipex.com] 
Sent: Tuesday, April 11, 2006 5:38 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP - help in alternate color setting in table

Debasish wrote:

> Many thanks, but is there any direct way using some fo tag as attribute to
> fo:table suc as say,
> 
>  
> 
> <fo:table ... >
> 
>  
> 
>  
> 
> </fo:table>


I don't understand what you're trying to say, sorry.
Cinzia

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: FOP - help in alternate color setting in table

Posted by Cinzia <ci...@dsl.pipex.com>.
Debasish wrote:

> Many thanks, but is there any direct way using some fo tag as attribute to
> fo:table suc as say,
> 
>  
> 
> <fo:table ... >
> 
>  
> 
>  
> 
> </fo:table>


I don't understand what you're trying to say, sorry.
Cinzia

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: FOP - help in alternate color setting in table

Posted by Debasish Jana <de...@anshinsoft.com>.
Many thanks, but is there any direct way using some fo tag as attribute to
fo:table suc as say,

 

<fo:table ... >

 

 

</fo:table>

 

Regards,

 

Debasish

 

  _____  

From: Cinzia [mailto:cinzianet@dsl.pipex.com] 
Sent: Tuesday, April 11, 2006 4:01 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP - help in alternate color setting in table

 

One way is to create the row in one xsl:template and cells in another
xsl:template.

 

If this is the type of table you have in mind, read colour(row,column):

 

R(1,1) B(1,2) R(1,3) B(1,4)
B(2,1) R(2,2) B(2,3) R(2,4)
R(3,1) B(3,2) R(3,3) B(3,4)
B(4,1) R(4,2) B(4,3) R(4,4)

 

then:

1) first cell of row:
      R if odd row
      B if even row
      store colour in v1
2) second and subsequent cells of row
      choose B when v1=R and R when v1=B
      store colour in v1

 

use xsl:param and xs:with-param setting and passing v1 for the two
templates.

 

Cinzia      

----- Original Message ----- 

From: Debasish <ma...@anshinsoft.com>  Jana 

To: fop-users@xmlgraphics.apache.org 

Sent: Tuesday, April 11, 2006 10:41 AM

Subject: FOP - help in alternate color setting in table

 

Hi:

 

Is there any way to set alternate colors for rows and columns for a
fo:table? For example, I would like to set the first row as red, second as
blue, third as red and so on.

 

If there is no such attribute to do so, is there any workaround to
accomplish this?

 

Pls help.

 

Regards,

 

Debasish Jana

 


Re: FOP - help in alternate color setting in table

Posted by Cinzia <ci...@dsl.pipex.com>.
One way is to create the row in one xsl:template and cells in another xsl:template.

If this is the type of table you have in mind, read colour(row,column):

R(1,1) B(1,2) R(1,3) B(1,4)
B(2,1) R(2,2) B(2,3) R(2,4)
R(3,1) B(3,2) R(3,3) B(3,4)
B(4,1) R(4,2) B(4,3) R(4,4)

then:
1) first cell of row:
      R if odd row
      B if even row
      store colour in v1
2) second and subsequent cells of row
      choose B when v1=R and R when v1=B
      store colour in v1

use xsl:param and xs:with-param setting and passing v1 for the two templates.

Cinzia      

  ----- Original Message ----- 
  From: Debasish Jana 
  To: fop-users@xmlgraphics.apache.org 
  Sent: Tuesday, April 11, 2006 10:41 AM
  Subject: FOP - help in alternate color setting in table


  Hi:

   

  Is there any way to set alternate colors for rows and columns for a fo:table? For example, I would like to set the first row as red, second as blue, third as red and so on.

   

  If there is no such attribute to do so, is there any workaround to accomplish this?

   

  Pls help.

   

  Regards,

   

  Debasish Jana