From: <dc...@us...> - 2008-09-15 12:17:27
|
Revision: 8125 http://docbook.svn.sourceforge.net/docbook/?rev=8125&view=rev Author: dcramer Date: 2008-09-15 19:17:18 +0000 (Mon, 15 Sep 2008) Log Message: ----------- Added a check to confirm that a footnoteref's linkend points to a footnote. Stylesheets stop processing if not and provide a useful error message. Modified Paths: -------------- trunk/xsl/fo/footnote.xsl Modified: trunk/xsl/fo/footnote.xsl =================================================================== --- trunk/xsl/fo/footnote.xsl 2008-09-15 19:14:07 UTC (rev 8124) +++ trunk/xsl/fo/footnote.xsl 2008-09-15 19:17:18 UTC (rev 8125) @@ -59,6 +59,16 @@ <xsl:template match="footnoteref"> <xsl:variable name="footnote" select="key('id',@linkend)"/> + + <xsl:if test="not(local-name($footnote) = 'footnote')"> + <xsl:message terminate="yes"> +ERROR: A footnoteref element has a linkend that points to an element that is not a footnote. +Typically this happens when an id attribute is accidentally applied to the child of a footnote element. +target element: <xsl:value-of select="local-name($footnote)"/> +linkend/id: <xsl:value-of select="@linkend"/> + </xsl:message> + </xsl:if> + <xsl:call-template name="format.footnote.mark"> <xsl:with-param name="mark"> <xsl:apply-templates select="$footnote" mode="footnote.number"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |