Next in thread → Next in month →

Re: [docbook-apps] footnotes in fo/pdf files?

From
Sheldon Plankton <>
Date
2006-07-04T05:08:04+00:00
ID
Thread
Re: [docbook-apps] footnotes in fo/pdf files?
I figured I was using the docbook.xsl file so I changed it to:
/usr/share/sgml/docbook/xsl-stylesheets/fo/footnote.xsl
and still got the same error.  Soooo I took a look at footnote.xsl and changed it like so ...
[root@dell01 fo]# pwd
/usr/share/sgml/docbook/xsl-stylesheets/fo
[root@dell01 fo]# cp footnote.xsl footnote.xsl_orig
[root@dell01 fo]# vim footnote.xsl
[root@dell01 fo]# diff footnote.xsl footnote.xsl_orig
93c93
<                     count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)]"
---
>                     count="footnote[not(@label)][not(ancestor::table) and not(ancestor::informaltable)]|ulink[$ulink.footnotes != 0][node()][@url != .][not(ancestor::footnote)]"
[root@dell01
 fo]#

... and that seems to have fixed my problem 

Thanks!

Bob Stayton <> wrote:     
I still can't duplicate this error.  Can  anyone else?
 
 
 
Something is clearly wrong with the processor,  because the ulink.footnotes parameter is defined on both the command line and in  the stylesheet, so I can't see how the processor could think it was  undefined.
 
 
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting

 
 
 
 
    
----- Original Message ----- 
   
From:    Sheldon Plankton 
   
To: Bob Stayton ; apps docbook 
   
Sent: Sunday, July 02, 2006 8:54 PM
   
Subject: Re: [docbook-apps] footnotes in    fo/pdf files?
   

Do you get the same error when you    process a different file with the same kind of footnote?

Yes I    do. 
 

Here's a footnote tag that works fine if I am producing html    ...

<footnote><para>For information about how to build and    install the    <indexterm><primary>OpenLDAP</primary></indexterm>    software from
source see the documentation provided by <ulink url="http://www.openldap.org/doc/admin23/quickstart.html">OpenLDAP.org</ulink>.</para></footnote>,

But    with pdf I get ...

$ xsltproc --output LDAPBook.fo --stringparam    fop.extensions 1 --stringparam ulink.footnotes 1 --stringparam admon.graphics    1  ./style_pdf.xsl LDAPBook.xml
Making portrait pages on USletter    paper (8.5inx11in)
XPath error : Undefined variable
$ulink.footnotes !=    0
                   
 ^
error: file    /usr/share/sgml/docbook/xsl-stylesheets-1.69.1-5/fo/footnote.xsl line 94    element number
Failed to compile predicate
make: *** [LDAPBook.fo]    Segmentation fault

style_pdf.xsl looks like this ...
$ cat    style_pdf.xsl
<?xml    version='1.0'?>
<xsl:stylesheet
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:fo="http://www.w3.org/1999/XSL/Format"
       version="1.0">

<xsl:import    href="/usr/share/sgml/docbook/xsl-stylesheets-1.69.1-5/fo/docbook.xsl"/>

<xsl:param    name="shade.verbatim"    select="1"></xsl:param>
<xsl:attribute-set    name="shade.verbatim.style">
  <xsl:attribute    name="background-color">#FFFFCC</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set    name="toc.margin.properties">
  <xsl:attribute   
 name="background-color">#EFF8F8</xsl:attribute>
</xsl:attribute-set>
<xsl:param    name="hyphenate">false</xsl:param>
</xsl:stylesheet>

...    is that the problem?  here's the version I am using.

$ xsltproc    -version
Using libxml 20623, libxslt 10115 and libexslt 812
xsltproc was    compiled against libxml 20623, libxslt 10115 and libexslt 812
libxslt 10115    was compiled against libxml 20623
libexslt 812 was compiled against libxml    20623

$ rpm -q -f `which    xsltproc`
libxslt-1.1.15-1.2.1

Thanks for your    reply!

Bob Stayton <> wrote:                   
Hi,
     
I'm not
 able to duplicate this error.  Do      you get the same error when you process a different file with the same kind      of footnote?
     
 
     
What version of xsltproc?
     
 
     
Bob Stayton
Sagehill Enterprises
DocBook      Consulting

     
 
     
 
            
-----        Original Message ----- 
       
From:        Sheldon Plankton 
       
To:        apps docbook 
       
Sent:        Saturday, July 01, 2006 5:54
 PM
       
Subject:        [docbook-apps] footnotes in fo/pdf files?
       

Hi,

I must be doing something wrong when        generating my fo file from my xml file.
My xml file contains        ...

<listitem><para>BLAH BLAH        BLAH
<footnote><para>
YADA YADA        YADA
</para></footnote>
</para></listitem>

...        I can make the html just fine but when I try to make an fo like so        ...

xsltproc --output blah.fo --stringparam fop.extensions 1        --stringparam ulink.footnotes 1        /usr/share/sgml/docbook/xsl-stylesheets-1.69.1-5/fo/docbook.xsl        blah.xml
Making portrait pages on USletter paper (8.5inx11in)
XPath        error : Undefined
 variable
$ulink.footnotes !=        0
                        ^
error: file        /usr/share/sgml/docbook/xsl-stylesheets-1.69.1-5/fo/footnote.xsl line 94        element number
Failed to compile predicate
make: ***        [dvd_ripping_book.fo] Segmentation fault

Without the footnote tag I        am able to produce a fo and pdf no problem.
But why is the footnote tag        giving heart burn?

Thanks
       

              Do you Yahoo!?
Get on board. You're        invited to try the new Yahoo! Mail Beta.
   
__________________________________________________
Do You    Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around    
http://mail.yahoo.com
 

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com
Next in thread → Next in month →