xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abel Braaksma <abel.onl...@xs4all.nl>
Subject Re: Pagebreak
Date Mon, 15 Jan 2007 15:45:43 GMT
paul wrote:
> somehow it doesn't work for me :( I suspect I have an xpath-problem, but can't
> figure out what would be wrong...
> my template starts like this:
> <xsl:template match="projektindikator_info/projekt/projektindikator">
> 	<xsl:if test="position() > 1"><fo:block break-before="page"/></xsl:if>
> ...
> it works just fine, but always inserts a blank page at the beginning of the
> document. I don't understand this. Can I only call for positions if I go through
> a for-each loop?

This is an XSLT question and not about fop. You'll have more luck on the 
XSLT list. But to answer your question: position() returns the position 
of the current node in the source tree. It can be used inside an 
xsl:template (like you do) and in an xsl:for-each, xsl:for-each-group 
(if you use XSLT 2) etc.

You say "my template starts like this", but XSLT is a declarative 
language, the order of elements is not important, so it is impossible to 
say anything useful about your template without seeing more. Create a 
smallest possible XSLT file and a smallest possible XML input file that 
illustrate your problem. Post them, plus explanation and an example of 
what you want the output to look like, on the XSLT list and you have a 
good chance that someone can help you out.

-- Abel Braaksma

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

View raw message