Hi Thomas,

This appears to be a problem with xsltproc.  When I process your files with xsltproc, I get 12pt.  When I process your files with Saxon 6.5, I get 24.8832pt for the title.

The DocBook XSL template that is not being handled properly by xsltproc is this one from fo/titlepage.templates.xsl:

<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
  <fo:block xsl:use-attribute-sets="book.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
    <xsl:call-template name="division.title">
      <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
    </xsl:call-template>
  </fo:block>
</xsl:template>

The properties on fo:block start with the attribute-set named "book.titlepage.recto.style", which is defined in fo/titlepage.xsl.  That's where the 12pt font-size is specified.

But the fo:block also has an explicit font-size="24.8832pt" which comes from the titlepage.templates.xml specification XML file for titles and is compiled into the stylesheet module titlepage.templates.xsl.  According to the XSL spec, an explicit property should override a property in an attribute-set.  But xsltproc fails to do that.  The Saxon 6.5 processor handles this correctly.

The workaround for you is either to switch to Saxon 6.5, or to modify that attribute-set in your customization layer:

<xsl:attribute-set name="book.titlepage.recto.style">
  <xsl:attribute name="font-size">24pt</xsl:attribute>
</xsl:attribute-set>

That attribute-set was created a long time ago, and I would consider it obsolete because all of its properties should be overridden by the explicit properties set by titlepage.templates.xsl.  However, it is affecting your output because xsltproc does not handle the override properly.

Bob Stayton
b...@sagehill.net

On 11/20/2019 3:04 PM, Thomas Trepl wrote:
Hi,

I'm unable to change the font size of title page element. What ever I
try to do, title/subtitle gets formatted with 12pt font size.

I run the build by using (the attached) Makefile which calls xsltproc,
xmllint and finally fop to produce the PDF (and RTF) output.

Here is what the FO file looks like:
...
     <fo:flow flow-name="xsl-region-body">
       <fo:block id="idm45517912259648">
         <fo:block>
           <fo:block>

             <!-- HERE IS THE TITLE -->
             <fo:block text-align="center" font-size="12pt" space-
before="18.6624pt" font-weight="bold" font-family="sans-
serif,Symbol,ZapfDingbats">
               <fo:block xmlns:axf="
http://www.antennahouse.com/names/XSL/Extensions"; keep-with-
next.within-column="always" hyphenate="false">MyBook</fo:block>
             </fo:block>

             <!-- HERE IS THE SUBTITLE -->
             <fo:block text-align="center" font-size="12pt" space-
before="15.552pt" font-family="sans-serif,Symbol,ZapfDingbats" font-
weight="bold">Subtitle</fo:block>
             <fo:block space-before="2in" font-family="sans-
serif,Symbol,ZapfDingbats" font-weight="bold" font-size="12pt" text-
align="center">
               <fo:block>
                 <fo:block>Thomas Trepl</fo:block>
               </fo:block>
             </fo:block>
           </fo:block>
...

I have no idea where the "12pt" for title and subtitle come from.
Shouldn't it be something like 24.8832pt or such by default?

Any ideas what else i can check?  And sorry for bugging you since this
isn't really a fop-issue but more a docbook-stylesheet thing but i
don't know where to go so i hope you might have seen that already and
know a solution.

System:         ArchLinux
Docbook-XSL:    1.79.2

Thanks,

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to