Hi,
The suggestion of Christian is the key to find a solution.
Imagine. Each document contains an unique identifier not equal to ino:id, e.g. the primary key (pk) of your relational data source.
Example:
This table will be the RDBMS data source:
PK |Name |First name | City |Zip | State
===================================================
1 | Schmitt | Michael |Mannheim |68000 | Germany
2 | Meier | Klaus |Kaiserslautern|67655 | Germany
3 | Schmitt | Heike |Mainz |55130 |Germany
…
A possible transformation to XML could look like (For each record set one document):
<BR><person pk=?1?><BR> <name>Schmitt</name><BR> <firstname>Michael</firstname><BR> <city>Mannheim</city><BR> <zip>68000</zip><BR> <state>Germany><BR></person><BR><person pk=?2?><BR> <name>Meier</name><BR> <firstname>Klaus</firstname><BR> <city>Kaiserslauten</city><BR> <zip>67655</zip><BR> <state>Germany><BR></person><BR><person pk=?3?><BR> <name>Schmitt</name><BR> <firstname>Heike</firstname><BR> <city>Mainz</city><BR> <zip>55130</zip><BR> <state>Germany><BR></person><BR>?<BR></pre><BR><BR>Back to the suggestion:<BR>Now, you have to use ?pk? instead of ?ino:id? in order to reference the documents correctly. Therefore you need to modify the to methods of the class TaminoStore.java (see: <yourXapplicationFolder/ src\com\softwareag\xtools\xapplication\store\TaminoStore.java) as Christian suggested:<BR><BR><pre class="ip-ubbcode-code-pre"><BR> public String getIdQuery(Element elem) {<BR> String id = getId(elem);<BR> if (id != null) {<BR> // replace the original line with your adapted code<BR>//ORIGINAL: return "/" + elem.getName() + "[@ino:id='" + id + "']";<BR>//a suggestion for the former example:<BR>return ?/person[@pk=?? + id + ??]?;<BR> }<BR> return null;<BR> }<BR> <BR> public String getId(Element elem) {<BR> // replace the original line with your adapted code<BR> //ORIGINAL: Attribute attr = elem.getAttribute(ID, INO_NS);<BR> Attribute attr = elem.getAttribute(?pk?);<BR> if (attr != null) {<BR> return attr.getValue();<BR> }<BR> return null;<BR> }<BR>
After finishing the modifications you need to build a new xapplication.jar file.
Go to your xapplication folder on command line and call ?build quick?.
Then copy the file /lib/debug/xapplication.jar to the place of your generated application, e.g.: /WEB-INF/lib.
Now it should be possible to use the modifications.
Bye Thorsten
#webMethods#Tamino#API-Management