Thanks for info but it is not a simple xml file. It is a big xml file with lot of elements. I have tried the above sample, but it is not resulting the desired output.
the problem lies in the <template>'s match attribute. if you want to filter it from a more complex xml you'll probably need to copy the xml but those elements and insert the corrected elements.
some general code for xsl copy you'll find here in some of the threads (I'll look up some of them later). the principle is something like
- <xsl:template match="node() | @*">
-
<xsl:copy select="."/>
-
</xsl:template>
of cause this is without filter.
- <xsl:template match="node()[not(ital)]">
-
// ...
-
// add attribute copy
this will exclude any elements with a <ital> child element from copying, now insert the just excluded elements
- <xsl:template match="node()[ital]">
-
// code similar to the already posted
note: this is a rough sketch of what I would do, still need to look up the exact code.
regards