Я переименовал узел A: B в C: D, но на выходе я просматриваю
полное пространство имен C, которое мне не требуется
Я пытался использовать
префиксы exclude-result-, но он не работает
<xsl:stylesheet Xmlns:A="http://www.deltaxml.com/ns/well-formed-delta-v1"
Xmlnx:C="http://www.deltaxml.com/ns/non-namespaced-attribute">
<xsl:template match="node()[name()='A:B']" mode="fetchData">
<xsl:element name="C:D" exclude-result-prefixes="merge">
<xsl:attribute name="content">
<xsl:variable name="A:B">
<xsl:value-of select="A:B" />
</xsl:variable>
<xsl:value-of select="$A:B" />
</xsl:attribute>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
XML изменился с
<A:B xmlns:C="http://www.deltaxml.com/ns/non-namespaced-attribute"
content="Base>base</A:B>
<A:B xmlns:C="
http: / www.deltaxml.com / ns / non-namespaced-attribute "
content="Base1>base1</A:B>
<A:B xmlns:C="
http: / www.deltaxml.com / ns / non-namespaced-attribute "
content="Base2>base2</A:B>
на следующий XML
<C:D xmlns:C="
http: / www.deltaxml.com / ns / non-namespaced-attribute "
content="Base>base</C:D>
<C:D xmlns:C="
http: / www.deltaxml.com / ns / non-namespaced-attribute "
content="Base1>base1</C:D>
<C:D xmlns:C="
http: / www.deltaxml.com / ns / non-namespaced-attribute " content="Base2>
base2
</C:D>
But I don't need the name space of C, Please suggest a solution