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 David Penton <dj...@arrowsash.com> on 2002/07/15 19:33:25 UTC

line numbers - can they be generated using FOP

Is there a way to generate line numbers in FOP? Perhaps my question is 
about xsl-fo generally.  I would like to have the line number counted on 
a page, and to be able to place it beside each line, or perhaps every 
fifth line.  Can xsl-fo do this?


Re: line numbers - can they be generated using FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
David Penton wrote:
> I suppose you mean that the DocBook stylesheet that builds the xsl-fo 
> does this.  How would the stylesheet have knowledge of how the line 
> areas are built in the xsl-fo engine?

Dunno. Check the source.

>  It appears to me that there is 
> almost no way in xsl-fo to trigger on (i.e. test & control layout base 
> on) things that are in the knowledge of the xsl-fo engine, except for 
> the rudimentary control provided by page-sequences.  Is that correct, or 
> do I misunderstand xsl-fo?

I'm not sure what you mean. XSLFO basically declares
how the content should be laid out. There ins't much
non-declarative stuff in there.

J.Pietschmann


Re: line numbers - can they be generated using FOP

Posted by David Penton <dj...@arrowsash.com>.
J.Pietschmann wrote:

> David Penton wrote:
>
>> Is there a way to generate line numbers in FOP? Perhaps my question 
>> is about xsl-fo generally.  I would like to have the line number 
>> counted on a page, and to be able to place it beside each line, or 
>> perhaps every fifth line.  Can xsl-fo do this?
>
>
> No, there is no specific functionality in XSLFO for this
> purpose.
> You can try to get this with XSLT, but unless lines are
> marked up specifically, this is still somewhat ugly, and
> you have to pay attention to some insidious formatting
> issues.
> DocBook XSL uses XSLT processor extension functions for
> efficient line number generation. 

Thanks for the answer.

I suppose you mean that the DocBook stylesheet that builds the xsl-fo 
does this.  How would the stylesheet have knowledge of how the line 
areas are built in the xsl-fo engine?  It appears to me that there is 
almost no way in xsl-fo to trigger on (i.e. test & control layout base 
on) things that are in the knowledge of the xsl-fo engine, except for 
the rudimentary control provided by page-sequences.  Is that correct, or 
do I misunderstand xsl-fo?

>
>
> J.Pietschmann
>
>
>
>




Re: line numbers - can they be generated using FOP

Posted by "J.Pietschmann" <j3...@yahoo.de>.
David Penton wrote:
> Is there a way to generate line numbers in FOP? Perhaps my question is 
> about xsl-fo generally.  I would like to have the line number counted on 
> a page, and to be able to place it beside each line, or perhaps every 
> fifth line.  Can xsl-fo do this?

No, there is no specific functionality in XSLFO for this
purpose.
You can try to get this with XSLT, but unless lines are
marked up specifically, this is still somewhat ugly, and
you have to pay attention to some insidious formatting
issues.
DocBook XSL uses XSLT processor extension functions for
efficient line number generation.

J.Pietschmann