This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xrefs (count,preceding,keys,node-set)



Hi all,

With xml data like this:

<xref id="link1"/>
.......
<figure id="link1"/>

I need to tie the two together based on the @id.  The xref needs to take the
number given to its corresponding figure based on its position within all
the figure's [ie. count(preceding::figure|.)]

How do find I the correct number when I am processing the xref element?

This kind of linking has to be done several times in each file and really
could do with being as fast as possible - is there a better way of doing
this using keys, or by building a name-value node-set and using the node-set
extention?


example data

<root>
  <xref id="foo"/>
  <xref id="bar"/>
  <figure id="foo"/>
  <figure id="bar"/>
</root>

example required output

<a href="#fig1">Fig 1</a>
<a href="#fig2">Fig 2</a>
<a name="fig1">Figure 1</a>
<a name="fig2">Figure 2</a>


cheers
andrew

************************************************************************
*<a href="http://www.thebristoldirectory.com"; >The Bristol Directory</a>*
************************************************************************

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.338 / Virus Database: 189 - Release Date: 14/03/2002



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]