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.

Profile: patrickhorrigan
About
User Name: patrickhorrigan
Forum Rank: Newbie
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Wednesday, October 14, 2020
Last Visit: Wednesday, August 24, 2022 4:37:09 PM
Number of Posts: 4
[0.02% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Dynamic Table Cell Values
Posted: Friday, October 23, 2020 12:35:00 AM
Hopes this helps others.
Here is an example of the working code:

if (number(./preceding-sibling::n1:FST[1]/n1:FST01) = (./preceding-sibling::n1:FST[1]/n1:FST01))
then
if ((n1:FST01) - (./preceding-sibling::n1:FST[1]/n1:FST01) > 0)
then (n1:FST01) - (./preceding-sibling::n1:FST[1]/n1:FST01)
else ''
else n1:FST01
Topic: Dynamic Table Cell Values
Posted: Wednesday, October 21, 2020 3:27:41 AM
I have been stumped by this problem and I am hoping someone on this forum may be able to help me out.

As a dynamic table is looping, I need to output a value based on the previous loop's element's value. I need to see if a element's value has changed from the previous loop, and if it has, output the difference between the current value and the previous value.

For example, using the following XML:

<FST type="Segment">
<FST01>22</FST01>
</FST>
<FST type="Segment">
<FST01>22</FST01>
</FST>
<FST type="Segment">
<FST01>22</FST01>
</FST>
<FST type="Segment">
<FST01>66</FST01>
</FST>
<FST type="Segment">
<FST01>66</FST01>
</FST>


I need to output the column values as follows:

FST01
22
0
0
44
0

Any help would be greatly appreciated.
Thank you in advance.

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