cancel
Showing results for 
Search instead for 
Did you mean: 

conditional mapping of node-elements

Former Member
0 Kudos

Hello experts,

i've a simple mapping question:

Dest. Node:

<src_node> occurrence 1:n

<qualifier>

<value>

</dest_node>

<dest_node> occurrence 1:n

<qualifier>

<value>

</dest_node>

Mapping:

<src_node> -


> <dest_node>

This means 10 source nodes produce 10 destination nodes. No problem so far.

But how do tell the mapper just to generate these dest_nodes where the field <i><b>qualifier</b></i> of each occurence of src_node is i.e. "XX"?

Is it possible to do this by standard functions or do i need to write UDF?

Regards

Gunnar

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Gunnar,

Try this.


qualifier[remove context]---> 
                                       equals------ CreateIf ---->Dest_node
             Constant[XXX]--->

Map Qualifier --- Qualifier

Value---Value.

raj.

Answers (2)

Answers (2)

Former Member
0 Kudos

Gunnar, pretty easy:

if//qualifier . equalsString "XX" -> createIf -> dest node

so on the left:

src_node/qualifier . equalsString "<constant>"

the result leads to createIf fct -> result to dest_node

Peter

Former Member
0 Kudos

hey

>>where the field qualifier of each occurence of src_node is i.e. "XX"?

use the CreateIf standard function

thanx

Aamir

Former Member
0 Kudos

But the createif function has no "then" input where i can send the src_node to?

I just can say: if qualifier equals "XX"... but then?

Former Member
0 Kudos

According the documentation, <i>createif</i> is for <b>tags</b> - not for <b>nodes</b>...

Former Member
0 Kudos

Hey

>>According the documentation, createif is for tags - not for nodes...

CreateIf() is used when we have to select a node along with all its sub-nodes,its used not just for tags.

have a look at the following blog and see how he has generated the output structure based upon the input structure

/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool

thanx

Aamir