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

sequentially counting in XSL

Subject: sequentially counting in XSL
From: "Hugo de Groot" <H.de.Groot@xxxxxxxxx>
Date: Thu, 20 Jul 2000 16:58:07 +0200
counting in xsl
Hi,

It's been a while since I started using XSL - at this moment I have written a tool that scans Java source files, transforms them into XML, performs operations on them and then transforms the output back into Java code (automatically pretty-printed) using XSL stylesheets.

I encountered a (small?) problem can be explained with the following piece of XML:

<UnmodifiedClassDeclaration>
   <FieldDeclaration/>
   <MethodDeclaration/>
   <ConstructorDeclaration/>
   <MethodDeclaration/>
</UnmodifiedClassDeclaration>

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?

It would be nice if XSL had a function like "iterator()" that is set to 1 when an XSL sheet is loaded and each time it's called it returns its value, after which it is immediately incremented by 1.

Besides, I noticed that the Oracle XSL processor counts empty elements as if there were two - a start and an end element. This is not the case with the XSL editor of IBM.

Hugo De Groot
X punt X b.v. IT Services



 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.