Re: Alternating background-color for table rows, but always restart on page break

2014-03-28 Thread Pascal Sancho
Hi,

That can only be done after XSL-FO processing.
Fortunately, FOP provides XML intermediate formats (see [1]) that feed
renderers.

You can modify such intermediate format as you want.

[1] http://xmlgraphics.apache.org/fop/1.1/intermediate.html

2014-03-27 15:15 GMT+01:00 Frank Hirsch frank.hir...@mac.com:
 Hi Rob,

 Of course there will be a parent xsl:for-each select=... selector to
 iterate over a list of nodes.
 Still I am 99% sure it will be rather a programmatic issue to be solved in
 the Renderer instead of XSLT...

 On 27 Mar 2014, at 15:10, Rob Sargent rsarg...@xmission.com wrote:

 Over what are you iterating? ie. to what is position() referring?

 Sent from my iPhone

 On Mar 27, 2014, at 7:55 AM, Frank Hirsch frank.hir...@mac.com wrote:

 It's easy to toggle to background color of table rows in XSLT using mod:

 fo:table-row
 xsl:attribute name=background-color
 xsl:choose
 xsl:when test=(position() mod 2) = 0
 #ff
 /xsl:when
 xsl:otherwise
 #cc
 /xsl:otherwise
 /xsl:choose
 /xsl:attribute
 fo:table-cell.../fo:table-cell
 /fo:table-row

 Unfortunately this does not match my current requirement and can not be
 solved in XSLT which does not now of page breaks:
 I need to start each page with #cc - espacially if there is a page
 break and the table will be continued on the next page.

 Any ideas?





-- 
pascal

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



Re: Alternating background-color for table rows, but always restart on page break

2014-03-28 Thread Frank Hirsch
Thx, that's a pretty good solution!
I will make a little test how complicated it will be to find the right table 
and how it's structured :)

http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml

On 28 Mar 2014, at 09:37, Pascal Sancho psancho@gmail.com wrote:

 Hi,
 
 That can only be done after XSL-FO processing.
 Fortunately, FOP provides XML intermediate formats (see [1]) that feed
 renderers.
 
 You can modify such intermediate format as you want.
 
 [1] http://xmlgraphics.apache.org/fop/1.1/intermediate.html
 
 2014-03-27 15:15 GMT+01:00 Frank Hirsch frank.hir...@mac.com:
 Hi Rob,
 
 Of course there will be a parent xsl:for-each select=... selector to
 iterate over a list of nodes.
 Still I am 99% sure it will be rather a programmatic issue to be solved in
 the Renderer instead of XSLT...
 
 On 27 Mar 2014, at 15:10, Rob Sargent rsarg...@xmission.com wrote:
 
 Over what are you iterating? ie. to what is position() referring?
 
 Sent from my iPhone
 
 On Mar 27, 2014, at 7:55 AM, Frank Hirsch frank.hir...@mac.com wrote:
 
 It's easy to toggle to background color of table rows in XSLT using mod:
 
 fo:table-row
 xsl:attribute name=background-color
 xsl:choose
 xsl:when test=(position() mod 2) = 0
 #ff
 /xsl:when
 xsl:otherwise
 #cc
 /xsl:otherwise
 /xsl:choose
 /xsl:attribute
 fo:table-cell.../fo:table-cell
 /fo:table-row
 
 Unfortunately this does not match my current requirement and can not be
 solved in XSLT which does not now of page breaks:
 I need to start each page with #cc - espacially if there is a page
 break and the table will be continued on the next page.
 
 Any ideas?
 
 
 
 
 
 -- 
 pascal
 
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 


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



Re: Alternating background-color for table rows, but always restart on page break

2014-03-27 Thread Frank Hirsch
Hi Rob,

Of course there will be a parent xsl:for-each select=... selector to 
iterate over a list of nodes.
Still I am 99% sure it will be rather a programmatic issue to be solved in the 
Renderer instead of XSLT...

On 27 Mar 2014, at 15:10, Rob Sargent rsarg...@xmission.com wrote:

 Over what are you iterating? ie. to what is position() referring?
 
 Sent from my iPhone
 
 On Mar 27, 2014, at 7:55 AM, Frank Hirsch frank.hir...@mac.com wrote:
 
 It's easy to toggle to background color of table rows in XSLT using mod:
 
 fo:table-row
  xsl:attribute name=background-color
  xsl:choose
  xsl:when test=(position() mod 2) = 0
  #ff
  /xsl:when
  xsl:otherwise
  #cc
  /xsl:otherwise
  /xsl:choose
  /xsl:attribute
  fo:table-cell.../fo:table-cell
 /fo:table-row
 
 Unfortunately this does not match my current requirement and can not be 
 solved in XSLT which does not now of page breaks:
 I need to start each page with #cc - espacially if there is a page 
 break and the table will be continued on the next page.
 
 Any ideas?



Re: Alternating background-color for table rows, but always restart on page break

2014-03-27 Thread Rob Sargent
Over what are you iterating? ie. to what is position() referring?

Sent from my iPhone

 On Mar 27, 2014, at 7:55 AM, Frank Hirsch frank.hir...@mac.com wrote:
 
 It's easy to toggle to background color of table rows in XSLT using mod:
 
 fo:table-row
   xsl:attribute name=background-color
   xsl:choose
   xsl:when test=(position() mod 2) = 0
   #ff
   /xsl:when
   xsl:otherwise
   #cc
   /xsl:otherwise
   /xsl:choose
   /xsl:attribute
   fo:table-cell.../fo:table-cell
 /fo:table-row
 
 Unfortunately this does not match my current requirement and can not be 
 solved in XSLT which does not now of page breaks:
 I need to start each page with #cc - espacially if there is a page 
 break and the table will be continued on the next page.
 
 Any ideas?