Hello,
By using "flow", you effectively remove the element from the normal flow and you are moving it into a static part of the page. See:
http://www.princexml.com/doc/8.1/proper ... ince-flow/
http://www.princexml.com/doc/8.1/page-headers-footers/
So you are moving the entire bookmap into the top of the page (*[class ~= "map/map"][title] matches possibly the entire map), which is not ok.
I recommend generating a new XML element that contains the title that can be moved to the page header. In the stylesheet:
frameworks/dita/DITA-OT/plugins/com.oxygenxml.pdf.css/
post-process.xsl
You should modify the template that generates the
<oxy:front-page> element and generate another element before it, let's name it
<oxy:title-to-move-to-headers>. This contains the book title text:
Code: Select all
<!--
Create a title page
-->
<xsl:template match="*[contains(@class, ' map/map ')]">
<xsl:copy>
<xsl:copy-of select="@*"/>
<!-- INSERT THIS -->
<oxy:title-to-move-to-headers>
<xsl:choose>
<xsl:when test="@title">
<xsl:value-of select="@title"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates
select="opentopic:map/*[contains(@class, ' topic/title ')]"/>
</xsl:otherwise>
</xsl:choose>
</oxy:title-to-move-to-headers>
<!-- END INSERT -->
<oxy:front-page>
<oxy:front-page-title>
<xsl:choose>
Then modify the CSS:
frameworks\dita\css\print\p-page-titles-and-numbers.css to have this content:
Code: Select all
@media print {
title-to-move-to-headers {
flow: static(th);
}
@page :left {
@top-left {
content:flow(th);
}
}
@page :right{
@top-right {
content:flow(th);
}
}
}
Please note that there are similar files in the DITA-OT installations, but these are used only when running the DITA-OT transformations from the command line, not from oXygen.
frameworks\dita\DITA-OT\plugins\com.oxygenxml.pdf.css\css\print\p-page-titles-and-numbers.css
frameworks\dita\DITA-OT2x\plugins\com.oxygenxml.pdf.css\css\print\p-page-titles-and-numbers.css
As a general rule, when testing CSS extensions, try with very small documents, not necessarily related to DITA.
Cheers,
Dan