nerdexam
IBM

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

C2180-404 question #23 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)
  • A
    3% (1)
  • B
    16% (5)
  • C
    6% (2)
  • D
    75% (24)

Community Discussion

No community discussion yet for this question.

Full C2180-404 Practice