You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by Roger L Costello <co...@mitre.org> on 2022/04/12 18:05:00 UTC
A question about dfdl:initatedContent="yes"
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
Re: A question about dfdl:initatedContent="yes"
Posted by Mike Beckerle <mb...@apache.org>.
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 <co...@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
>