|| -----Original Message-----
 || From: [EMAIL PROTECTED] 
 || [mailto:[EMAIL PROTECTED] On Behalf Of Lars Martin
 || Sent: maandag 3 maart 2003 13:06
 || To: [EMAIL PROTECTED]
 || Subject: Fw: Problem while using XUpdate using 
 || XUpdateQueryServiceImpl
 || 
 || 
 || While updating a document in xindice using XUpdate scripts, 
 || the child element 'xmlns:' attributes are moved to the root 
 || element. But how to make sure that this does not happen. 
 || How to make sure that the namespace attribute is retained 
 || in the same element.

I've seen this behaviour before, in fact there already is a test that
also shows this behaviour.

 || But the resulting XML is given below,
 || 
 || <Element1  xmlns:Music="http://www.ibm.com/Music";>
 || <Element2></Element2>
 || <Element2>
 || <Document1>
 || <Document2></Document2>     
 || </Document1>
 || </Element2>
 || </Element1>

Technically this example is not incorrect because the namespace with
prefix Music is available to the Document1 element with the correct URI
(although it is not used), but an example that would cause problems
could easily be made. For example consider for example the Element1
element already containing xmlns:Music attribute with another URI. 

The WD states nothing about the use of namespaces but the correct
behaviour should be IMHO to insert the xmlns:Music attribute in the
Document1 element unless an ancestor element already contains an
xmlns:Music attribute with the same URI (this is important) otherwise
the xmlns:Music attribute should still be inserted in the Document1
element and override the existing namespace with the same prefix.

This will have to be fixed in the next release of Lexus.  

regards,

Jeroen

--

X-Hive Corporation
e-mail: [EMAIL PROTECTED]
phone: +31 10 2818080
http://www.x-hive.com 

----------------------------------------------------------------------
Post a message:         mailto:[EMAIL PROTECTED]
Unsubscribe:            mailto:[EMAIL PROTECTED]
Contact administrator:  mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to