I’m having some difficulty with an IF statement in an xlt that uses xml for both input and output record format
The IF statement looks like
nm1:OMG_O19.nm1:OMG_O19~ORDER(%g1).nm1:ORC.nm1:ORC~25.nm1:CWE~1.#text eq =C01
Yes I know the source field name is LONG
When I try to test the xlt I get
[0:TEST] IF expression parse failed: Expected a relational operator
Error occurred at: ‘C~25.nm1:CWE~1.#text eq =C01’
[0:TEST] Unable to compile XLT ‘omg_o19_gcrs_pbrc.xlt’.
Its almost as if the soure field name gets truncated
So I tried copying the source field to @orc25 (a temporary variable) then modify my If statement to look like
@orc25 eq =C01
This does not give an error but for some reason the IF statement always equates to false (even thought I know the value of @orc25 is C01)
So I tried setting another temporary variable to C01 so my IF statement becomes
@orc25 eq @test_value
Same result IF stetment always false
I have treid using == rather than eq – same result IF stement always false
So in desperation I tried
@orc25 eq @orc25 and IF statement was true
Does anyone have any ideas on how I can test the value of a XML source field against a constant
Cheers,
Bill