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: sequentially counting in XSL

Subject: Re: sequentially counting in XSL
From: David_Marston@xxxxxxxxx
Date: Thu, 20 Jul 2000 14:15:42 -0400
counting in xslt
Hugo de Groot asks:
>When I want to generate numbered testcases for the methods and
>use <xsl:number value="position()"/>, the testcases are not
>sequentially numbered. I've tried several other possibilities
>like <xsl:number count="MethodDeclaration"/> etc, but I can't
>get it work right.
>Does anyone know the solution?

I think your description was a little too sketchy to permit one
of the readers to provide a full solution. The idea of using
count rather than position is a good one, and I'd encourage you
to try harder in that direction. As an aid, here is a set of
principles I'm refining:

1. Use xsl:number to generate numbering for output, not for
   general counting. (Mnemonic: that's why it's in chapter 7
   of the XSLT spec.)

2. There are well-targeted counting options in xsl:number,
   so try to let it do the work for you. In other words, avoid
   value="position()" and its variants.

2A. Start with just plain <xsl:number>, then tinker with
    count, level, from, value, and format, IN THAT
    ORDER, to get what you need. (All other attributes
    come later, to tweak the appearance.)

3. Ultimately, xsl:number is creating strings.
   (Mnemonic: it can generate "numbers" with more than
   one decimal point, or with other separators.)

(Suggestions for refining these principles are welcome.)
.................David Marston


 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.