Hello, is it possible to skip over nodes while processing a xml file. for example say i have the following xml code
<mycase desc="">
<caseid> id_1234 </caseid>
<serid ref=""/>
......
......
......
</mycase>
and I want to make it look like this
<mycase desc="" caseid="id_1234">
.....
.....
</mycase>
currently I'm doing this
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0" exclude-result-prefixes="xs xdt err fn"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"
xmlns:err="http://www.w3.org/2005/xqt-errors">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="mycase">
<xsl:element name="mycase">
<xsl:attribute name="desc"/>
<xsl:attribute name="caseid">
<xsl:value-of select="caseid"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
......
......
This does create what I want it to but because of
<xsl:apply-template/>
it processes all the node. while I want it to skip processing caseid and serid all together. This also applys for other nodes, which will not be available in the new XML structure. So how can I skip the nodes that I don't want to process using xslt.
regards, ehsan