You are correct. The property combining logic isn't (or wasn't) enforcing that the nil-related properties are only allowed on elements.
Personally I think this is a mistake. But it is what the spec says, so we should change our tests to comply. ________________________________ From: Steve Lawrence <[email protected]> Sent: Friday, June 7, 2019 11:21:40 AM To: [email protected] Subject: dfdl:nil* properties on xs:simpleType allowed? In working on DAFFODIL_2096 (Add dfdlx extensions prefix), I sort of ran into issues with short form properties not being validated (DAFFODIL-598) and think I have come across a small update to the XML Schema for DFDL to re-enable schema validation of dfdl attributes, but still allow attributes from other namespaces. I've got the change in and it has found many cases of incorrect properties in our tests, so I think this is going to be a big help. However, in one test case I found something that we support but I think contradicts the spec. We have something like this: <xs:simpleType name="type" dfdl:nilValue="NIL" dfdl:lengthKind="delimited"> <xs:restriction base="xs:string"/> </xs:simpleType> <xs:element name="e1" type="ex:type" nillable="true" /> In this example, dfdl:nilValue is provided on the xs:simpleType. The specification from https://daffodil.apache.org/docs/dfdl/ says this about dfdl:nilValue and other dfdl:nil* properties: Annotation: dfdl:element(simpleType) I believe this syntax means the property is valid for dfdl:element's of type simpleType, but not the xs:simpleType element itself. Is this correct? This is is what our XML Schema for DFDL enforces, but since it's not currently enforce we do support getting the nilValue from the xs:simpleType element. So should the test be changed to move the nilValue property to the xs:element or should the XML schema for DFDL be updated to allow the property on xs:simpleType's?
