ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Restarting the numbering sequence of a fo:list-blo

Subject: Re: Restarting the numbering sequence of a fo:list-block
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Feb 2002 10:16:03 +0000
xsl fo list numbering
Hi Gary,

> For the life of me I cannot figure out how to restart the numbering
> sequence of a fo:list-block without using the "from" attribute of
> xsl:number element. I don't want to use the "from" attribute because
> it seems to be selection criteria oriented which for me doesn't
> really pertain. I've searched the FAQs, 3 different books,
> tutorials, through the W3C specs, all to no avail.

By default, xsl:number should give you the number of the current
element within the list of its siblings that have the same type and
name. So if your source is:

  <list>
    <item>entry 1</item>
    <item>entry 2</item>
  </list>
  <list>
    <item>entry 1</item>
    <item>entry 2</item>
  </list>

Then you should be able to do:

  <xsl:for-each select="list">
    <fo:list-block>
      <xsl:for-each select="item">
        <fo:list-item>
          <fo:list-item-label>
            <xsl:number format="1." />
          </fo:list-item-label>
          <fo:list-item-body>
            <xsl:value-of select="." />
          </fo:list-item-body>
        </fo:list-item>
      </xsl:for-each>
    </fo:list-block>
  </xsl:for-each>

If that's approximately what you're doing and it isn't working, then
please post again, this time with the source XML for the lists and the
XSLT code that you're using, and we should be able to help.

[BTW, since the numbers are being supplied by XSLT, it shouldn't make
any difference what XSL-FO processor you're using (though it might
make a difference what XSLT processor you're using).]

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.