xsl-list
[Top] [All Lists]

RE: Finding and promoting footnotes

2005-12-01 01:54:26

Jarno

Hi,=20
<xsl:if test="*/A[(_at_)ID={$fid}]">

This should throw an error. I think your intention is

  <xsl:if test="*/A[(_at_)ID=$fid]">

That's what I started with and it too threw an error. But reverting to it
knowing that it was the valid test to use I spotted what my error was: the
<xsl:variable name="fid"> was being instantiated in the 
A[(_at_)class='footnote']
template and then I was testing it in the FOOTNOTES template.

I had assumed that this variable would remain accessible while I called
<xsl:apply-templates select="/XML/FOOTNOTES"> within the A template. Not so,
but when I passed the value of $fid through as a parameter it worked
perfectly.

Thanks to those who replied with solutions using keys. I think I understand
how these would operate, but (like my original xsl) they make an assumption
which is not valid, namely that we know in advance exactly what entities are
defined inside the footnotes. But we don't (unfortunately my example gave
the wrong impression, sorry):

The XML file ends
---------------
<FOOTNOTES>
  <FOOTNOTE>
    <something><A id="..."/>text</something>
  </FOOTNOTE>
  <FOOTNOTE>
    <something><A id="..."/>text</something>
  </FOOTNOTE>
  ...
</FOOTNOTES>
---------------

where <something> may be <TableFootnote>, <FootnoteA>, <TableNote>, or any
of a zillion other variations on the same theme.

Cheers
Trevor


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>