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

fox:bookmark

From: Steve Vachon <vachon@irosoft.com>
Date: Wed, 6 Mar 2002 17:27:27 -0500 (EST)
Message-Id: <5.1.0.14.0.20020306171830.00a5bdd0@mail.irosoft.com>
To: www-xsl-fo@w3.org
Hi,

I use the fox:bookmark to build bookmark and I know that I have to put the 
code between the layout-master-set and the page-sequence.  My code is:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" 
xmlns:fox="http://xml.apache.org/fop/extensions">
		<fo:layout-master-set>
			<fo:simple-page-master master-name="simple" page-height="29.7cm" 
page-width="{$page-width}cm"
					margin-top="1.5cm" margin-bottom="1.5cm" margin-left="2cm"
					margin-right="2cm">
				<fo:region-body margin-top="1cm" margin-bottom="1.2cm"/>
				<fo:region-before extent="1cm"/>
				<fo:region-after extent="1cm"/>
			</fo:simple-page-master>
		</fo:layout-master-set>
		<xsl:for-each select="Body">
			<xsl:for-each select="Group1-Part">
				<xsl:call-template name="Group1"/>
			</xsl:for-each>
		</xsl:for-each>
		<fo:page-sequence master-reference="simple">
			<fo:static-content flow-name="xsl-region-before">
				<fo:table>
	....

When I find a Body, I pass all the Group1-Part of the Body and this code is:

<xsl:template name="Group1">
	<fox:bookmark internal-destination="{generate-id(.)}">
		<fox:label>
			<xsl:value-of select="Heading/TitleText"/>
		</fox:label>
		<xsl:for-each select="Group2-Division">
			<xsl:call-template name="Group2"/>
		</xsl:for-each>
	</fox:bookmark>
</xsl:template>

When I find a Group2-Division in the Group1-Part, I build another bookmard 
with this code:

<xsl:template name="Group2">
	<fox:bookmark internal-destination="{generate-id(.)}">
		<fox:label>
			<xsl:value-of select="Section/MarginalNote"/>
		</fox:label>
	</fox:bookmark>
</xsl:template>

I got no error when I build the fo file but it doesn't build my 
bookmark.  I think that I don't call my templates correctly in the fo:root 
but I don't know how to call them correctly.  So if anyone knows how I can 
make it without build the bookmarks in the fo:root, please show me how to 
do it.

Sorry for my english and thanks in advance.

Steve Vachon
Received on Thursday, 7 March 2002 11:06:15 GMT

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