quote:Can we have some idea what the structure of the schema is?
The document is list of Purchase Orders(PO), with each PO having multiple lineitems. So the structure looks like -
quote: Does the query find a document? Does System.out.println show anything?
Yes, the query finds the relevant node. I can also see that update happens in memory on that node. However, when I use tamino.update(element), nothing happens.
I also tried different variation of update API with no luck.
I have document that contains list of Purchase Orders (PO), the structure is as shown above. Now I have create a collection and I have added only one document (polist.xml). This XML document contains 300 PO’s.
When I do a query using TII (Tamino Interactive Interface), the result always shows all the elements as having “ino:id=1”.
For instance, if the query is - /polist/po - all po’s have ino:id of 1. If the query is /polist/po/customer - then all customers have ino:id=1.
I thought each node has unique “ino:id”. Anybody willing to throw some light ??
returns a small subset of the whole document, not the whole document itself. As Tamino update takes place on a ‘whole document’ level i.e. you can’t just specify one node/element in an update, there is no surprise that when you try to use the result of this query in an update it doesn’t work. You need to get the whole document, change the elements you wish to change and write the whole document back again with update.
As for your second problen, inoids, any defined schema in Tamino will store multiple documents of that schema. Each of these documents has a unique inoid, not the elements/nodes within the document. You state " I have added only one document" so therefore it is no surprise that query results only show inoid 1.
If your schema was
You could present each po to tamino separately. Each stored po would then have it’s own unique ino:id.