Hi,
This is probably a basic problem, but the answer escapes me. I am adding an element and some value to an existing xml file. When I run the following XSLT it adds xmlns="" to the element. How do i exclude this?
XSLT 2.0:
Code:
<xsl:template match="ACM:Chapter">
<xsl:copy>
<xsl:choose>
<xsl:when test="@*">
<xsl:copy-of select="@*"/>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="id"><xsl:value-of select="generate-id()"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<METADATA>
<MMEL>
<xsl:attribute name="revdate"><xsl:text>2007-01-10</xsl:text></xsl:attribute>
<xsl:attribute name="mmelrev"><xsl:text>05</xsl:text></xsl:attribute>
<xsl:value-of select="//ACM:MELtitle"/>
</MMEL>
</METADATA>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
Current output:
<METADATA xmlns="">
<MMEL revdate="2007-01-10" mmelrev="05">80-10-01</MMEL>
</METADATA>