W3C home > Mailing lists > Public > www-xsl-fo@w3.org > January 2002

Re: special marker

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Tue, 29 Jan 2002 14:37:54 -0500
Message-Id: <5.1.0.14.0.20020129142758.02304e88@pop1.attglobal.net>
To: www-xsl-fo@w3.org
At 2002-01-29 18:25 +0000, Dave Pawson wrote:
>At 15:29 29/01/2002 +0100, Jochen.Maes@kbcsecurities.be wrote:
>>Hi there,
>>
>>
>>I'm trying to put a line on a page with xsl-fo.
>>can i define the excact X and y points to do that?
>>i have the macro specifications and these R the places where there must be
>>one little line:
>>
>>                 ' Last page
>>                 InsertLine 14.2, 240, 51, 240
>>      ' Other pages
>>                 Do
>>                 InsertLine 14.2, 220, 51, 220
>
>Hi Jochen.
>No, I don't think so in xsl-fo.

I wondered if one could use rules in absolutely positioned containers.

I don't know what measurement units are being used in Jochen's example, but 
they do look like horizontal lines which could be rendered by rules.

The example below in Antenna House draws a small rule in the top left 
corner of each page except the last page, where a small rule is drawn in 
the top right corner.  I'll leave it to Jochen to work out the precise 
positioning.  My block-container dimensions are rather arbitrary as I can't 
take time to make them very precise.

Note the page sequence is defined with particular behaviour for the last 
page in the sequence, and I'm using static content targeted for each page 
to define an absolutely-positioned block-container.

Ugly, but it works ...

>If you have a processor that supports svg, you may be able to use that.

I think Dave is right here (and certainly right if what you want isn't a 
horizontal line) ... though you would still need the page-sequence with the 
conditional test to do the different last-page behaviour.

I hope this helps.

....................... Ken

T:\ftemp>type jochen.fo
<?xml version="1.0" encoding="utf-8"?><!--jochen.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
       font-family="Times" font-size="20pt">

<layout-master-set>
   <simple-page-master master-name="frame"
     page-height="297mm" page-width="210mm"
     margin-top="15mm" margin-bottom="15mm"
     margin-left="15mm" margin-right="15mm">
     <region-body region-name="frame-body"/>
     <region-start region-name="frame-before" extent="0mm"/>
   </simple-page-master>
   <simple-page-master master-name="frame-last"
     page-height="297mm" page-width="210mm"
     margin-top="15mm" margin-bottom="15mm"
     margin-left="15mm" margin-right="15mm">
     <region-body region-name="frame-body"/>
     <region-start region-name="frame-last-before" extent="0mm"/>
   </simple-page-master>
   <page-sequence-master master-name="frames">
     <repeatable-page-master-alternatives>
       <conditional-page-master-reference master-reference="frame-last"
         page-position="last"/>
       <conditional-page-master-reference master-reference="frame"/>
     </repeatable-page-master-alternatives>
   </page-sequence-master>
</layout-master-set>

<page-sequence master-reference="frames">
   <static-content flow-name="frame-before">
     <block-container absolute-position="fixed"
       top="1cm" left="1cm" bottom="26cm" right="18cm">
       <block line-height="3px">
         <leader rule-thickness="3px" leader-length="5mm"
                 leader-pattern="rule"/>
       </block>
     </block-container>
   </static-content>

   <static-content flow-name="frame-last-before">
     <block-container absolute-position="fixed"
       top="1cm" left="18cm" bottom="26cm" right="1cm">
       <block line-height="3px">
         <leader rule-thickness="3px" leader-length="5mm"
                 leader-pattern="rule"/>
       </block>
     </block-container>
   </static-content>

   <flow flow-name="frame-body">

     <block break-before="page">This is a test</block>
     <block break-before="page">This is a test</block>
     <block break-before="page">This is a test</block>
     <block break-before="page">This is a test</block>

   </flow></page-sequence></root>
T:\ftemp>


--
Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                        Definitive XSLT & XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:  02-02-11,12,14,15,18,21,03-04,05,06,08,11,
-                                04-08,09,10,12,05-14,15,06-04,07
Received on Tuesday, 29 January 2002 16:40:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT