[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] sequentially 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
|
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
|