Hi, Pankaj
I am not using the below code 'xsl:copy' to match the root element.
Please find the below my input XML and XSLT for my issues.
I didn't get solved this issue. I need to remove the namespace from the
output xml, this namespace not used in output xml.
Input XML
========
<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:mml="http://www.w3.org/1998/Math/MathML"
xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta><journal-id
journal-id-type="publisher-id">JPP</journal-id></journal-meta>
<article-meta>
<article-id
pub-id-type="doi">10.1177/1059840510312345</article-id>
<volume>XX23</volume>
<issue>X2</issue>
<abstract><p>Abstract Text</p></abstract>
</article-meta>
</front>
<ref>
<citation citation-type="web"><ext-link ext-link-type="uri"
xlink:href="http://www.nydailynews.com/lifestyle/health/2009/02/03/2009-02-03_red_bull_energy_drink_eyed_in_death_of_b.html">http://www.nydailynews.com/lifestyle/health/2009/02/03/2009-02-03_red_bull_energy_drink_eyed_in_death_of_b.html</ext-link>
</citation></ref>
</article>
XSLT
=====
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0" xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:output method="xml" encoding="us-ascii" indent="no"
omit-xml-declaration="no" include-content-type="no" />
<xsl:template match="article">
<hml
artid="{descendant::journal-id[@journal-id-type='publisher-id']}_{substring(substring-after(descendant::article-id[@pub-id-type='doi'],'/'),11,6)}"
jnlid="HML" publisher="Hurix" vol="{descendant::volume[1]}"
issue="{descendant::issue[1]}" month="{descendant::month[1]}"
pubyear="{descendant::year[1]}" doctype="{@article-type}"
doi="{descendant::article-id[@pub-id-type='doi']}">
<xsl:apply-templates/>
</hml>
</xsl:template>
<xsl:template match="citation[@citation-type='web']">
<ref-url>
<url id="url"
href="{descendant-or-self::ext-link/@xlink:href}"><xsl:apply-templates
select="ext-link"/></url>
</ref-url>
</xsl:template>
<xsl:template match="front"/>
</xsl:stylesheet>
Current Output
==========
<?xml version="1.0" encoding="us-ascii"?><hml
xmlns:xlink="http://www.w3.org/1999/xlink" artid="JPP_312345"
jnlid="HML" publisher="Hurix" vol="XX23" issue="X2" month="" pubyear=""
doctype="research-article" doi="10.1177/1059840510312345">
<ref-url><url id="url"
href="http://www.nydailynews.com/lifestyle/health/2009/02/03/2009-02-03_red_bull_energy_drink_eyed_in_death_of_b.html">http://www.nydailynews.com/lifestyle/health/2009/02/03/2009-02-03_red_bull_energy_drink_eyed_in_death_of_b.html</url></ref-url>
</hml>
Expected Output
============
<?xml version="1.0" encoding="us-ascii"?><hml artid="JPP_312345"
jnlid="HML" publisher="Hurix" vol="XX23" issue="X2" month="" pubyear=""
doctype="research-article" doi="10.1177/1059840510312345">
<ref-url><url id="url"
href="http://www.nydailynews.com/lifestyle/health/2009/02/03/2009-02-03_red_bull_energy_drink_eyed_in_death_of_b.html">http://www.nydailynews.com/lifestyle/health/2009/02/03/2009-02-03_red_bull_energy_drink_eyed_in_death_of_b.html</url></ref-url>
</hml>
Regards,
Ramkumar
===========================================================
***Disclaimer***
This email, and any attachments ("this email"), is confidential. If you are not the addressee please tell the sender immediately, and destroy this email without using, sending or storing it. Any opinions, express or implied, in this email, are those of the sender, and are not necessarily approved by the company. Except as expressly stated, this e-mail should not be regarded as an offer, solicitation, recommendation or agreement to buy or sell products or services, or to enter into any contract. E-mail transmissions are not secure and may suffer errors, viruses, delay, interception and amendment. The company does not accept liability for damage caused by any of the foregoing.
ALL INCOMING AND OUTGOING MAILS MAY BE MONITORED BY THE COMPANY.
============================================================