W3C home > Mailing lists > Public > xsl-editors@w3.org > July to September 1998

[2.7.8] Count property

From: G. Ken Holman <gkholman@CanadaMail.com>
Date: Sat, 12 Sep 1998 08:10:54 -0400
Message-Id: <Version.32.19980912080515.00f96480@CraneSoftwrights.com>
Message-Id: <Version.32.19980912080515.00f96480@CraneSoftwrights.com>
To: XSL Editors <xsl-editors@w3.org>
[2.7.8] Count property 

Instead of:

<xsl:template match='chapter/title'>
    <fo:block quadding='center' font-size='25pt'>
        <xsl:text>Chapter </xsl:text>
        <xsl:number count="chapter"/>
        <xsl:text>: </xsl:text>
        <xsl:process-children/>
    </fo:block>
</xsl:template>

Could the count property be changed to accept a RelativeAnchor?:

<xsl:template match='chapter/title'>
    <fo:block quadding='center' font-size='25pt'>
        <xsl:text>Chapter </xsl:text>
        <xsl:number count=".."/><!-- count the relative location of parent -->
        <xsl:text>: </xsl:text>
        <xsl:process-children/>
    </fo:block>
</xsl:template>

............... Ken


--
G. Ken Holman               mailto:gkholman@CanadaMail.com
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com/s/
Box 266,                                V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0            F: +1(613)489-0995
Training:   http://www.CraneSoftwrights.com/s/schedule.htm
Resources: http://www.CraneSoftwrights.com/s/resources.htm
Shareware: http://www.CraneSoftwrights.com/s/shareware.htm
Received on Saturday, 12 September 1998 08:51:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:49 GMT