Hello Aykut,
with Tamino 4.1 there are two mechanisms for updating the content of stored documents: replace the document in Tamino with a [complete] updated version of the document (the familiar mechanism - similar to insert, but specifying an ino:id) or execute an XQuery Update statement (which is new with Tamino 4.1).
It is possible to use either of these mechanisms from the Tamino API for Java, but both require different actions from the user.
When using one of the API’s object models, the API presents you with a set of objects to represent the content of a document.
So, in the case of JDOM, you get JDOM objects to work with.
These objects are just an “in memory copy” of the document(s) stored in Tamino. The user does whatever they need to do in order to modify the content of the document. When a call to TXMLObjectAccessor.update(obj) is made, the document represented by the objects is sent back to Tamino as a complete document, and Tamino replaces the old document with the new one.
When using XQuery to perform updates, the documents are updated on the Tamino server - an in memory object model is not created on the client side.
Rather, the user simply requests that Tamino update specific documents in a certain way.
I hope that this explains why there are no examples of using XQuery with JDOM!
The updates that you wish to make to your document are possible through either mechanism, I believe. Which mechanism is more appropriate depends upon the context of your application.
For example: if your application has some sort of GUI frontend which displays document content, allows users to modify the content and then click “Save”, perhaps it makes more sense to load the document into an object model on the client side.
On the other hand: if you just need to perform a big batch update (like “add one to everyone’s salary”) in a non-interactive way, then an XQuery Update statement is likely to be more appropriate.
I’m sorry that this doesn’t really answer your questions, but I hope it is helpful…
If you get stuck with the specifics, please don’t hesistate to post the problems!
Greetings,
Trevor.
#webMethods-Tamino-XML-Server-APIs#API-Management#webMethods