Description
dfdl:valueLength returns the incorrect result for a child element. Sometimes it returns the value of the entire containing element (i.e root element), sometimes it just returns the value of the neighbor element. Attached are some files to demonstrate this issue
The data in the test correspond to these infosets:
correct_message:
<exSchema:exSchema_message xmlns:exSchema="urn:exSchema:1.0"> <framing_header> <message_size>7</message_size> </framing_header> <message> <content>620100</content> </message> </exSchema:exSchema_message>
msg_size_smaller_than_file_size:
<exSchema:exSchema_message xmlns:exSchema="urn:exSchema:1.0"> <framing_header> <message_size>4</message_size> </framing_header> <message> <content>620100</content> </message> </exSchema:exSchema_message>
The first TDML fails with this message:
Content size (7) and the difference of message_size and framing_header size (3) should be equal
The second:
Content size (4) and the difference of message_size and framing_header size (0) should be equal
The first should not fail, and the 2nd should fail on a "Left over data" error. Commenting out the assertion annotation will show 2 passing tests.