stevedlawrence commented on a change in pull request #517:
URL: https://github.com/apache/daffodil/pull/517#discussion_r600715502



##########
File path: 
daffodil-test/src/test/resources/org/apache/daffodil/section14/sequence_groups/SequenceGroupNestedArray.tdml
##########
@@ -219,6 +219,7 @@ notice blank lines are skipped
           <ex:record>
             <ex:item>notice lines of all commas are skipped</ex:item>
           </ex:record>
+          <ex:record />

Review comment:
       9.4.2.4 has an interesting example and seems related to what's going on 
here. The last line of that section says:
   > Upon this successful parse of E1, it is therefore known-to-exist. However, 
because the position in the data has not changed, E1 therefore has the empty 
representation. Because E1 is empty and optional (it has XSD minOccurs='0') and 
dfdl:emptyValueDelimiterPolicy does not apply, it is not added to the Infoset, 
and the temporary Infoset item for E1 containing E2 is discarded.
   
   I think this is very similar in this case, where E1 is record, and E2 is 
item. However, there's one differnce related to the wording
   
   > However, because the position in the data has not changed, ...
   
   In our case, the empty ``<ex:record />`` element comes from the line that is 
all commas. So when parsing record, the position in the data does change while 
parsing the ``item`` elements, those elements just happened to not contribute 
anything to the infoset.
   
   I also noticed that if I change the line of all commas to be an empty line, 
then the empty record element doesn't show up in the infoset. So it seems this 
position changing or not changing while parsing the complex record element 
might be the difference. In which case, this empty record element is maybe 
correct?
   
   I guess the question is if you have a optional complex element and all it's 
children are empty rep and contribute nothign to the infoset, but they consume 
separator data, should that complex element end up in the infoset?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to