Subject:How do you select a particular node based on an element value? Author:(Deleted User) Date:29 Mar 2005 01:36 PM
to do it in mapper, you need to do following steps. becase it involves structure change and
conditional transformation, you would need 'if block' to help you.
1.choose source and target schema by your xml example.
2.right click on the middle pane and choose 'xsl instructions/for-each'
3.link the 'row' node in message2 from source tree to the left port of for-each block
4.right click on the middle pane and choose 'xsl instructions/if' and link from for-each
outport(at right) to 'if' block inport(at top).
5.link 'if block' outport(at right) to target tree ns1:help3 node
6.link ID in message2 from source tree to ID in target tree
7.link Name in message2 from source tree to Name in target tree
you are almost there except for you need to specify you condition in 'if block'. you can double click
on the 'if block' left port to type the following
/ns:Messages/ns:Message1//ID[.=current()/ID]
after these steps you should see following code, it will do the job for your transformaiton.