Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Finding and promoting footnotes

From: "Trevor Nicholls" <trevor@------------------>
To:
Date: 12/1/2005 8:55:00 AM
Jarno

> Hi,=20
> > <xsl:if test="*/A[@ID={$fid}]">
> 
> This should throw an error. I think your intention is
> 
>   <xsl:if test="*/A[@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[@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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent