[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Numbering cross refs
I'm trying to get my xrefs to work, maybe I'm going about this the wrong way, can you help? I've tried various methods found on the internet and books with incorrect results. I'm pretty new at this so I'm sure it's just something I'm doing wrong. What I want is to have the actual figure number which is generated to appear beside the word Fig. As in: "See Fig. 3 for details." I also want to do this for tables and steps so I will add a test for the xreftype later if I can get this to work. The xml looks like : <figure id="figure-2"> <title>This is a figure title 2</title> <graphic boardno="picture.eps"></graphic> </figure> PLEASE SEE <xref xrefid="figure-1" xidtype="figure"></xref>, <xref xrefid="figure-2" xidtype="figure"></xref>, and <xref xrefid="figure-3" xidtype="figure"></xref> for details. The result of this ends up " PLEASE SEE Fig. 2, Fig 2, and Fig 2 for details." What I have now numbers fig xrefs before the figures "0" after figure 1 it numbers the xrefs "1", and after figure 2 it numbers the xrefs "2". This is what I have right now in my FO. <xsl:template match="xref"> <fo:basic-link background-color="lightblue" internal-destination="{@xrefid}"> <xsl:text>Fig. </xsl:text> <xsl:number count="figure" level="any" from="mainfunc" format="1 "/> <xsl:apply-templates/> </xsl:template> Here is snipet of format for figure template <xsl:template match="figure"> <fo:block text-align="center" font-style="italic" keep-together.within-page="always"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="graphic"> <fo:wrapper keep-together.within-page="always"> <fo:external-graphic src="{@boardno}"/> <fo:block space-after="5mm" id="{generate-id(.)}"> <xsl:text>Fig </xsl:text> <xsl:number count="figure" level="any" from="mainfunc" format="1 "/> <xsl:value-of select="preceding-sibling::title"/> <xsl:if test="preceding-sibling::sheet"> <xsl:text> Sheet </xsl:text> <xsl:number count="sheet" level="any" from="figure" format="1 "/> <xsl:text> of </xsl:text> <xsl:value-of select="preceding-sibling::sheet/@total"/> </xsl:if> <xsl:apply-templates/> </fo:block> </fo:wrapper> </xsl:template> Any suggestions would be appreciated. Thanks - end Confidentiality Notice The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited. 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
|