Footnotes in standard DocBook HTML transformation

I'have experienced a weird problem with html footnote. I'm using a Mac with Oxygen 14.2 but whenever I try to produce an html file from an xml snippet like this one, (using the standard HTML docbook 5.0 transformation) <para>Il 27 gennaio 1961, al Teatro dell’Opera a Roma, venne proiettato in anteprima un film di produzione privata .... <footnote> <para>Lanocita A. (Lan) 1961, Rassegna cinematografica, «Corriere della Sera», 11 febbraio, 6. </para> </footnote>, commentò il «Corriere della Sera». L’ufficialità della pellicola è confermata dai dubbi insinuati dalla stampa comunista sul finanziamento governativo della pellicola e dalle recensioni elogiative apparse sulla stampa cattolica [Merolla 2004, 131]. <footnote> <para>Centro cattolico cinematografico 1961, Viva l’Italia, «Segnalazioni cinematografiche», 28 (XLIX), gennaio.</para> </footnote>.</para> I obtain a footnote link that doesn't work properly <a href="#ftn.d5e37 <#13df29c8626b3101_ftn.d5e37>" class="footnote"><sup class="footnote"><a name="d5e37"></a>[1]</sup></a> this link refers to <div id="ftn.d5e37" class="footnote"><a href="#d5e37<#13df29c8626b3101_d5e37>" class="para"><sup class="para">[1] </sup></a> that works. I think it is strange that this little bug (the anchor <a name="d5e37"></a> has to be moved out of the nested <a>) is still there. May be I am wrong. What can I do to solve this problem? I have to write a customisation stylesheet or there is something easier to do? Regards Claudio

Hi Claudio, That was a bug that was introduced in DocBook XSL version 1.77.1, which is the version included in Oxygen 14.2. The bug is fixed in DocBook XSL version 1.78.1. This version of the template with match="d:footnote" is from 1.78.1, and if you put in your customization, that should fix the problem until Oxygen gets updated to 1.78.1 <xsl:template match="d:footnote"> <xsl:variable name="name"> <xsl:call-template name="object.id"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> </xsl:variable> <xsl:variable name="href"> <xsl:text>#ftn.</xsl:text> <xsl:value-of select="$name"/> </xsl:variable> <a href="{$href}"> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:if test="$generate.id.attributes = 0"> <xsl:attribute name="name"> <xsl:value-of select="$name"/> </xsl:attribute> </xsl:if> <sup> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:call-template name="id.attribute"> <xsl:with-param name="conditional" select="0"/> </xsl:call-template> <xsl:text>[</xsl:text> <xsl:apply-templates select="." mode="footnote.number"/> <xsl:text>]</xsl:text> </sup> </a> </xsl:template> Bob Stayton Sagehill Enterprises bobs@sagehill.net From: Claudio Tubertini Sent: Wednesday, April 10, 2013 10:44 AM To: oxygen-user@oxygenxml.com Subject: [oXygen-user] Footnotes in standard DocBook HTML transformation I'have experienced a weird problem with html footnote. I'm using a Mac with Oxygen 14.2 but whenever I try to produce an html file from an xml snippet like this one, (using the standard HTML docbook 5.0 transformation) <para>Il 27 gennaio 1961, al Teatro dell’Opera a Roma, venne proiettato in anteprima un film di produzione privata .... <footnote> <para>Lanocita A. (Lan) 1961, Rassegna cinematografica, «Corriere della Sera», 11 febbraio, 6.</para> </footnote>, commentò il «Corriere della Sera». L’ufficialità della pellicola è confermata dai dubbi insinuati dalla stampa comunista sul finanziamento governativo della pellicola e dalle recensioni elogiative apparse sulla stampa cattolica [Merolla 2004, 131]. <footnote> <para>Centro cattolico cinematografico 1961, Viva l’Italia, «Segnalazioni cinematografiche», 28 (XLIX), gennaio.</para> </footnote>.</para> I obtain a footnote link that doesn't work properly <a href="#ftn.d5e37" class="footnote"><sup class="footnote"><a name="d5e37"></a>[1]</sup></a> this link refers to <div id="ftn.d5e37" class="footnote"><a href="#d5e37" class="para"><sup class="para">[1] </sup></a> that works. I think it is strange that this little bug (the anchor <a name="d5e37"></a> has to be moved out of the nested <a>) is still there. May be I am wrong. What can I do to solve this problem? I have to write a customisation stylesheet or there is something easier to do? Regards Claudio _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (2)
-
Bob Stayton
-
Claudio Tubertini