Hi Folks,

I am creating a DFDL schema for a data format that has a field whose value is a 
hyphen when no data is available and when data is available, then the field 
contains either an ISO datetime or a 3-letter month name. Here's how I 
specified the field:

<xs:element name="MyField" nillable="true" dfdl:nilValue="-">
    <xs:complexType>
        <xs:choice dfdl:choiceLengthKind="implicit">
            <xs:element name="DateTimeIso">
                <xs:complexType>
                    <xs:sequence>
                        ...
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="MonthName" type="xs:string" 
                dfdl:length="3" dfdl:lengthKind="explicit" />
        </xs:choice>
    </xs:complexType>
</xs:element>

When I run it, Daffodil gives this error message:

[error] Schema Definition Error: Nillable complex type elements can only have 
'%ES;' as their dfdl:nilValue property.

Is that an error in Daffodil? Or, is it an actual DFDL restriction? If the 
latter, why is there such a restriction? How do I work around this error?

/Roger

Reply via email to