logo       

Re: XUpdate specifications: msg#00220

text.xml.exist

Subject: Re: XUpdate specifications

Hi Sergey,

the problem here is that the "order" attribute is already present in at least
one of the "class" elements. I changed the XUpdate code yesterday to throw an
exception in this case (though you get a NPE which I don't get). Previous
versions just appended the duplicate attribute without checking thus creating
an invalid document.

Anyway, I decided that throwing an exception is not the best solution and
changed the implementation: append will now just replace the value of the
duplicate attribute. The updated code is in the CVS or today's snapshot.

Wolfgang


> Try the following XUpdate on attached XML document.
>
> <xupdate:modifications version="1.0"
> xmlns:xupdate="http://www.xmldb.org/xupdate";>
> <xupdate:append select="//class" >
> <xupdate:attribute name="order">777</xupdate:attribute>
> </xupdate:append>
> </xupdate:modifications>
>
> When I run it, it causes "internal server error" response and raises the
> following trace:
>
> 24 ╤Б╨╡╨╜ 2004 11:32:41,421 [SocketListener-74] DEBUG
> (GeneralComparison.java [quickNodeSetCompare]:245) - quick compare: 3
> 24 ╤Б╨╡╨╜ 2004 11:32:41,421 [SocketListener-74] DEBUG (Modification.java
> [select]:142) - found 24 for select: //class[@id != '777']
> 11:32:41.531 WARN!! Exception for
> /exist/servlet/db/cs/shop/cosmictrade-default
> java.lang.NullPointerException


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise