Issue with title page

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with title page

Thomas Trepl
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: [hidden email]
For additional commands, e-mail: [hidden email]

book1.xml (1K) Download Attachment
custom.xsl (746 bytes) Download Attachment
fop.sh (150 bytes) Download Attachment
Makefile (2K) Download Attachment
profile.xsl (2K) Download Attachment
book1.fo (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Oskar Berggren
Here is some documentation about intentional changes to the title formatting:

Is there a possibility that your local default stylesheet file have been modified somehow?

Or is the profiling thing breaking something? What happens if you remove that?



Den ons 20 nov. 2019 kl 23:04 skrev Thomas Trepl <[hidden email]>:
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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Bob Stayton
In reply to this post by Thomas Trepl

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
[hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Oskar Berggren
Haha, I was gonna object and claim I use xsltproc without seeing this problem but luckily I double checked first. I do use xsltproc, and it seems I have this problem too just never realized.

Thanks Bob!

/Oskar


Den tors 21 nov. 2019 kl 00:18 skrev Bob Stayton <[hidden email]>:

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
[hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Daniel So
In reply to this post by Thomas Trepl
For me, this issue (xsl:use-attribute-sets not overridden by subsequent attributes explicitly set) only appears for some versions of xsltproc:

This version, on an EL7 system, works OK:
==
> xsltproc --version
Using libxml 20901, libxslt 10128 and libexslt 817
xsltproc was compiled against libxml 20901, libxslt 10128 and libexslt 817
libxslt 10128 was compiled against libxml 20901
libexslt 817 was compiled against libxml 20901
==

This version, on an EL8 system, has the issue:

==
> xsltproc --version
Using libxml 20907, libxslt 10132 and libexslt 820
xsltproc was compiled against libxml 20907, libxslt 10132 and libexslt 820
libxslt 10132 was compiled against libxml 20907
libexslt 820 was compiled against libxml 20907
==

Perhaps someone who can afford the time to create a more generic, non-FOP example could help file a bug for xsltproc?

Daniel 

Den tors 21 nov. 2019 kl 00:18 skrev Bob Stayton [hidden email]:

> 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 [hidden email]
>
> 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" <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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
-- 
Daniel So
MySQL Documentation Team
Oracle Canada ULC / Markham, ON
MySQL: www.mysql.com
Oracle: www.oracle.com
Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Thomas Trepl
In reply to this post by Thomas Trepl
Hi a,,

thanks to all of you, Bob, Daniel and Oskar!

Indeed, it looks like it is an issue with 'xsltproc'. As adviced, I
tried with saxon6, and et voila, it renders the title page with
expected font sizes (while it is much slower than xsltproc, but thats
another story).

I'll pickup the idea of Daniel and try to figure out with which
version of xsltproc the issue came in in order to file a bug at Gnome
somewhere. Might be difficult to create such a non-FOP example, but
lets see. Nevertheless, I'll file the bug anyway.

Again, thanks to you guys to give me a pointer (to saxon6) :-)

--
Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Thomas Trepl
Am Donnerstag, den 21.11.2019, 19:06 +0100 schrieb Thomas Trepl:
> Hi a,,
>
> thanks to all of you, Bob, Daniel and Oskar!
>
> Indeed, it looks like it is an issue with 'xsltproc'.
> ...
>

Just a follow-up:

I just did some test compiler runs on libxslt and it shows following
picture:

WORKS: 1.1.28
WORKS: 1.1.29
FAIL : 1.1.30
FAIL : 1.1.31
FAIL : 1.1.32
FAIL : 1.1.33
WORKS: 1.1.34

So, there were four releases which did not render correctly. During
the test builds I saw that my machine had still 1.1.33 (same on Arch).
Looks like that the bug has been fixed somehow in 1.1.34 but the
distros did not yet picked it up.

--
Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Issue with title page

Oskar Berggren
Incidentally 1.1.30 changelog contains this:

1.1.30 (release in 2017)
  Fix precedence with multiple attribute sets (Nick Wellnhofer),
  Rework attribute set resolution (Nick Wellnhofer)

Commit

So apparently that broke something now fixed in 1.1.34 apparently:
There is even test cases so hopefully it will last. :)

Now if only BATIK could fix https://issues.apache.org/jira/browse/BATIK-1112 to avoid broken rendering of many Inkscape SVGs I would be happy...



Den tors 21 nov. 2019 kl 19:35 skrev Thomas Trepl <[hidden email]>:
Am Donnerstag, den 21.11.2019, 19:06 +0100 schrieb Thomas Trepl:
> Hi a,,
>
> thanks to all of you, Bob, Daniel and Oskar!
>
> Indeed, it looks like it is an issue with 'xsltproc'.
> ...
>

Just a follow-up:

I just did some test compiler runs on libxslt and it shows following
picture:

WORKS: 1.1.28
WORKS: 1.1.29
FAIL : 1.1.30
FAIL : 1.1.31
FAIL : 1.1.32
FAIL : 1.1.33
WORKS: 1.1.34

So, there were four releases which did not render correctly. During
the test builds I saw that my machine had still 1.1.33 (same on Arch).
Looks like that the bug has been fixed somehow in 1.1.34 but the
distros did not yet picked it up.

--
Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]