Hello DFDL community,
My input contains an array of fruit values, separator, array of wood values,
separator, and an array of color values:
Apple
Banana
Orange
Watermelon
Grapes
Cantaloupe
----
Oak
Pine
Maple
----
Red
Green
Purple
Blue
I thought this DFDL schema would do the trick:
<xs:element name="input">
<xs:complexType>
<xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
<xs:element name="fruit" type="xs:string" maxOccurs="unbounded"
dfdl:occursCountKind="implicit" />
<xs:sequence dfdl:hiddenGroupRef="separatorGroup" />
<xs:element name="wood" type="xs:string" maxOccurs="unbounded"
dfdl:occursCountKind="implicit" />
<xs:sequence dfdl:hiddenGroupRef="separatorGroup" />
<xs:element name="color" type="xs:string" maxOccurs="unbounded"
dfdl:occursCountKind="implicit" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:group name="separatorGroup">
<xs:sequence>
<xs:element name="separator" type="xs:string">
<xs:annotation>
<xs:appinfo source="http://www.ogf.org/dfdl/">
<dfdl:assert test="{. eq '----'}" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>
Sadly, that produces this error:
[error] Schema Definition Error: occursCountKind='implicit' with unbounded
maxOccurs only allowed for last element of a positional sequence
What is the correct way to express an array of arrays?
/Roger