|
XUpdate - generating duplicate attributes: msg#00169text.xml.exist
Hi, I have a found a bug IMHO. Then I perform the XUpdate query provided below - I got 2 strange things: 1) both xu:if statements are evaluated true (!) 2) resulted document has one more (!) attribute usageCount each time I perform the operation. So 10 executions => 10 attributes usageCount - I thought that there "can only be one" attribute with each name? Thanks Sebastian <xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate" > <xu:if test="not(document('/db/elvis/doc/1234567.xml')/Book[@usageCount])"> <xu:append select="document('/db/elvis/doc/1234567.xml')/Book"> <xu:attribute name="usageCount">0</xu:attribute> </xu:append> </xu:if> <xu:if test="document('/db/elvis/doc/1234567.xml')/Book[@usageCount]"> <xu:update select="document('/db/elvis/doc/1234567.xml')/Book/@usageCount">'{'util:eval(concat(document('/db/elvis/doc/1234567.xml')/Book/@usageCount,"+1"))'}'</xu:update> </xu:if> </xu:modifications> -- ----------------------------------------- -- Sebastian Ryszard Kruk, M.Sc. -- mailto: skruk@xxxxxxx -- GG: 335067, Jabber: s_kruk@xxxxxxxxx ----------------------------------------- ------------------------------------------------------- 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> |
|---|---|---|
| Previous by Date: | RE: Re: Flash <-> eXist communication problem: 00169, Olaf Greve |
|---|---|
| Next by Date: | Re: Constructor problems?: 00169, Wolfgang Meier |
| Previous by Thread: | type 12 is not a valid typei: 00169, rui21alberto |
| Next by Thread: | Re: XUpdate - generating duplicate attributes: 00169, Wolfgang Meier |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |