| -----Original Message----- | From: [EMAIL PROTECTED] | [mailto:[EMAIL PROTECTED] | Behalf Of Lars Martin | Sent: dinsdag 15 januari 2002 16:24 | To: [EMAIL PROTECTED] | Subject: Re: Is this a bug? | | | On Fri, 11 Jan 2002 14:54:38 +0100 | "Jeroen Breedveld" <[EMAIL PROTECTED]> wrote: | | Just to understand you correctly: | -> The following is the result Lexus produces for the XUpdate file | provided above?
Yes, and as you can see the xmlns:address namespace declaration has moved to the documentelement although I intended it to be in the third address element where the address prefix is used. | > <addresses xmlns:address="http://www.x-hive.com/address"> | > <address name="Andreas"> | > <town>New York</town> | > </address> | > <address name="Lars"> | > <town>Los Angeles</town> | > </address> | > <address:address name="Jeroen"> | > <address:town>Rotterdam</address:town> | > </address:address> | > </addresses>[1] | I found the cause in line 40 of InsertElement.java: if (qName.indexOf( ":" )>=0) { contextNode.getOwnerDocument().getDocumentElement().setAttribute( "xmlns:" + qName.substring( 0, qName.indexOf( ":" ) ), namespaceURI ); } this means (I think) that every time comes upon a element with a namespace ( if (qName.indexOf( ":" )>=0) ) it sets the xmlns:address attribute on the documentelement. I think this part should be removed because the namespace declaration should stay in the element where it was encountered originally. I tried this but for some reason the attribute xmlns:address doesn't appear in the third address element as you can see in the output above (although the name attribute is copied correctly) greetings, jeroen ---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ ----------------------------------------------------------------------