Node value on a header page

2013-05-22 Thread Jean-Pierre Lamon
Hi,

 

In order to make a bibliographic list with FOP, my XML is built as this :

 

collection

level_1 CallNumber=o Value=@Künste, Unterhaltung und Sport /
Arts, loisirs et sport / Arti, attività ricreative e sport / Arts, sports,
games and entertainment/

level_1 CallNumber=o.a.1.03 Value=Kunstmuseen,
Kunstsammlungen / Musées des beaux-arts, collections d'art / Musei di belle
arti / Art museums and collections

record

   bibliographic fields (Author, title etc…)

   ….

/record

level_1 CallNumber=o.a.1.10 Value=Angewandte Kunst / Arts
décoratifs / Arti decorative / Decorative arts

….

/level_1

/collection

 

The goal is to group author/titles under level_1. If there is a @ in the
beginning of the level_1/@value, even if there is no record under it, I’m
displaying the @Value.

What I want to do, is to display dynamically the current parent value
starting-with a @ on the header region of a new page.

 

I want this in each page : header region (=underline) and body region of a
new page

 

o Künste, Unterhaltung und Sport / Arts, loisirs et sport / Arti, attività
ricreative e sport / Arts, sports, games and entertainmentpage 2/120

 

o.a.1.10 Angewandte Kunst / Arts décoratifs / Arti decorative / Decorative
arts

 

my records under this level here

 

XSL :

 

xsl:for-each select=collection/level_1

xsl:variable name=hdr
select=normalize-space(substring(@Value,1,1))/

xsl:choose

xsl:when test=$hdr='@'

xsl:value-of
select=substring(@Value,2)/

/xsl:when

xsl:choose

xsl:choose

xsl:when test=”record”

xsl:value-of select=concat('-
',@Value)/

xsl:for-each select=”record”

Records here

xsl:for-each

xsl:when

/xsl:choose

 

I’ve tried with parent.. ancestror.. etc… no success. Is this possible with
FOP?

 

Thanks

JP

 

 

 

 



Re: Node value on a header page

2013-05-22 Thread Bonekrusher
This is more of a XSLT question then FOP. In xslt 1.0 you can use the the
Muenchian Method  http://www.jenitennison.com/xslt/grouping/muenchian.html
http://www.jenitennison.com/xslt/grouping/muenchian.html   and in xslt 2.0
you can use xsl:for-each-group 



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/Node-value-on-a-header-page-tp38557p38558.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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