|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] namespace scope
I am doing an XML to XML copy and need to add a few new elements.
The copy is fine but why are my added elements outputted with 2 xmlns
attributes?
An empty one and an our namespace. I have definined it at the top in
xls:stylesheet.
xmlns=""
xmlns:nol="urn:nollekens.be"
I tried to include a the parts that seems import to explain the problem
The input XML file
<?xml version="1.0"?>
<root xmlns="urn:nollekens.be">
...
<offertelijn>
...
</offertelijn>
</root>
XLST stylesheet looks like this
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:nol="urn:nollekens.be">
...
<xsl:template match="nol:offertelijn">
<xsl:copy>
...
<xsl:choose>
<xsl:when test="nol:referteklant = ''">
<mutcode>NEW</mutcode>
</xsl:when>
<xsl:otherwise>
<mutcode>MOD</mutcode>
</xsl:otherwise>
</xsl:choose>
</xsl:copy>
</xsl:template>
output XML file (copied fields are exact like in my source XML )
but the added fields have the 2 ns attributes
<mutcode xmlns="" xmlns:nol="urn:nollekens.be">MOD</mutcode>
Thanks for any feedback,
Joeri
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








