Reputation: 1787
I am using namespace attibute of xsl:element to put a namespace in the result XML. It puts the namespace in there, but like this:
xmlns:ns0="http://...."
and puts <root> as <ns0:root>. I want to put the namespace without "ns0".
Upvotes: 2
Views: 1574
Reputation: 243599
<xsl:element name="myroot" namespace="xmlns.mynamespace.com/import">; <xsl:attribute name="version"> <xsl:text>2.0</xsl:text> </xsl:attribute> <xsl:apply-templates /> </xsl:element>
Simply re-write this as:
<myroot xmlns="xmlns.mynamespace.com/import" version="2.0">
<xsl:apply-templates />
</myroot>
Upvotes: 2