Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.5.0
-
None
-
None
Description
In either 3.4.0 or 3.5.0-SNAPSHOT the property dfdlx:emptyElementParsePolicy='treatAsAbsent' does not seem to be working at least for empty elements of complex type.
<element name="horizontalVisibility" minOccurs="0" dfdlx:emptyElementParsePolicy="treatAsAbsent"> <complexType> <sequence> <element name="visibility" type="w:visibilityType" minOccurs="0"/> <element name="directionalVariationInVisibility" minOccurs="0"> <complexType> <choice> <element name="noDirectionalVariation" dfdl:initiator="%WSP+;NDV NDV" type="w:zlString"/> <sequence dfdl:initiator="%WSP+; %ES;"> <element name="minimumVisibility" type="w:uint4"/> <element name="direction" type="w:directionEnum"/> </sequence> </choice> </complexType> </element> </sequence> </complexType> </element>
The enclosing parent element horizontalVisibility is optional. If all content within it is not present, the property dfdlx:emptyElementParsePolicy="treatAsAbsent" means that this empty complex type element should NOT be added to the infoset.
Daffodil does have tests for emptyElementParsePolicy, but perhaps the complex-type element case is not included?
See also DAFFODIL-2824.