One of the condition checks in my simple transformation (deserialization) does not seem to want to work -- I've tried a hundred different things (no exaggeration) and it’s driving me crazy. It’s probably something simple – no pun intended – and I’m hoping someone will just see what I’m doing wrong and point out how dumb I am…
The code that is always passing the check, then causing a short dump with the statement “Check failed in condition” is as follows:
In my testing, the value of $line.ccc (or the variable, or alternate root name I tried) is always “1” according to the debugger, but no matter what I try, the debugger steps into this condition despite the fact that it shouldn’t and then when it gets to the end element </tt:cond>, it short dumps.
I have a condition almost identical to this later on (referring to a different fieldname) in the simple transformation and it works fine, skipping over the elements that should not exist in the incoming XML. Both are inside a loop and both refer to $line.<fieldname>.
$line refers to the main ROOT I have defined.
For the purposes of testing, the elements within the condition above do exist (even though the idea is that they will not exist if the condition is not met), otherwise I would get a parsing error before the above noted dump error.
Among the things tried, I have changed the value of the condition from “0” to “1” or “2” or “3” and the debugger always goes into the condition as if it has passed the check.
Any help is much appreciated!!