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



##########
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:
       Interesting question.  I looked at the DFDL 1.0 spec and then searched 
for dfdl:emptyValueDelimiterPolicy in the codebase.  Lines 90-94 in 
SequenceChildBases.scala say:
   
   > An element of complex type can have EmptyRep, but 
dfdl:emptyValueDelimiterPolicy does not apply.  TBD: CONFIRM THIS. When a 
complex type element is parsed, and zero data is consumed, but the parse is 
successful, then any infoset created is the "empty value" for this complex type 
element. When the element is required, this infoset is retained. When the 
element is optional, this infoset is discarded, any side-effects that occurred 
in its creation are backtracked.
   
   The DFDL 1.0 spec says:
   
   > 9.4.2.3      Complex element
   > Required occurrence: An item is added to the Infoset.
   > 
   > Optional occurrence: if dfdl:emptyValueDelimiterPolicy is applicable and 
is not 'none' [29], then an item is added to the Infoset, otherwise nothing is 
added to the Infoset.
   
   This TDML file inherits DFDLGeneralFormat.dfdl.xsd without changing 
dfdl:emptyValueDelimiterPolicy from its original value which is "both".  This 
implies the empty record item should be added to the infoset.  However, the 
comment in SequenceChildBases.scala is either out of date or it implies 
Daffodil does not check dfdl:emptyValueDelimiterPolicy for complex elements, 
which would seem to be contrary to the DFDL 1.0 specification.
   




-- 
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