I want to skip the child element from following xml
<person id="101">
<name>XYZ</name>
<last-name>XXX</last-name>
</person>
<person id="101">
<name>YYY</name>
<last-name>BBB</last-name>
</person>
Assuming I want to skip last-name and here is my code
<xsl:template match="/">
<xsl:apply-templates select="//person [not(last-name)]" />
</xsl:template>
<xsl:template match="person">
<xsl:copy-of select="." />
<xsl:text>
</xsl:text>
</xsl:template>
The above code skips the all person element who has last-name element.
Can any any one help me with this code?
Thanks