xml - add fo:marker marker-class-name="section.head.marker" to specific sections -
i have been trying figure out how can manually or automatically add fo:marker section.head.marker specific sections.
i using fop convert xml files pdf.
my format looks such
article section a1 - section a2 - section a3 section b1 - section b2 - section b3
i can use the
<xsl:param name="marker.section.level">3</xsl:param>
to generate header of sections, not want header generated a3, want b3.
i have tried switching a3 simplesect simplesect @ level still has header generated.
i have tried manually adding fo:marker such:
<section id="b3"> <fo:marker marker-class-name="section.head.marker"> b3 </fo:marker> <title id="b3.title">b3</title> ...
but in pdf output get:
<fo:marker> sensors </fo:marker>
is there missing manually add fo:marker xml file, or there way prevent fo:markers being generated in simplesect's via xsl?
it looks might solved in similar way as
<xsl:template match="processing-instruction('hard-pagebreak')"> <fo:block break-after='page'/> </xsl:template>
where instead of adding hard-pagebreak command xml add header command of sorts grabs current section title , creates fo:header
the xsl section handles running header generation is:
<xsl:param name="marker.section.level">2</xsl:param> <xsl:template name="header.content"> <xsl:param name="position" select="''"/> <xsl:param name="sequence" select="''"/> <fo:block> <!-- position can left, center, right --> <xsl:choose> <xsl:when test="$sequence = 'first'"> <!-- off --> </xsl:when> <xsl:when test="$position = 'left'"> <xsl:call-template name="draft.text"/> </xsl:when> <xsl:when test="$position = 'center'"> <fo:retrieve-marker retrieve-class-name="section.head.marker" retrieve-position="first-including-carryover" retrieve-boundary="page-sequence"/> </xsl:when> </xsl:choose> </fo:block> </xsl:template>
the rest of xsl file handles:
imports <xsl:import href="./docbook-xsl/fo/docbook.xsl"/> first moving toc new page allowing hard page breaks adding footer ( title, page# ) verbatim segment properties shading/word wrap formatting revision history disable hyphenation disable showing urls of links color links
i able generate manual section.head.marker following xsl code:
<xsl:template match="processing-instruction('running-header')"> <fo:block> <fo:marker marker-class-name="section.head.marker"> <xsl:value-of select="../title"/> </fo:marker> </fo:block> </xsl:template>
then included running header processing-instruction.
<section id="b3" xmlns:fo="http://www.w3.org/1999/xsl/format" > <?running-header?> <title id="b3.title">b3</title>
this allows me manually add section.head.marker current section title.
Comments
Post a Comment