
Proposed revised wording: 16.6 Forward Progress Requirement When parsing an optional occurrence of an array element, if the element is found to have a zero-length representation and its associated separator region is also zero-length then it is a processing error. An optional occurrence is defined as follows: - any occurrence of an element with occursCountKind='implicit' and index > XSDL minOccurs - any occurrence of an element with occursCountKind='parsed' or 'stopValue' If occursCountKind is 'stopValue' then the element will not be a point of uncertainty and the processing error will invalidate the entire array. For occursCountKind='implicit' or 'parsed' the processing error will terminate the array and will thus avoid either redundant processing or an infinite loop ( when XSDL maxOccurs='unbounded'). Feel free to propose better terminology. I'm not sure whether 'optional occurrence' has been used elsewhere in the specification with a different meaning. The final paragraph is conveying important information but can be reworded if necessary. regards, Tim Kimber, DFDL Team, Hursley, UK Internet: kimbert@uk.ibm.com Tel. 01962-816742 Internal tel. 37246742 ----- Forwarded by Tim Kimber/UK/IBM on 29/01/2014 14:42 ----- From: Tim Kimber/UK/IBM To: dfdl-wg@ogf.org, Date: 28/01/2014 14:24 Subject: Spec question: 16.6 Forward Progress Requirement 16.6 Forward Progress Requirement It is a processing error when an array is potentially unbounded and the position in the data does not move during the parsing of an occurrence of the element including any associated separator. This is to prevent an infinite loop. An array is potentially unbounded if any of the following are true: * dfdl:occursCountKind is 'parsed' or 'stopValue' * dfdl:occursCountKind is 'implicit' and XSDL maxOccurs is 'unbounded' Q1: Is this paragraph intended to a) safely terminate the parsing of the array, allowing the parser to proceed with whatever follows in the DFDL schema or b) cause the parser to discard the entire array along with everything that was parsed within the nearest point of uncertainty? If b) then I think a Schema Definition Error would be more appropriate ( because backing out the entire array implies that none of the occurrences were well-formed and some later branch might be the correct option ). Although... Q2: If the array has occursCountKind='stopValue' then none of the occurrences is an actual point of uncertainty because only stopValue can terminate the array. If paragraph 16.1 is invoked then a processing error will be thrown. But the occurrence is not a point of uncertainty so the entire array will be treated as badly-formed. In other words, behaviour will be as described in option b) above. I think that is correct in this case because the array's stopValue was never found. Q3: Should this infinite-loop detection be performed only after at least minOccurs occurrences of the array have been processed successfully? Until then, I think an empty occurrence should cause the default value to be put into the info set. regards, Tim Kimber, DFDL Team, Hursley, UK Internet: kimbert@uk.ibm.com Tel. 01962-816742 Internal tel. 37246742 Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU