]> granicus.if.org Git - docbook-dsssl/commitdiff
Added a check to confirm that a footnoteref's linkend points to a footnote. Styleshee...
authorDavid Cramer <david@thingbag.net>
Mon, 15 Sep 2008 19:17:18 +0000 (19:17 +0000)
committerDavid Cramer <david@thingbag.net>
Mon, 15 Sep 2008 19:17:18 +0000 (19:17 +0000)
xsl/fo/footnote.xsl

index ff4beb09eb442752b40c626f01212e36f3cc01f1..42768faa468c014561c2bc9d6729b359cc881476 100644 (file)
 
 <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"/>