W
wooks
I want to apply 2 changes to the following xml
<ROOTSTUB app="appname"/>
1. change the app attribute to an element.
2. put the ROOTSTUB element into a namespace that is passed as a
global parameter at run time.
so I want
<ROOTSTUB xmlns="urn:aNamespace">
<app>appname</app>
</ROOTSTUB>
and I'd like to do it in one pass. I have tried
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> <
<xslutput method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
<xslaram name="namespace"/>
<xsl:template match="node()|@*">
<xsl:element name="{local-name(.)}" namespace="$namespace">
<xsl:value-of select= "." />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
and variations thereof. I cannot get the output I desire.
Can anyone else?
<ROOTSTUB app="appname"/>
1. change the app attribute to an element.
2. put the ROOTSTUB element into a namespace that is passed as a
global parameter at run time.
so I want
<ROOTSTUB xmlns="urn:aNamespace">
<app>appname</app>
</ROOTSTUB>
and I'd like to do it in one pass. I have tried
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> <
<xslutput method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
<xslaram name="namespace"/>
<xsl:template match="node()|@*">
<xsl:element name="{local-name(.)}" namespace="$namespace">
<xsl:value-of select= "." />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
and variations thereof. I cannot get the output I desire.
Can anyone else?