Subject: Re: [xsl] namespace scope From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx> Date: Thu, 02 May 2002 17:09:29 +0200 |
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
-- Oleg Tkachenko Multiconn International, Israel
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] namespace scope, Jeni Tennison | Thread | [xsl] selecting with text nodes, Ian Hord |
Re: [xsl] Extending xsltproc?, Thomas B. Passin | Date | Re: [xsl] selecting with text nodes, Oleg Tkachenko |
Month |