You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Costello, Roger L." <co...@mitre.org> on 2019/07/17 17:51:09 UTC

Daffodil 2.4.0 says: Attribute 'dfdl:occursKind' is not allowed to appear in element 'xs:element'.

Hello DFDL community,

The below DFDL schema works perfectly in 2.3.0 but when I run it in 2.4.0 I get this error message:

Attribute 'dfdl:occursKind' is not allowed to appear in element 'xs:element'.

I checked the DFDL specification and it says that dfdl:occursKind must be used on an xs:element.

Is this a bug in the latest release of Daffodil?  /Roger

<xs:element name="input">
    <xs:complexType>
        <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
            <xs:element name="person" maxOccurs="unbounded" dfdl:occursKind="implicit" dfdl:initiator="Person:" nillable="true" dfdl:nilValue="%ES;" dfdl:nilValueDelimiterPolicy="initiator">
                <xs:complexType>
                    <xs:sequence dfdl:separator="," dfdl:separatorPosition="infix">
                        <xs:element name="name" type="xs:string" />
                        <xs:element name="age" type="xs:string" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>



Re: Daffodil 2.4.0 says: Attribute 'dfdl:occursKind' is not allowed to appear in element 'xs:element'.

Posted by "Beckerle, Mike" <mb...@tresys.com>.
You mean dfdl:occursCountKind.


Daffodil 2.4.0 now validates the short-form properties on elements. Prior versions of Daffodil did not, which means one could have misspelled property names like this and they would go undetected. Also one could have properties on constructs where they were being ignored without any error message or warning.


Once we added this short-form-validation feature, we found quite a few properties in the wrong places, and/or misspelled. Somehow the schemas were working anyway.

________________________________
From: Costello, Roger L. <co...@mitre.org>
Sent: Wednesday, July 17, 2019 1:51:09 PM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: Daffodil 2.4.0 says: Attribute 'dfdl:occursKind' is not allowed to appear in element 'xs:element'.


Hello DFDL community,



The below DFDL schema works perfectly in 2.3.0 but when I run it in 2.4.0 I get this error message:



Attribute 'dfdl:occursKind' is not allowed to appear in element 'xs:element'.



I checked the DFDL specification and it says that dfdl:occursKind must be used on an xs:element.



Is this a bug in the latest release of Daffodil?  /Roger



<xs:element name="input">
    <xs:complexType>
        <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
            <xs:element name="person" maxOccurs="unbounded" dfdl:occursKind="implicit" dfdl:initiator="Person:" nillable="true" dfdl:nilValue="%ES;" dfdl:nilValueDelimiterPolicy="initiator">
                <xs:complexType>
                    <xs:sequence dfdl:separator="," dfdl:separatorPosition="infix">
                        <xs:element name="name" type="xs:string" />
                        <xs:element name="age" type="xs:string" />
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>