I solved the problem adding the marker as well to the refsect1 template.
<xsl:template match="refsect1">
<xsl:variable name="id">
<xsl:call-template name="object.id" />
</xsl:variable>
<xsl:variable name="reftitle">
<xsl:choose>
<xsl:when test="../refmeta/refentrytitle">
<xsl:apply-templates
select="../refmeta/refentrytitle" />
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:block id="{$id}">
<fo:marker marker-class-name="section.head.marker">
<xsl:value-of select="$reftitle" />
</fo:marker>
<xsl:call-template name="refsect1.titlepage" />
<xsl:apply-templates />
</fo:block>
</xsl:template>
Dan Stainhauser wrote:
>
> Hi Jeff
>
> I gladly found your posting to produce a running header of refentries. But
> unfortunately, it is not working correctly for my customization layer,
> since I'm using double side printing. What I get is on even pages the
> correct refname, but on odd pages the name from the previous refentry
> starting on an odd page. And vice versa if the refentry is starting on an
> odd page.
>
> It seems to me, that there are two variables, one for even and one for odd
> pages, and both of them have to be set.
>
> I'm retrieving the marker in the running header in the following way:
>
> <fo:retrieve-marker
>
> retrieve-class-name="section.head.marker"
>
> retrieve-position="first-including-carryover"
>
> retrieve-boundary="page-sequence" />
>
> Do you have an idea how this could be fixed?
>
> I'm using Docbook: 1.73 and FOP: 0.93
>
> Thanks and best regards
>
> Daniel
>
>
> Jeff Powanda wrote:
>>
>> Ah, finally figured this out. I customized the refnamediv template and
>> made sure it created markers for level 1 and level 2:
>>
>> <xsl:when test="$section.level = 1">
>> <fo:block xsl:use-attribute-sets="refentry.title.properties">
>> <fo:marker marker-class-name="section.head.marker">
>> <xsl:value-of select="$reftitle"/>
>> </fo:marker>
>> <fo:block
>> xsl:use-attribute-sets="section.title.level1.properties">
>> <xsl:value-of select="$reftitle"/>
>> </fo:block>
>> </fo:block>
>> </xsl:when>
>> <xsl:when test="$section.level = 2">
>> <fo:block xsl:use-attribute-sets="refentry.title.properties">
>> <fo:marker marker-class-name="section.head.marker">
>> <xsl:value-of select="$reftitle"/>
>> </fo:marker>
>> <fo:block
>> xsl:use-attribute-sets="section.title.level2.properties">
>> <xsl:value-of select="$reftitle"/>
>> </fo:block>
>> </fo:block>
>> </xsl:when>
>>
>> Now I've got running headers for refentry titles.
>>
>> Regards,
>> Jeff Powanda
>>
>>
>> -----Original Message-----
>> From: Jeff Powanda
>> Sent: Wednesday, May 30, 2007 6:19 PM
>> To: 'David Cramer (Tech Pubs)'; Samuel Wright;
>> [EMAIL PROTECTED]; [email protected]
>> Subject: RE: [docbook-apps] refentry or section
>>
>>
>> Has anyone figured out how to include the title of the refentry in a
>> running header? For section headings, I retrieve the section.head.marker
>> using the following:
>>
>> <fo:retrieve-marker retrieve-class-name="section.head.marker"
>> retrieve-position="first-including-carryover"
>> retrieve-boundary="page-sequence"/>
>>
>> However, no marker is retrieved for refentry pages, and on those pages
>> the header is blank.
>>
>> Regards,
>> Jeff Powanda
>>
>>
>> -----Original Message-----
>> From: David Cramer (Tech Pubs) [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, May 30, 2007 7:57 AM
>> To: Samuel Wright; [EMAIL PROTECTED];
>> [email protected]
>> Subject: RE: [docbook-apps] refentry or section
>>
>> Not sure it justifies the extra markup, but in terms of what the xsls
>> do, one thing you get with a reference and refentries that you don't
>> with a chapter and sections is additional summary info (the refpurpose)
>> in the toc. You can see this in the toc for tdg under "I. DocBook
>> Element Reference" where the toc has the element name and the refpurpose
>> instead of just the section's title:
>> http://www.docbook.org/tdg/en/html/docbook.html
>>
>> On the other hand, the <reference> has to be the child of a book (i.e.
>> it's like a <chapter>). I've found myself wanting to use a <reference>
>> as if it were a <section>.
>>
>> David
>>
>>>
>>> So to sum up here, I feel as though I _should_ use
>>> references, refsections and refentries for my api
>>> information, and chapters/sections/etc for my other content,
>>> _BUT_ I don't see that much advantage in doing so, and you
>>> also accrue some extra markup for no great reason.
>>>
>>> Any more thoughts?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/refentry-or-section-tf3835079.html#a12338304
Sent from the docbook apps mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]