|
Subject: Re: [xsl] incrementing a counter in XSL From: Greg Faron <gfaron@xxxxxxxxxxxxxxxxxx> Date: Thu, 18 Apr 2002 13:12:49 -0600 |
I am selecting some nodes from an XML doc with an if statment in a for-each
loop. Out of the set of nodes I am looping through, I am only selecting
some in the if statment. Each of these nodes that is selected by the if
statement needs a sequence number. Originally I was using :
<xsl:for-each select="Contract/TermRdr">
<xsl:if test="StatusCd='A' or StatusCd='F'">
<SequenceNum fieldType="Short" elementType="field">
<xsl:number value ="position()"/>
</SequenceNum>
....
</xsl:if>
</xsl:for-each>
<xsl:for-each select="Contract/TermRdr[StatusCd='A' or StatusCd='F']">
<SequenceNum fieldType="Short" elementType="field">
<xsl:number value ="position()"/>
</SequenceNum>
....
</xsl:for-each>
Greg Faron Integre Technical Publishing Co.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] incrementing a counter in XSL, becky . foley | Thread | Re: [xsl] incrementing a counter in, Wendell Piez |
| [xsl] status list problem, Ahmad J Reeves | Date | [xsl] Evaluating a node-set with se, Dyck, Stan |
| Month |