This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Indexing in xsl
- From: "Bharathy Itnal" <bharathy_itnal at infy dot com>
- To: <XSL-List at lists dot mulberrytech dot com>
- Date: Thu, 21 Feb 2002 18:49:46 +0530
- Subject: [xsl] Indexing in xsl
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I wanted to know how (if) we can do indexing on a element name
I have a input xml:
<orders>
<order id="1">
<order id="2">
<order id="3">
<order id="4">
.
<orders>
which has to be converted to
<orders order1-id="1" order2-id="2" order2-id="3" order2-id="4" />
Is this right?
<xsl:attribute name="{concat(local-name(), 'var', '-','id')}">
<xsl:value-of select="@id"/>
</xsl:attribute>
How do I change the val of 'var'
Any pointers on this?
Thanks,
~Bharathy
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list