docbook-apps

  • 1.  Strange issue with para customization affecting footnotes

    Posted 10-20-2013 15:38
      |   view attached
    I discovered a nasty side effect of a para customization:

    When copying the d:para template from ./fo/block.xsl to a private
    customization layer, and using that customization file to produce PDF,
    the footnote numbers disappear.

    This behaviour can be exercised using the attached docbook xml and
    corresponding stylesheet. Just uncomment/comment out the d:para template
    to see the effect.

    Any modification based off this template[*] has the same effect and
    makes them unusable.

    I'm baffled. What's going on here?


    Thanks in advance for any help,

    Erik Leunissen.
    --

    [*] I intended to use a modified d:para template to customize the
    vertical spacing before certain paragraphs (those immediately following
    a bridgehead). But since it also removes the footnote numbering, I can't
    use it.

    Attachment(s)

    xml
    para-footnote-issue.xml   1 KB 1 version


  • 2.  Re: [docbook-apps] Strange issue with para customization affecting footnotes

    Posted 10-20-2013 16:08
    On 20/10/13 17:37, Erik Leunissen wrote:
    >
    > I'm baffled. What's going on here?
    >

    It appears that I've let myself be lured into an import precedence
    issue. See:


    http://docbook.10921.n7.nabble.com/RE-docbook-para-customization-affects-footnote-numbers-td3638.html


    The solution offered by that same URL is to use in my customization layer:

    <xsl:template match="para[not(parent::d:footnote)]">
    ...

    I'm happy with this solution, that is, as long as it lasts.

    It seems to me a fragile solution, because it'll make me run into the
    same kind of trouble as soon as any template matching:

    yet-another-element/para

    is added to the stock docbook stylesheets.

    I find it difficult to decide whether it's best to accept this
    fragility, or pursue a more robust solution (which isn't very inefficient).

    Any thought's about that?

    Best regards,

    Erik Leunissen.




  • 3.  Re: [docbook-apps] Strange issue with para customization affecting footnotes

    Posted 10-20-2013 16:51
    On 20/10/13 18:08, Erik Leunissen wrote:
    >
    > I find it difficult to decide whether it's best to accept this
    > fragility, or pursue a more robust solution (which isn't very inefficient).
    >
    > Any thought's about that?
    >

    And that has also been resolved.

    Erik.




  • 4.  Re: [docbook-apps] Strange issue with para customization affecting footnotes

    Posted 10-20-2013 19:36
    On 20.10.2013 18:08, Erik Leunissen wrote:
    > Any thought's about that?

    Not that it would help, but in XSLT 2.0 with <xsl:next-match/> it is
    much easier to handle such situations.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
    ------------------------------------------------------------------
    Bringing you XML Prague conference http://xmlprague.cz
    ------------------------------------------------------------------