|
Rank: Member
Joined: 3/10/2016 Posts: 10 Location: Germany
|
Hello together,
I have a little problem with my MapForce-Transformation:
I want two read different values of different rows in one new value or in one varaible.
My XML looks like this: <Criterion name="Pos1_TopJob" critName="Pos1TopJob" ordering="0">TopJob29<ValueParameter longName="TopJob29"/></Criterion> <Criterion name="Pos1_PortPrem" critName="Pos1_PortPrem" ordering="0">Portal_9<ValueParameter longName="Portal_9"/></Criterion> <Criterion name="Pos2_PortPrem" critName="Pos2_PortPrem" ordering="0">Portal_99<ValueParameter longName="Portal_99"/></Criterion> <Criterion name="Pos3_PortPrem" critName="Pos3_PortPrem" ordering="0">Premium_299<ValueParameter longName="Premium_299"/></Criterion>
Now I want every "text()" from specific rows in one variable, so that I get a result like this: <merkmal> <value>TopJob29Premium_299</value> </merkmal>
But, the transformation makes the contition row by row, so I get this result: <merkmal> <value>TopJob29</value> <value/> <value>Premium_299</value> <value/> <value/>
Have anyone an idea, how I can save every row in one value? I tried a lot of different things, but I can only use XSLT 1.0 and with this I didn't find a solution. :-(
Please see also the picture for my transformation in MapForce.
Thanks and kind regards Oli-87 oli-87 attached the following image(s):
|
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
Use filters, then map the output of the filters to variables, and then the output of the variables to the concat function.
island attached the following image(s):
|
|
Rank: Member
Joined: 3/10/2016 Posts: 10 Location: Germany
|
Hi island,
thanks for the fast response. This works fine, but unfortunately I can only use XSLT 1.0 and variables are only available in XSLT 2.0. So I can't use this this nice function.
Do you know a function for XSLT 1.0?
Kind regards and thanks Oli-87
|
|
Rank: Newbie
Joined: 10/28/2002 Posts: 1,283 Location: AT
|
Hi Oli-87,
IF at all possible I would HIGHLY suggest switching to xslt 2.0. It has many more functions and you will make your life much easier if you can go this route.
IF there is no possibility to switch to xslt 2.0 then you could insert an intermediate schema component as shown here:
island attached the following image(s):
|
|
guest |