Re: [docbook-apps] footnote numbering is suppressedThis is one of the gotchas 
of XSL import precedence.  This template in fo/footnote.xsl:

<xsl:template match="footnote/para[1]
                     |footnote/simpara[1]
                     |footnote/formalpara[1]"
              priority="2">

which generates the superscript in the para fo:block is being overridden by 
your customization of para.  A template match with a higher import precedence 
will always be used before a template of lower import precedence, even if  that 
has a better match and higher priority.  So you need to copy this template to 
your customization layer to raise its import precedence, or change your match 
attribute in your customization to exclude footnote parents:

match="para[not(parent::footnote)]"

Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]


  ----- Original Message ----- 
  From: Ron Catterall 
  To: Ron Catterall 
  Cc: [email protected] 
  Sent: Friday, March 09, 2007 8:26 AM
  Subject: Re: [docbook-apps] footnote numbering is suppressed


  I found where it's going wrong, but why???


  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
  <book><title>A Book Title</title>
  <chapter><title>A Chapter Title</title>
  <para>some text in a para<footnote><para>this is a footnote</para></footnote> 
more text in a para</para>
  </chapter>
  </book>

  Without any customization the footnote is numbered correctly, both in the 
text and below at the bottom of the page in the footnote.
  When I add the following customization, the numbering is correct in the text, 
but disappears in the footnote itself.


  <?xsl version="1.0" ?>
  <xsl:stylesheet
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
        xmlns:fo="http://www.w3.org/1999/XSL/Format"; >
  <xsl:import 
href="/Applications/Utilities/oxygen/8.1/oxygen/frameworks/docbook/xsl/fo/docbook.xsl"
 />
  <xsl:template match="para">
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
   <xsl:attribute name="font-size">
     <xsl:choose>
       <xsl:when test="@size = 'Less'">85%</xsl:when>
       <xsl:when test="@size = 'Small'">75%</xsl:when>
       <xsl:when test="@size = 'Smaller'">65%</xsl:when>
       <xsl:otherwise>100%</xsl:otherwise>
     </xsl:choose>
   </xsl:attribute>
   <xsl:attribute name="text-align">
     <xsl:choose>
       <xsl:when test="@role = 'Start'">start</xsl:when>
       <xsl:when test="@role = 'Center'">center</xsl:when>
       <xsl:otherwise>start</xsl:otherwise>
     </xsl:choose>
   </xsl:attribute>
      <xsl:call-template name="anchor"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  </xsl:stylesheet>

  If I make the footnote a <simpara>, I get the same problem if the 
customization layer contains this which is a unchanged copy from the Docbook 
XSL stylesheet.


  <xsl:template match="simpara">
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
      <xsl:if test="@id">
        <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
      </xsl:if>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>


  Can anyone explain what I'm doing wrong, and what is going on.


    I find that footnotes are numbered in the body of the text, but the 
footnotes at the bottom of the page are not numbered.  The only footnote 
related content in my customization layer is:


    <xsl:param name="footnote.font.size" select="'85%'" />
    <xsl:param name="footnote.number.format" select="'1'" />


    MacOS 10.3.9, Docbook 4.5, Saxon 6.5.5, XSL style sheets 1.70.1, XEP 4.9, 
using Oxygen 8.1


    All suggestions welcome
    --
    Ron Catterall, Phd, DSc                         email: [EMAIL PROTECTED]
    Prolongacion de Hidalgo 140                             
http://catterall.net/
    San Felipe del Agua                                        tel: +52 951 520 
1821
    Oaxaca      68020  Mexico                          fax: +1 530 348 8309
    --------------------------------------------------------------------- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
PROTECTED]




-- 
Ron Catterall, Phd, DSc                         email: [EMAIL PROTECTED]
  Prolongacion de Hidalgo 140                             http://catterall.net/
  San Felipe del Agua                                        tel: +52 951 520 
1821
  Oaxaca      68020  Mexico                          fax: +1 530 348 8309
  --------------------------------------------------------------------- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
PROTECTED] 

Reply via email to