Header problems when chapters and parts in bookmap
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 13
- Joined: Tue Nov 13, 2012 9:30 pm
Header problems when chapters and parts in bookmap
Hi all,
I had a header problem in PDF when chapters are contained in parts.
When a bookmap only contains chapters, the header will be shown as:
Product Name | Chapter Name | Page Number,
however, if chapters are contained in parts in a bookmap, for those Part pages, the header will be:
Product Name | Part Name | Page Number,
but for those Chapter pages, the chapter name won't show up:
Product Name | | Page Number.
I took a look at the static-content.xsl, I think this might have something to do with the following code:
but I just cannot figure out how to modify this.
Any help will be appreciated.
Thanks,
Ivy
I had a header problem in PDF when chapters are contained in parts.
When a bookmap only contains chapters, the header will be shown as:
Product Name | Chapter Name | Page Number,
however, if chapters are contained in parts in a bookmap, for those Part pages, the header will be:
Product Name | Part Name | Page Number,
but for those Chapter pages, the chapter name won't show up:
Product Name | | Page Number.
I took a look at the static-content.xsl, I think this might have something to do with the following code:
Code: Select all
<heading>
<fo:inline xsl:use-attribute-sets="__body__odd__header__heading">
<fo:retrieve-marker retrieve-class-name="current-header"/>
</fo:inline>
</heading>
Any help will be appreciated.
Thanks,
Ivy
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Header problems when chapters and parts in bookmap
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 1
- Joined: Fri Mar 21, 2014 9:59 am
Re: Header problems when chapters and parts in bookmap
Hi.
i too have a similar question
My xsl file is
I want to have running header.
My xml file looks like this
please help me how to do this
i too have a similar question
My xsl file is
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- XSL STYLESHEET -->
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:exsl="http://exslt.org/common" xmlns:opentopic="http:/z/www.idiominc.com/opentopic"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
xmlns:str="http://xsltsl.org/string"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<!-- parameters that are to be set by the author at this point -->
<xsl:variable name="dita_topic_title"><xsl:value-of select="/dita//topic/@title"/></xsl:variable>
<xsl:param name="subtitle"><xsl:value-of select="/dita/concept/title"/></xsl:param>
<!-- XSL IMPORT -->
<xsl:include href="w+h-attribute-sets.xsl"/>
<xsl:include href="w+h-templates.xsl"/>
<xsl:include href="w+h-fonts.xsl"/>
<xsl:include href="string.xsl"/>
<!-- XSL OUTPUT -->
<xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# variables:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!-- Language -->
<xsl:variable name="language" select="German"/>
<!-- Fonts -->
<xsl:variable name="font-list">,Arial, Arial Unicode MS</xsl:variable>
<xsl:variable name="font-default">
<xsl:call-template name="get-font">
<xsl:with-param name="language" select="$language"/>
</xsl:call-template>
<xsl:value-of select="$font-list"/>
</xsl:variable>
<xsl:variable name="font-bold">
<xsl:value-of select="$font-default"/>
<xsl:value-of select="$font-list"/>
</xsl:variable>
<xsl:variable name="font-italic">
<xsl:value-of select="$font-default"/>
<xsl:value-of select="$font-list"/>
</xsl:variable>
<xsl:variable name="font-parameter-box">
<xsl:value-of select="$font-default"/>
<xsl:value-of select="$font-list"/>
</xsl:variable>
<xsl:variable name="dot-font">Arial</xsl:variable>
<!-- Images -->
<xsl:variable name="logo.pic"><xsl:value-of select="$style-graphic-path"
/>logo.gif</xsl:variable>
<!-- Paths -->
<xsl:variable name="graphic-path">
<xsl:value-of select="//processing-instruction('gpa')"/>
</xsl:variable>
<xsl:variable name="style-graphic-path">graphic/</xsl:variable>
<!-- Language code for hyphenation -->
<xsl:variable name="langcode" select="de"/>
<!-- Strings -->
<xsl:variable name="toc.str">CONTENTS</xsl:variable>
<xsl:variable name="index.str">Index</xsl:variable>
<xsl:variable name="see.str">siehe</xsl:variable>
<!-- <xsl:variable name="topic_title"><xsl:value-of select="//topic/@title"/></xsl:variable>-->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# parameters:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!-- Pagesize in [mm]-->
<xsl:param name="pagewidth">210</xsl:param>
<xsl:param name="pageheight">297</xsl:param>
<!-- Margins in [mm]-->
<xsl:param name="pagemargin-main-top">0</xsl:param>
<xsl:param name="pagemargin-main-bottom">0</xsl:param>
<xsl:param name="header-extent">31</xsl:param>
<!-- 12 -->
<xsl:param name="footer-extent">13</xsl:param>
<!-- 7 -->
<!-- right page -->
<xsl:param name="bodymargin-main-top-right">37</xsl:param>
<!-- 25 Kleemann: 39 - 16 = 23-->
<xsl:param name="bodymargin-main-bottom-right">13</xsl:param>
<!-- 17 Kleemann: 38 - 12 = 26 -->
<xsl:param name="bodymargin-main-left-right">20</xsl:param>
<!-- 50 -->
<xsl:param name="bodymargin-main-right-right">15</xsl:param>
<!-- 25 -->
<!-- left page -->
<xsl:param name="bodymargin-main-top-left">37</xsl:param>
<!-- 25 Kleemann: 39 - 16 = 23-->
<xsl:param name="bodymargin-main-bottom-left">13</xsl:param>
<!-- 17 Kleemann: 38 - 12 = 26 -->
<xsl:param name="bodymargin-main-left-left">20</xsl:param>
<!-- 37 -->
<xsl:param name="bodymargin-main-right-left">15</xsl:param>
<!-- 38 -->
<!-- Margins -->
<xsl:param name="table-cell-margin-top">0pt</xsl:param>
<xsl:param name="table-cell-margin-bottom">0pt</xsl:param>
<xsl:param name="table-cell-margin-left">2pt</xsl:param>
<xsl:param name="table-cell-margin-right">2pt</xsl:param>
<xsl:param name="border-width">0.3pt</xsl:param>
<!-- Objectspacing used in: caption, gen.list, line, list, parameter || table, para -->
<xsl:param name="objectspacing-top">0.5em</xsl:param>
<xsl:param name="objectspacing-bottom">0.5em</xsl:param>
<!-- Lineheight -->
<xsl:param name="lineheight">12pt</xsl:param>
<!-- Colors -->
<xsl:param name="border-color">#000000</xsl:param>
<xsl:param name="font-color">#000000</xsl:param>
<xsl:param name="gray">#808080</xsl:param>
<!-- Images -->
<xsl:param name="gen.pic"><xsl:value-of select="$style-graphic-path"/>general-2.png</xsl:param>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# template | ROOT:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- Layout-Master-Set -->
<fo:layout-master-set>
<!-- Simple-Page-Master | PGM.toc-left -->
<fo:simple-page-master master-name="PGM.toc-left" page-height="{$pageheight}mm"
page-width="{$pagewidth}mm" margin-top="{$pagemargin-main-top}mm"
margin-bottom="{$pagemargin-main-bottom}mm" margin-right="0mm" margin-left="0mm">
<fo:region-body margin-top="{$bodymargin-main-top-left}mm"
margin-bottom="{$bodymargin-main-bottom-left}mm"
margin-left="{$bodymargin-main-left-left}mm"
margin-right="{$bodymargin-main-right-left}mm" column-count="1"/>
<fo:region-before region-name="toc-left-before" display-align="after">
<xsl:attribute name="extent"><xsl:value-of select="$header-extent"
/>mm</xsl:attribute>
</fo:region-before>
<fo:region-after region-name="toc-left-after" display-align="before">
<xsl:attribute name="extent"><xsl:value-of select="$footer-extent"
/>mm</xsl:attribute>
</fo:region-after>
</fo:simple-page-master>
<!-- Simple-Page-Master | PGM.toc-right -->
<fo:simple-page-master master-name="PGM.toc-right" page-height="{$pageheight}mm"
page-width="{$pagewidth}mm" margin-top="{$pagemargin-main-top}mm"
margin-bottom="{$pagemargin-main-bottom}mm" margin-right="0mm" margin-left="0mm">
<fo:region-body margin-top="{$bodymargin-main-top-right}mm"
margin-bottom="{$bodymargin-main-bottom-right}mm"
margin-left="{$bodymargin-main-left-right}mm"
margin-right="{$bodymargin-main-right-right}mm" column-count="1"/>
<fo:region-before region-name="toc-right-before" display-align="after">
<xsl:attribute name="extent"><xsl:value-of select="$header-extent"
/>mm</xsl:attribute>
</fo:region-before>
<fo:region-after region-name="toc-right-after" display-align="before">
<xsl:attribute name="extent"><xsl:value-of select="$footer-extent"
/>mm</xsl:attribute>
</fo:region-after>
</fo:simple-page-master>
<!-- Simple-Page-Master | PGM.main-left -->
<fo:simple-page-master master-name="PGM.main-left" page-height="{$pageheight}mm"
page-width="{$pagewidth}mm" margin-top="{$pagemargin-main-top}mm"
margin-bottom="{$pagemargin-main-bottom}mm" margin-right="0mm" margin-left="0mm">
<fo:region-body margin-top="{$bodymargin-main-top-left}mm"
margin-bottom="{$bodymargin-main-bottom-left}mm"
margin-left="{$bodymargin-main-left-left}mm"
margin-right="{$bodymargin-main-right-left}mm" column-count="1"/>
<fo:region-before region-name="main-left-before" display-align="after">
<xsl:attribute name="extent"><xsl:value-of select="$header-extent"
/>mm</xsl:attribute>
</fo:region-before>
<fo:region-after region-name="main-left-after" display-align="before">
<xsl:attribute name="extent"><xsl:value-of select="$footer-extent"
/>mm</xsl:attribute>
</fo:region-after>
</fo:simple-page-master>
<!-- Simple-Page-Master | PGM.main-right -->
<fo:simple-page-master master-name="PGM.main-right" page-height="{$pageheight}mm"
page-width="{$pagewidth}mm" margin-top="{$pagemargin-main-top}mm"
margin-bottom="{$pagemargin-main-bottom}mm" margin-right="0mm" margin-left="0mm">
<fo:region-body margin-top="{$bodymargin-main-top-right}mm"
margin-bottom="{$bodymargin-main-bottom-right}mm"
margin-left="{$bodymargin-main-left-right}mm"
margin-right="{$bodymargin-main-right-right}mm" column-count="1"
column-gap="8mm"/>
<fo:region-before region-name="main-right-before" display-align="after">
<xsl:attribute name="extent"><xsl:value-of select="$header-extent"
/>mm</xsl:attribute>
</fo:region-before>
<fo:region-after region-name="main-right-after" display-align="before">
<xsl:attribute name="extent"><xsl:value-of select="$footer-extent"
/>mm</xsl:attribute>
</fo:region-after>
</fo:simple-page-master>
<!-- Simple-Page-Master | PGM.index-left -->
<fo:simple-page-master master-name="PGM.index-left" page-height="{$pageheight}mm"
page-width="{$pagewidth}mm" margin-top="{$pagemargin-main-top}mm"
margin-bottom="{$pagemargin-main-bottom}mm" margin-right="0mm" margin-left="0mm">
<fo:region-body margin-top="{$bodymargin-main-top-left}mm"
margin-bottom="{$bodymargin-main-bottom-left}mm"
margin-left="{$bodymargin-main-left-left}mm"
margin-right="{$bodymargin-main-right-left}mm" column-count="2"
column-gap="8mm"/>
<fo:region-before region-name="index-left-before" display-align="after">
<xsl:attribute name="extent"><xsl:value-of select="$header-extent"
/>mm</xsl:attribute>
</fo:region-before>
<fo:region-after region-name="index-left-after" display-align="before">
<xsl:attribute name="extent"><xsl:value-of select="$footer-extent"
/>mm</xsl:attribute>
</fo:region-after>
</fo:simple-page-master>
<!-- Simple-Page-Master | PGM.index-right -->
<fo:simple-page-master master-name="PGM.index-right" page-height="{$pageheight}mm"
page-width="{$pagewidth}mm" margin-top="{$pagemargin-main-top}mm"
margin-bottom="{$pagemargin-main-bottom}mm" margin-right="0mm" margin-left="0mm">
<fo:region-body margin-top="{$bodymargin-main-top-right}mm"
margin-bottom="{$bodymargin-main-bottom-right}mm"
margin-left="{$bodymargin-main-left-right}mm"
margin-right="{$bodymargin-main-right-right}mm" column-count="2"
column-gap="8mm"/>
<fo:region-before region-name="index-right-before" display-align="after">
<xsl:attribute name="extent"><xsl:value-of select="$header-extent"
/>mm</xsl:attribute>
</fo:region-before>
<fo:region-after region-name="index-right-after" display-align="before">
<xsl:attribute name="extent"><xsl:value-of select="$footer-extent"
/>mm</xsl:attribute>
</fo:region-after>
</fo:simple-page-master>
<fo:layout-master-set>
<fo:simple-page-master margin="10mm" master-name="A4">
<fo:region-before extent="10mm"/>
<fo:region-after extent="10mm"/>
<fo:region-body margin="10mm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="page">
<fo:repeatable-page-master-reference master-reference="A4"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<!-- Page-Sequence-Master | SQM.toc -->
<fo:page-sequence-master master-name="SQM.toc">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="PGM.toc-right"
odd-or-even="odd"/>
<fo:conditional-page-master-reference master-reference="PGM.toc-left"
odd-or-even="even"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
<!-- Page-Sequence-Master | SQM.main -->
<fo:page-sequence-master master-name="SQM.main">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="PGM.main-right"
odd-or-even="odd"/>
<fo:conditional-page-master-reference master-reference="PGM.main-left"
odd-or-even="even"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
<!-- Page-Sequence-Master | SQM.index -->
<fo:page-sequence-master master-name="SQM.index">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-reference="PGM.index-right"
odd-or-even="odd"/>
<fo:conditional-page-master-reference master-reference="PGM.index-left"
odd-or-even="even"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<!--COVER PAGE-->
<fo:page-sequence master-reference="SQM.main" initial-page-number="1" hyphenate="true" language="{$langcode}">
<!-- left header -->
<fo:static-content flow-name="main-left-before">
<fo:block><fo:retrieve-marker retrieve-boundary="page-sequence" retrieve-position="first-starting-within-page" retrieve-class-name="volname"/></fo:block>
<xsl:call-template name="generate-header">
<xsl:with-param name="align">left</xsl:with-param>
<xsl:with-param name="type">main</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- left footer -->
<fo:static-content flow-name="main-left-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">left</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right header -->
<fo:static-content flow-name="main-right-before">
<fo:block><fo:retrieve-marker retrieve-boundary="page-sequence" retrieve-position="first-starting-within-page" retrieve-class-name="volname"/></fo:block>
<xsl:call-template name="generate-header">
<xsl:with-param name="align">right</xsl:with-param>
<xsl:with-param name="type">main</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right footer -->
<fo:static-content flow-name="main-right-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">right</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- flow -->
<fo:flow flow-name="xsl-region-body" font-family="font10" word-spacing="0.5pt">
<xsl:apply-templates></xsl:apply-templates>
<xsl:call-template name="main.page"/>
</fo:flow>
</fo:page-sequence>
<!-- TOC -->
<fo:page-sequence master-reference="SQM.toc" hyphenate="true" language="{$langcode}">
<!-- left header -->
<fo:static-content flow-name="toc-left-before">
<xsl:call-template name="generate-header">
<xsl:with-param name="align">left</xsl:with-param>
<xsl:with-param name="type">toc</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- left footer -->
<fo:static-content flow-name="toc-left-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">left</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right header -->
<fo:static-content flow-name="toc-right-before">
<xsl:call-template name="generate-header">
<xsl:with-param name="align">right</xsl:with-param>
<xsl:with-param name="type">toc</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right footer -->
<fo:static-content flow-name="toc-right-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">right</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- flow -->
<fo:flow flow-name="xsl-region-body">
<xsl:call-template name="generate-toc"/>
</fo:flow>
</fo:page-sequence>
<!--MAIN-->
<xsl:for-each select="//*[parent::dita]">
<fo:page-sequence master-reference="SQM.main" hyphenate="true"
language="{$langcode}">
<!-- left header -->
<fo:static-content flow-name="main-left-before">
<xsl:call-template name="generate-header">
<xsl:with-param name="align">left</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- left footer -->
<fo:static-content flow-name="main-left-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">left</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right header -->
<fo:static-content flow-name="main-right-before">
<xsl:call-template name="generate-header">
<xsl:with-param name="align">right</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right footer -->
<fo:static-content flow-name="main-right-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">right</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- flow -->
<fo:flow flow-name="xsl-region-body" font-family="{$font-default}"
word-spacing="0.5pt">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
<!-- INDEX -->
<fo:page-sequence master-reference="SQM.index" hyphenate="true" language="{$langcode}">
<!-- left header -->
<fo:static-content flow-name="index-left-before">
<xsl:call-template name="generate-header">
<xsl:with-param name="align">left</xsl:with-param>
<xsl:with-param name="type">index</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- left footer -->
<fo:static-content flow-name="index-left-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">left</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right header -->
<fo:static-content flow-name="index-right-before">
<xsl:call-template name="generate-header">
<xsl:with-param name="align">right</xsl:with-param>
<xsl:with-param name="type">index</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- right footer -->
<fo:static-content flow-name="index-right-after">
<xsl:call-template name="generate-footer">
<xsl:with-param name="align">right</xsl:with-param>
</xsl:call-template>
</fo:static-content>
<!-- flow -->
<fo:flow flow-name="xsl-region-body">
<xsl:call-template name="generate-index"/>
<fo:block id="last"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# call-templates:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<!-- <xsl:template match="concept">
<xsl:apply-templates/>
</xsl:template>-->
<xsl:template match="/dita/concept">
<fo:block>
<xsl:if test="local-name() = '/dita/concept'">
<xsl:element name="fo:marker">
<xsl:element name="marker-class-name">volname</xsl:element>
<xsl:value-of select="title"></xsl:value-of>
</xsl:element></xsl:if>
</fo:block>
</xsl:template>
<!-- # call-template | generate-header -->
<xsl:template name="generate-header">
<xsl:variable name="link">
<xsl:value-of select="parent::*/@id"/>
</xsl:variable>
<fo:table width="210mm" xsl:use-attribute-sets="font10" font-family="{$font-default}">
<fo:table-column column-number="1" column-width="15mm" border-top-style="solid"
border-right-style="solid" border-bottom-style="solid" border-left-style="solid"
border-bottom-width="thin" border-left-width="thin" border-right-width="thin"
border-top-width="thin"/>
<fo:table-column column-number="2" column-width="40mm" border-top-style="solid"
border-right-style="solid" border-bottom-style="solid" border-left-style="solid"
border-bottom-width="thin" border-left-width="thin" border-right-width="thin"
border-top-width="thin"/>
<fo:table-column column-number="3" column-width="80mm" border-top-style="solid"
border-right-style="solid" border-bottom-style="solid" border-left-style="solid"
border-bottom-width="thin" border-left-width="thin" border-right-width="thin"
border-top-width="thin"/>
<fo:table-column column-number="4" column-width="60mm" border-bottom-width="thin"
border-left-width="thin" border-right-width="thin" border-top-width="thin"/>
<fo:table-column column-number="5" column-width="15mm" border-top-style="solid"
border-right-style="solid" border-bottom-style="solid" border-left-style="solid"
border-bottom-width="thin" border-left-width="thin" border-right-width="thin"
border-top-width="thin"/>
<fo:table-row row-number="1" border-top-style="solid" border-right-style="solid"
border-bottom-style="solid" border-left-style="solid" border-bottom-width="thin"
border-left-width="thin" border-right-width="thin" border-top-width="thin"/>
<fo:table-body>
<fo:table-cell padding-left="2mm" padding-top="5mm" column-number="2">
<fo:block>
<fo:external-graphic content-height="15mm" scaling="uniform"
src="{$logo.pic}" text-align="center" content-width="scale-to-fit"/>
</fo:block>
</fo:table-cell>
<fo:table-cell column-number="3" text-align="center">
<fo:block><fo:retrieve-marker retrieve-boundary="page-sequence" retrieve-position="first-starting-within-page" retrieve-class-name="volname"/></fo:block>
<fo:block> </fo:block>
<fo:block><xsl:value-of select="/dita/concept/concept/title"/></fo:block>
<fo:block> </fo:block>
<fo:block><xsl:value-of select="/dita/concept/concept/concept/title"/></fo:block>
<fo:block> </fo:block>
</fo:table-cell>
<fo:table-cell column-number="4">
<fo:table width="60mm" xsl:use-attribute-sets="font10"
font-family="{$font-default}">
<fo:table-column column-number="1" column-width="30mm"
border-left-width="thin" border-top-width="thin"
border-top-style="solid" border-right-width="thin"
border-right-style="solid" border-bottom-width="thin"
border-bottom-style="solid"/>
<fo:table-column column-number="2" column-width="30mm"
border-left-width="thin" border-top-width="thin"
border-top-style="solid" border-right-width="thin"
border-bottom-style="solid" border-bottom-width="thin"
border-left-style="solid"/>
<fo:table-row row-number="1" border-top-style="solid"
border-right-width="thin" border-right-style="solid"
border-bottom-width="thin" border-bottom-style="solid"
border-left-width="thin" border-left-style="solid"/>
<fo:table-row row-number="2" border-top-style="solid"
border-right-width="thin" border-right-style="solid"
border-bottom-width="thin" border-bottom-style="solid"
border-left-width="thin" border-left-style="solid"/>
<fo:table-row row-number="3" border-top-style="solid"
border-right-width="thin" border-right-style="solid"
border-bottom-width="thin" border-bottom-style="solid"
border-left-width="thin" border-left-style="solid"/>
<fo:table-row row-number="4" border-top-style="solid"
border-right-width="thin" border-right-style="solid"
border-bottom-width="thin" border-bottom-style="solid"
border-left-width="thin" border-left-style="solid"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="1" number-columns-spanned="2">
<fo:block> DOC NO.<xsl:value-of select="/dita/concept/@product"/>/1A/TM/<xsl:number count="*[parent::dita]"
level="multiple" format="01"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="1">
<fo:block> Date </fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="2">
<fo:block> 24-APR-2013 </fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="1">
<fo:block> Rev No. </fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="2">
<fo:block> 0 </fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="1">
<fo:block> PAGE NO. </fo:block>
</fo:table-cell>
<fo:table-cell padding-left="2mm" padding-bottom="2mm"
border-bottom-width="thin" border-bottom-style="solid"
column-number="2">
<fo:block> TM-<xsl:number count="*[parent::dita]"
level="multiple" format="01"/>-<xsl:number
level="multiple" format="01"/>-<xsl:number
level="multiple" format="01"/>-<fo:page-number/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
</fo:table-body>
</fo:table>
</xsl:template>
<!-- # call-template | COVER PAGE-->
<xsl:template name="main.page">
<fo:block xsl:use-attribute-sets="font10">
<fo:table table-layout="fixed" margin-top="35mm">
<fo:table-column column-number="1" column-width="50%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell column-number="1" text-align="center"
number-columns-spanned="2">
<fo:block padding-top="10" border-top-style="solid"
border-top-width="thin" border-bottom-style="solid"
border-bottom-width="thin" font-size="30pt" font-weight="bold">
<xsl:value-of select="$dita_topic_title"/>
</fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block> </fo:block>
<fo:block border-top-style="solid" border-top-width="thin"
border-bottom-style="solid" border-bottom-width="thin"
font-size="30pt" font-weight="bold">
<xsl:value-of select="$subtitle"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
</xsl:stylesheet>
I want to have running header.
My xml file looks like this
Code: Select all
<dita><concept><title>volume name</title>
<concept><title>Part Name</title>
<concept><title>chapter name</title>
<concept><title>section name</title>
<concept><title>sub-section 1</title>
<concept><title>sub-section 2</title></concept></concept></concept></concept></concept></concept><dita>
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Header problems when chapters and parts in bookmap
Hi,
This particular forum thread is about making XSLT customizations to the DITA Open Toolkit in order to publish DITA to PDF.
I do not understand exactly what you are doing, are you also using the DITA Open Toolkit to publish DITA content to PDF? You also did not specify what exactly was the problem, the XSL does not produce the output you are expecting or that you do not know how to create headers in XSL-FO.
You seem to have developed a custom XSLT for PDF generation, if you have a specific XSLT or XSL-FO question please try to find a mailing list which deals with XSLT or XSL-FO and ask that question there.
Regards,
Radu
This particular forum thread is about making XSLT customizations to the DITA Open Toolkit in order to publish DITA to PDF.
I do not understand exactly what you are doing, are you also using the DITA Open Toolkit to publish DITA content to PDF? You also did not specify what exactly was the problem, the XSL does not produce the output you are expecting or that you do not know how to create headers in XSL-FO.
You seem to have developed a custom XSLT for PDF generation, if you have a specific XSLT or XSL-FO question please try to find a mailing list which deals with XSLT or XSL-FO and ask that question there.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service