The only thing that stands out to me is that the error you are seeing should be coming from ControlRecord, which isn't part of the quoted schema. Other then that, I am not sure what the issue could be (unless your data actually parses more then 999 instances when unbounded is used).
Do you have example data that you can share which demonstrates the problem? ________________________________ From: Peter Kostouros <[email protected]> Sent: Wednesday, December 4, 2019 12:35 AM To: [email protected] <[email protected]> Subject: Daffodil parsing fails on optional elements when maxOccurs set to "unbounded", passes when set to "999" Hi I hope someone can point me in the right direction to help me understand behaviour I have seen with a particular schema when parsing a file. I have a schema modelled on the NACHA schema files found in the DFDLSchemas/NACHA directory on github. In my case, with respect to optional (embedded) looping elements: 1. Parsing is unsuccessful when maxOccurs attribute is set to “unbounded” (Parse Error: Failed to populate ControlRecord[1]. Cause: Parse Error: Assertion failed: Not Control Record); 2. Parsing is successful when maxOccurs is limited to say “999”. Below is a snippet from the schema referred to above that results in error: <!-- F LOOP --> <xs:element dfdl:lengthKind="implicit" name="F_Records" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element dfdl:lengthKind="implicit" name="F_Record" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element ref="F01_Record" minOccurs="0" /> <xs:element dfdl:lengthKind="implicit" name="F02_Records" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element ref="F02_Record" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> I have attached schema files that demonstrate this issue, so I hope someone can advise me on what I should be correctly doing. I am using the Daffodil 2.4.0 release as well as the 2.5 snapshot JAVA APIs, and both show similar behaviour; I have also seen this behaviour when running the files though the daffodil command line, with the following tunables "unqualifiedPathStepPolicy" = "defaultNamespace" "suppressSchemaDefinitionWarnings" = "multipleChoiceBranches noEmptyDefault" Peter This e-mail and any attachment is intended for the party to which it is addressed and may contain confidential information or be subject to professional privilege. Its transmission in not intended to place the contents into the public domain. If you have received this e-mail in error, please notify us immediately and delete the email and all copies. AWTA Ltd does not warrant that this e-mail is virus or error free. By opening this e-mail and any attachment the user assumes all responsibility for any loss or damage resulting from such action, whether or not caused by the negligence of AWTA Ltd. The contents of this e-mail and any attachments are subject to copyright and may not be reproduced, adapted or transmitted without the prior written permission of the copyright owner.
