Hi David,

 || -----Original Message-----
 || From: v v [mailto:[EMAIL PROTECTED] 
 || Sent: zondag 9 februari 2003 16:49
 || To: [EMAIL PROTECTED]
 || Subject: Empty attribute in xu:attribute (XUpdate) doesn't 
 || work like i expected
 || 
 || 
 || If you try following query:
 || 
 || <xu:modifications version="1.0" 
 || xmlns:xu="http://www.xmldb.org/xupdate";>
 ||   <xu:append select="/element">
 ||     <xu:element name="style">
 ||       <xu:attribute name="attr1"/>
 ||       <xu:attribute name="attr2"/>
 ||       <xu:attribute name="attr3">0</xu:attribute>
 ||       <xu:attribute name="attr4"></xu:attribute>
 ||     </xu:element>
 ||   </xu:append>
 || </xu:modifications>
 || 
 || Xindice gives a lot of the following messages:
 || * java.lang.Exception: no nodes selected !
 || * java.util.NoSuchElementException

I tested it myself and also got a java.util.NoSuchElementException, this
is a bug because xupdate should be able to append empty attributes. In
any case it shouldn't give a crytic exception like
java.util.NoSuchElementException.

 || If I ommit attributes 1, 2 and 4 in my query, it works
 || fine. Is this a restriction/bug of Xindice or just the 
 || definition of XUpdate? Temporary I work around this problem 
 || by setting the value to any arbitrary value and updating it to "". 

The working draft (http://www.xmldb.org/xupdate/xupdate-wd.html) is not
very clear about this but since empty attributes are legal in XML IMO
xupdate should be able to append empty attributes.

I will fix this in the next release of Lexus. Btw you have more chance
getting problems with xupdate fixed if you post your problems to
[EMAIL PROTECTED]

regards,

Jeroen Breedveld

--

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