|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: automatic generation of figure numbers
Dhruv Raheja writes:
> The first 3 instances have unique/different "file" values, which means that
> they point to different image files. However the 4th instance has the same
> value for the "file" attribute as the 1st instance. This measn that
> somewhere in the document I feel the need to refer to "Figure 1" again ,
> i.e. I may have multiple occurences of "Figure 1" in the document.
I am afraid my reaction is "I would not start from here". I would
assign a unique ID to each real <figure>, and if I wanted to refer
again to Figure 1, I'd use a new element <figureref id="whatever"/>,
which matched <figure id="whatever">. Then
<xsl:template match="figureref">
<a href="{id(@idref)/@file}">
Figure <xsl:apply-templates select="id(idref)" mode="xref"/>
</a>
</xsl:template>
<xsl:template match="figure" mode="xref">
<xsl:number level="any">
</xsl:template>
use the power of XSLT & XPATH.....
Sebastian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








