Its a bug in the xupdate code that xindice uses. What happens is when 
append tries to find a node but can't it throws a execption and doesn't 
clean up after its self. I wrote a patch that you can apply to the source 
code that you can get from here: 
http://sourceforge.net/projects/xmldb-org/.

I would also be careful with having multiple update statements on a 
collection. Xindice has a bug that will start executing each statement multiple 
times. See bug 25892.

I wrote a patch: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=30878,  
that fixes the multiple insert problem when working with xupdates across a 
collection. Use the second patch in that bug first one had formating 
issues. 

Todd Byrne 

On Tue, 2 Nov 2004, William Billingsley wrote:

> 
> I'm having something odd happen with appends when using the XML:DB api:
> 
> On calling the following xUpdateQueryService.updateResource("<name>", 
> "<xml">) with
> <xupdate:modifications version="1.0" 
> xmlns:xupdate="http://www.xmldb.org/xupdate";><xupdate:append 
> select="document/[EMAIL PROTECTED]'tileSetOne']" ><tile 
> definition="maths:=" name="needaname" x="467" y="300"><socket 
> name="var1"/><socket 
> name="var2"/></tile></xupdate:append></xupdate:modifications>
> 
> it seems that Xindice does not append the <tile ...><socket ... 
> /></tile> to the <tileSet> element, but instead inserts
> <temporaryXUpdateTree><tile definition="maths:=" name="needaname" 
> x="467" y="300"><socket name="var1" /><socket name="var2" 
> /></tile></temporaryXUpdateTree></document>
> 
> after the <tileSet> node (so appending the temporaryXUpdateTree node to 
> tileSet's parent.)
> 
> Does anybody have any ideas why this might be, and why the nodes aren't 
> being appended in the right place?
> 
> Will Billingsley
> 

Reply via email to