W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2008

Re: dynamic running headers: how to know if a column is filled??

From: Tony Graham <Tony.Graham@MenteithConsulting.com>
Date: Wed, 09 Apr 2008 11:46:53 +0100
To: www-xsl-fo@w3.org
Message-ID: <87od8jjof6.fsf@zako.menteithconsulting.com>

On Wed, Apr 09 2008 11:05:13 +0100, siameiz@gmail.com wrote:
> It’s a long time that I’m facing this problem. I’m creating a PDF from a XML
> encoded dictionary. I want two headers for each page, the first entry within
> the page and the last. Each page contains two columns. The problem is that,
> in the last page of each letter, if only one column is outputted, I don’t
> want the last entry to be retrieved to the marker. How can I know if the
> second column is filled?

I haven't tried this, but what about adding an extra marker with empty
content after (or at the end of) the last entry?  It won't solve your
one-column or two-column problem (which can't be solved in any standard
way because that sort of feedback isn't in XSL 1.1), but it should get
you only one visible marker on the last page.

Alternatively, you could balance the columns on the last page by putting
an empty block with span="all" [1] after the FOs for the dictionary
entries.  You would then be much less likely to have a one-column final
page.

Related to this, the current draft XSL FO 2.0 requirements includes a
section on coalescing markers [2], which could be helpful if your last
page contained just one dictionary entry.

Regards,


Tony Graham                         Tony.Graham@MenteithConsulting.com
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
"Testing XSLT" tutorial, XTech 2008, 6 May 2008, Dublin, Ireland

[1] http://www.dpawson.co.uk/xsl/sect3/N8542.html#d13286e163
[2] http://www.w3.org/TR/2008/WD-xslfo20-req-20080326/#N66468
Received on Wednesday, 9 April 2008 10:47:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 April 2008 10:47:56 GMT