Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] Replacing default namespace [Thread Next] Re: [xsl] Replacing default namespaceTo: Date: 7/1/2007 9:58:00 PM Martin Honnen wrote:
To avoid that use a template like this
<xsl:template match="*">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:apply-templates select="@* | node()"/>
</xsl:element>
</xsl:template>
for element nodes that you want to copy without its namespaces nodes.
Your code mimics the xsl:copy behavior. I assume you meant:
<xsl:element name="{name()}" namespace="http://othernamespace">
Or:
<xsl:element name="{name()}" namespace="">
which will remove the namespace entirely (and will effectively remove
the prefix, placing the element in the default null namespace).
-- Abel | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
