docbook-apps

  • 1.  footnote/para/programlisting -> invalid XHTML

    Posted 06-07-2009 18:21
    Hi,

    Don't really know what to do with this so I'll post it here.
    Please bear with me.

    I have a problem with how the XSL stylesheets (nwalsh) transform
    footnote/para/programlisting to XHTML.
    xsltproc, make.valid.html=1, html.cleanup=1
    Output:

    ...


     inside 

    is invalid XHTML.

    I fixed it by modifying the template which matches
    "footnote/para[1]|footnote/simpara[1]" (in footnote.xsl) to call
    the "paragraph" template (in block.xsl) which then calls "unwrap.p"
    -- just as the template which matches "para" (in block.xsl) does.


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


    <xsl:variable name="name">
    <xsl:text>ftn.</xsl:text>
    <xsl:call-template name="object.id">
    <xsl:with-param name="object" select="ancestor::footnote"/>
    </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="href">
    <xsl:text>#</xsl:text>
    <xsl:call-template name="object.id">
    <xsl:with-param name="object" select="ancestor::footnote"/>
    </xsl:call-template>
    </xsl:variable>




    <xsl:call-template name="paragraph">
    <xsl:with-param name="class">
    <xsl:if test="@role and $para.propagates.style != 0">
    <xsl:value-of select="@role"/>
    </xsl:if>
    </xsl:with-param>

    <xsl:with-param name="content">

    <xsl:text>[</xsl:text>

    <xsl:apply-templates select="." mode="class.attribute"/>
    <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>

    <xsl:text>] </xsl:text>

    <xsl:apply-templates/>
    </xsl:with-param>

    </xsl:call-template>

    </xsl:template>


    Philipp Kempgen
    --
    AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
    Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
    Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
    Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de
    --



  • 2.  Re: [docbook-apps] footnote/para/programlisting -> invalid XHTML

    Posted 06-07-2009 19:30
    On Sun, Jun 7, 2009 at 11:20 AM, Philipp
    Kempgen<philipp.kempgen@amooma.de> wrote:
    > Don't really know what to do with this so I'll post it here.
    > Please bear with me.

    Thanks for the bug report. Formally,
    http://sourceforge.net/tracker/?atid=373747&group_id=21935&func=browse
    is the bug tracker.

    > I have a problem with how the XSL stylesheets (nwalsh) transform
    > footnote/para/programlisting to XHTML.

    Which version of the stylesheets are you using? 1.74.3? 1.75.1?

    > xsltproc, make.valid.html=1, html.cleanup=1

    Are you using the xhtml/ or xhtml-1_1/ targets or html/?

    > Output:
    >    

    ...


    >
     inside 

    is invalid XHTML.

    Would you mind including the DocBook that generated that XHTML?

    > I fixed it by modifying the template which matches
    > "footnote/para[1]|footnote/simpara[1]" (in footnote.xsl) to call
    > the "paragraph" template (in block.xsl) which then calls "unwrap.p"
    > -- just as the template which matches "para" (in block.xsl) does.

    Are you familiar with the diff command? That might be a clearer way to
    specify your changes.

    $ cp footnote.xsl footnote.before.xsl
    # Make your edits to footenote.xsl
    $ diff footnote.before.xsl footnote.xsl



    Thanks,
    Keith



  • 3.  Re: [docbook-apps] footnote/para/programlisting -> invalid XHTML

    Posted 06-09-2009 19:56
    Keith Fahlgren schrieb:
    > On Sun, Jun 7, 2009 at 11:20 AM, Philipp
    > Kempgen<philipp.kempgen@amooma.de> wrote:
    >> Don't really know what to do with this so I'll post it here.
    >> Please bear with me.
    >
    > Thanks for the bug report. Formally,
    > http://sourceforge.net/tracker/?atid=373747&group_id=21935&func=browse
    > is the bug tracker.

    Ok, I have reported a bug:
    https://sourceforge.net/tracker/?func=detail&aid=2803739&group_id=21935&atid=373747

    > Which version of the stylesheets are you using? 1.74.3? 1.75.1?

    1.75.1

    > Are you using the xhtml/ or xhtml-1_1/ targets or html/?

    xhtml

    > Would you mind including the DocBook that generated that XHTML?

    I have attached a test case.

    >> I fixed it by modifying the template which matches
    >> "footnote/para[1]|footnote/simpara[1]" (in footnote.xsl) to call
    >> the "paragraph" template (in block.xsl) which then calls "unwrap.p"
    >> -- just as the template which matches "para" (in block.xsl) does.
    >
    > Are you familiar with the diff command?

    Sure. I have attached a patch to the bug report.


    Philipp Kempgen
    --
    AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de
    Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
    Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
    Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de
    --