C2180-404 · Question #23
The DocType field in the record identifies the document type and contains PO when the record is for a purchase order and ACK when it is an acknowledgement. The format of each record is the same…
The correct answer is D. Change theMinOccursproperty to 0 (zero) forShipTypeto make it an optional field. See the full explanation below for the reasoning.
Question
The DocType field in the record identifies the document type and contains PO when the record is for a purchase order and ACK when it is an acknowledgement. The format of each record is the same except for the ShipDate field. When the document type is ACK, ShipDate is in the record. When the document type is PO, ShipDate is not in the record. What change can the developer make to the DFDL model to handle the differences in the record format and prevent parsing errors when parsing a file that contains both types of records?
Exhibit
Options
- AAdd a choice element before theShipTypeelement
- BAdd an asset toShipDatethat testsDocType=ACK
- CAdd a discriminator toShipDatethat testsDocType=ACK
- DChange theMinOccursproperty to 0 (zero) forShipTypeto make it an optional field
How the community answered
(32 responses)- A3% (1)
- B16% (5)
- C6% (2)
- D75% (24)
Community Discussion
No community discussion yet for this question.
