RE: automatic generation of figure numbers

Subject: RE: automatic generation of figure numbers
From: "Cline, Ken" <kcline@xxxxxxxx>
Date: Wed, 4 Oct 2000 12:02:54 -0400
If I understand your situation, you're trying to DEFINE a figure using the
<figure> element and also to REFERENCE a figure using the same <figure>
element.  If this is true, you're going to have a rough time solving your
problem.  

To refer to a figure that you've DEFINED with a <figure> element, you should
use a different element type (something like <figurereference>) You would
then have some hope of making it work.

KLC
----------------------
My problem is that I may have more than I references to the same figure.
i.e. lets say I want have "Figure 1" more than once in the document. I use
<figure file="pic.gif"> Figure </figure> for the first occurence of Figure 1
and the XSL code generates the output "Figure 1". I then subsequently have
several <figure> elements for different figures and XSL accordingly assigns
a number for each <figure> element, e.g. "Figure 2", "Figure 3" etc. Then I
feel the need to refer back to "Figure 1". This is what is causing a
problem. How do I tell XSL to stop counting at this point and assign the
same figure number as for "Figure 1". One solution was that every time XSL
sees the <figure> element, it compares the attribute "file" of the current
<figure> element to the "file" attribute of all the previous <figure>
elements.  If it finds any match (which it will if the same figure is being
referenced again), it should stop the count and assign the same number to
this element.


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


Current Thread