Subject: RE: Current position in WD namespace
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Wed, 3 Jul 2002 11:24:24 +0100
|
>you could use the <eval> tag:
><eval>formatIndex(childNumber(this),"1")</eval> <!-- this create a
numbered
>list -->
although we really shouldnt discuss wd-xsl here.......
...this will not give you the position in the for-each, childNumber()
returns the position of the node within nodes of the same name. So, on
a for-each select="root/*":
<root>
<node>a</node>
<node>b</node>
<other>c</other>
</root>
would give you 1,2,1
whereas xslt's postion() function would give you 1,2,3
cheers
andrew
-----Original Message-----
From: Américo Albuquerque (E-mail)
[mailto:aalbuquerque@xxxxxxxxxxxxxxxx]
Sent: 03 July 2002 11:02
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: Current position in WD namespace
you could use the <eval> tag:
<eval>formatIndex(childNumber(this),"1")</eval> <!-- this create a
numbered
list -->
cheers,
Américo
-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Mike Leahy
Sent: Tuesday, July 02, 2002 9:01 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Current position in WD namespace
In the http://www.w3.org/TR/WD-xsl namespace, is there a way to get the
current position in an xsl:for-each loop? Essentially, I would like to
create a numbered list of the values in a series of "procstep" tags
within
the "metadata/dataqual/lineage" tag in my XML files.
I know this namespace is outdated, but it's what I have to work with for
the
time being.
Any help is appreciated.
Mike
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|