Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Populate XML & change attribute Populate XML & change attributeTo: NULL Date: 6/2/2005 6:38:00 AM I have a simple XML like this one:
<a name="a">
<b>
<c>
1
</c>
</b>
<b>
<c>
2
</c>
</b>
</a>
I want to populate it and change the "name" attribute to achieve this:
<a name="a_1">
<b>
<c>
1
</c>
</b>
<b>
<c>
2
</c>
</b>
</a>
<a name="a_2">
<b>
<c>
1
</c>
</b>
<b>
<c>
2
</c>
</b>
</a>
The code to populate is quite simple:
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="a/b/c">
<xsl:copy-of select="/*"/>
</xsl:template>
...but how can I change the "name" attr. in the meanwhile ?
TIA
Gabor
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
