|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] position() returns what?
ksI want to iterate through a list of elements and bewteen these elements
put a link that indicates where in the xml-document we are.
For instance I want to transform: <page> <part name="title-1" text="This is the text"></part> <part name="title-2" text="This is the text of the second part"></part> </page> Into something like: <html><body> <a href="editPart.action?number=0">Edit</a> <h2>title-1</h2> This is the text .... My problem is how do I get the position / index of the part I'm transforming. I tryed with: <xsl:template match="part">
<xsl:value-of select="position()"/>But this outputs equal numbers: 2,4,6,8,10,... I did expect that it would output 0,1,2,3,4,5 I'm sure this comes down to the fact that I lack some background information, but I have a hard time finding that. What I'm looking for is a JavaDoc alike information preferably with good examples. Thanks
The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: hat@xxxxxxxxx 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
|

Cart








