XSLT: Namespace in ein Element einfügen

Titus76

Grünschnabel
Hallo,
wie kann ich per XSLT den Namespace "abc" in ein Element einfügen?

Vorher:
Code:
<typeMappingqname="Organization"/>

Nachher:
Code:
<typeMappingqname="Organization"xmlns:abc="http://www.abc.de"/>

So funktioniert es nicht. Weder mit "element", noch mit "attribute". Die Fehlermeldung lautet: "Namensraum-Präfix konnte nicht aufgelöst werden xmlns. Knoten wird ignoriert.". Auch ein Definieren des Namespaces im Stylesheet-Element half nicht weiter.
Code:
<xsl:element name="{name()}">
<xsl:apply-templates select="@*"/>
<xsl:attribute name="qname">
	 <xsl:text>Organization</xsl:text>
</xsl:attribute>
<xsl:attribute name="xmlns:abc">
	 <xsl:text>http://www.abc.de</xsl:text>
</xsl:attribute>
<xsl:element name="xmlnsabc">
	 <xsl:text>http://www.abc.de</xsl:text>
</xsl:element>
</xsl:element>

Hat jemand eine Idee?
 
Zurück