IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Combine different rows Options · View
oli-87
Posted: Tuesday, April 12, 2016 11:25:07 AM
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):
mapforce_concat_problem.JPG

island
Posted: Tuesday, April 12, 2016 1:49:56 PM
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):
filters_variables.png

oli-87
Posted: Tuesday, April 12, 2016 9:49:30 PM
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
island
Posted: Wednesday, April 13, 2016 4:25:26 AM
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):
intermediate.png

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.