W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2003

Markers

From: Cindy Hunt <Cindy.Hunt@sas.com>
Date: Wed, 20 Aug 2003 16:09:25 -0400
Message-ID: <187D6D956106D84E9D8B280F6458FE1401A71C1D@merc12.na.sas.com>
To: <www-xsl-fo@w3.org>

Hi-

I am creating a running head and want it to display "Chapter ##" and the text of the chapter title along with the page number. The page number is working fine but the chapter number and title text are not pulling in. I am using a marker for these and followed an example in Dave Pawson's "XSL-FO" book but the marker text is still not appearing in the PDF output. I even tried substituting regular text for "chapName" instead of pulling in the title and it still did not appear in the final output. 

Here is what I have in the chapter element:
	<xsl:template match="chapter">
		<fo:block break-before="odd-page">
			<fo:marker marker-class-name="chapName">
				<xsl:value-of select="title"/>
			</fo:marker>
			<fo:marker marker-class-name="chapNum">
				<xsl:number count="chapter" level="any" from="body"/>
			</fo:marker>
			<xsl:apply-templates/>
		</fo:block>
	</xsl:template>
	
	<xsl:template match="chapter/title">
		<fo:block>
			<xsl:apply-templates/>
		</fo:block>
	</xsl:template>

Here is what I have in the static content for the running head:

<fo:static-content flow-name="even-before">
					<fo:block
						keep-together.within-line="always"
						text-align="left"><fo:page-number/><fo:leader leader-pattern="space" leader-length="12pt"/>Chapter <fo:retrieve-marker retrieve-class-name="chapNum"/> &#x2022; <fo:retrieve-marker retrieve-class-name="chapName"/></fo:block>
				</fo:static-content>

Anyone have ideas on what would keep this from working correctly? I am using the FOP engine via XMLSpy if that helps.

Thanks!
Cindy Hunt
Received on Friday, 22 August 2003 17:41:14 GMT

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