You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Dr. Roger L Costello" <co...@mitre.org> on 2020/07/31 14:22:19 UTC

Mandatory versus optional properties?

Hi Folks,

I have a DFDL schema for a simple text data format, as illustrated with the following instance ('a', 'b', and 'c' are the data items):

a,b,c

In my schema I do not specify dfdl:occursCountKind. But I could specify dfdl:occursCountKind="fixed" without error.

In my schema I do specify dfdl:initiator="". If I do not specify it, an error is raised.

For this data format I do not have to specify occursCountKind, but in other data formats, I must specify it.

Lesson Learned: when creating a DFDL schema some properties must be specified while for others it is optional whether you specify them. Do you agree? Is "optional" the correct word? 

Is there some kind of map/table/graphic/whatever that indicates which properties are required and which are optional?

/Roger



Re: Mandatory versus optional properties?

Posted by "Beckerle, Mike" <mb...@tresys.com>.
There is an attempt at this in the DFDL Spec. It is being revised, but the Section titled "Property Precedence" is supposed to capture this. I'd give you a section number, but I'm working with newer drafts where the section numbers have changed.

The latest spec pre-drafts this is Appendix G now.

You don't need occursCountKind in your schema if you have nothing with minOccurs and maxOccurs not "1".

In general, the "occurs" properties aren't needed unless minOccurs/maxOccurs are not "1".

________________________________
From: Dr. Roger L Costello <co...@mitre.org>
Sent: Friday, July 31, 2020 10:22 AM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: Mandatory versus optional properties?

Hi Folks,

I have a DFDL schema for a simple text data format, as illustrated with the following instance ('a', 'b', and 'c' are the data items):

a,b,c

In my schema I do not specify dfdl:occursCountKind. But I could specify dfdl:occursCountKind="fixed" without error.

In my schema I do specify dfdl:initiator="". If I do not specify it, an error is raised.

For this data format I do not have to specify occursCountKind, but in other data formats, I must specify it.

Lesson Learned: when creating a DFDL schema some properties must be specified while for others it is optional whether you specify them. Do you agree? Is "optional" the correct word?

Is there some kind of map/table/graphic/whatever that indicates which properties are required and which are optional?

/Roger