im looking for a solution to my problem. I am using altova mapforce 2015 x64 with xslt2.
I have two sequences of numbers in xslt2. they both have the same length (and always will). e.g. they look like this:
seq1: 10 20 ...
seq2: 1 2 ...
What i need is to multiply those two in the way that seq1[0] is multiplied with seq2[0], seq[1]*seq[1] and so on.
so in my needed solution i would get the sequence 10 40 instead i get the following 10 20 20 40. so the whole sequences are multiplied.
so maybe somebody knows an answer or a workaround to that problem, both is highly appreciated.
thanks
EDIT:
the problem with altova is that i cannot add xslt2 code myself, the file will be overwritten everytime i modify something in the mapping.
You could use an
xsl:for-each
and a range to determine the position. Here's an example...XSLT 2.0
Output (separated by commas just to show it's a sequence)
Note: This will only handle an even number of sequence items. If either sequence has more than the other, those will not be included in the output. You'd have to add additional logic if you needed to handle that situation.
EDIT - Just saw your comment about not being able to add XSLT code yourself. I'll leave my answer here in case someone not using mapforce finds this answer useful.