[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Finding and promoting footnotes

Subject: RE: Finding and promoting footnotes
From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx>
Date: Thu, 1 Dec 2005 21:54:26 +1300
footnote template
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.