Hi Folks,
Consider a data format which specifies that instance documents must contain a
sequence of 1 to 3 string data items and the data items are to be separated by
forward slashes. If there is no data for the third data item and the data
format specifies separatorSuppressionPolicy=trailingEmptyStrict, then this
instance is invalid because it has a trailing separator:
a/b/
Daffodil should throw an error with that instance, but doesn't.
On the other hand, if the data format specifies a sequence of 1 to 4 string
data items, then Daffodil throws an error on the above instance.
That is, Daffodil does not throw an error on the above instance with this
schema:
<xs:element name="file">
<xs:complexType>
<xs:sequence dfdl:separator="/" dfdl:separatorPosition="infix"
dfdl:separatorSuppressionPolicy="trailingEmptyStrict">
<xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="3" />
</xs:sequence>
</xs:complexType>
</xs:element>
But Daffodil does throw an error on the above instance with this schema:
<xs:element name="file">
<xs:complexType>
<xs:sequence dfdl:separator="/" dfdl:separatorPosition="infix"
dfdl:separatorSuppressionPolicy="trailingEmptyStrict">
<xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="4" />
</xs:sequence>
</xs:complexType>
</xs:element>
Is that a bug in Daffodil?
/roger