Delete child of a path
Posted: Sun Dec 09, 2007 3:53 am
Hi,
i’m a beginner whit xslt then i need help.
I want to delete all elements son of the node Article that they aren’t except ‘PubModel’ and ‘ArticleDate’. I used the following code. It works but it doesn’t keep attributes in the resulting XML. Why? How can I do?
<xsl:template match="*|/">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="//PubmedArticle/MedlineCitation/Article/*[name()!='PubModel'][name()!='ArticleDate']

i’m a beginner whit xslt then i need help.
I want to delete all elements son of the node Article that they aren’t except ‘PubModel’ and ‘ArticleDate’. I used the following code. It works but it doesn’t keep attributes in the resulting XML. Why? How can I do?
<xsl:template match="*|/">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="//PubmedArticle/MedlineCitation/Article/*[name()!='PubModel'][name()!='ArticleDate']
