Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - xslt / x-path problem >Thread Next - Re: xslt / x-path problem Re: xslt / x-path problemTo: NULL Date: 9/4/2005 12:01:00 PM Hallo Bart,
Tempore 13:44:57, die Sunday 04 September 2005 AD, hinc in foro {comp.text.xml} scripsit Bart <orion_@p...>:
> I'm trying to transform an xml file to another xml file by using xslt.
> for every child node, i need to do some transformations, except for the
> first one, so I can't use a for-each construction.
> Does anyone now the correct x-path expression or another way to work around
> this problem?
The problem could be solved with this:
<xsl:for-each select="child[position() > 1]" />
or you could use the push style:
Instead of using for-each, you would then use templates.
<xsl:template match="child">
Some transformation
</xsl:template>
<xsl:template match="root/child[1]"/>
The last template would make sure that the first child is ignored.
regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Deserta faciunt et innovationem appelant
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
