So I'll assume you mean for each of these initiated elements to be optional. (Since otherwise the question is moot.)
Alas this is not legal DFDL. Each child of the sequence having initiated content must have a unique initiator itself. Often this is used with unordered sequences. On Tue, Apr 12, 2022 at 2:05 PM Roger L Costello <coste...@mitre.org> wrote: > Hi Folks, > > If each element has an initiator: > > <xs:element name="A" dfdl:initiator="A" ... > <xs:element name="B" dfdl:initiator="B" ... > <xs:element name="C" dfdl:initiator="C" ... > > then the xs:sequence that surrounds the elements should have > dfdl:initiatedContent="yes" > > <xs:sequence dfdl:initiatedContent="yes"> > <xs:element name="A" dfdl:initiator="A" ... > <xs:element name="B" dfdl:initiator="B" ... > <xs:element name="C" dfdl:initiator="C" ... > </xs:sequence> > > Okay, good. > > But suppose that B and C are inside an element: > > <xs:element name="A" dfdl:initiator="A" ... > <xs:element name="Wrapper"> > <xs:complexType> > <xs:sequence> > <xs:element name="B" dfdl:initiator="B" ... > <xs:element name="C" dfdl:initiator="C" ... > </xs:sequence> > </xs:complexType> > </xs:element> > > Is it legal to surround that whole thing with xs:sequence and > dfdl:initiatedContent="yes"? > > <xs:sequence dfdl:initiatedContent="yes"> > <xs:element name="A" dfdl:initiator="A" ... > <xs:element name="Wrapper"> > <xs:complexType> > <xs:sequence> > <xs:element name="B" dfdl:initiator="B" ... > <xs:element name="C" dfdl:initiator="C" ... > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:sequence> > > /Roger >