need to generate some numbers using loop, the number of times condition met
posted 7 years ago
In my xslt there is one condition with TAG called NO (generates some number everytime) <xsl:element name="SCHEDULE_ELEMENT"> <xsl:variable name="preceding_element" select="preceding-sibling::SCHEDULE_ELEMENT"/> <xsl:element name="NO"> <xsl:value-of select="NO"/> </xsl:element>
But the number in xml comes very random like 1 1 3 1 5 or anything now i need to generate a list of numbers,in creasing order from 1 to any (may be using for loop) the number of times this condition met. It can be any number of times.
and if it gets stored anywhere (in kind of buffer or so) the time NO tag ends it should go back to 0 or 1, so that for next xml, it won't create anything starting from, except 0 or 1.