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 2020/04/09 17:25:38 UTC

Properties versus meta-properties

Hi Folks,

I hope you will help me think this through. Or, tell me that I'm off track.

Data formats are specified by properties such as representation, encoding, separator, separatorPosition, and so forth. Properties are at the heart of DFDL. The essence of the DFDL specification is a listing of properties and their allowable values. 

The following property/value pairs might be specified for a data format:

	representation = text
	encoding = ASCII

Those property/value pairs apply to all the data items in the data format. Conversely, the following property/value pairs apply to just one data item:

	name = person 
 	lengthKind = explicit
 	length = {../num}
 	lengthUnits = characters

The first set of property/value pairs have an applies-to-all-data-items property. The applies-to-all-data-items property is a meta-property. The second set of property/value pairs have an applies-just-to-this-data-item property. Another meta-property! 

Do you agree? If yes, then what is the name of the applies-to-all-data-items meta-property? What is the name of the applies-just-to-this-data-item meta-property?

Any thoughts you might have on this would be greatly appreciated.

/Roger



Re: Properties versus meta-properties

Posted by "Beckerle, Mike" <mb...@tresys.com>.
The properties you are referring to as different... lengthKind, lengthUnits, etc. are very commonly put into scope over a whole schema file. I don't think of them as generally applying to only one thing.

The dfdl:length property is a little different because it is only used when the lengthKind is 'explicit'. However, it is still scoped the same way. It just normally doesn't appear in a default format over a whole schema file because it tends to vary a lot.  It is possible to put it in scope. The use case would be, for example, a whole bunch of different data layouts all of which are exactly 80 bytes long. In that case they could all be defined in a schema file where even the dfdl:length="80" property is scoped over the definitions.

'name' isn't a dfdl property. It's an attribute of some of the defining-form annotations, but it's not a property.

There are some properties that do not follow the ordinary scoping rules. dfdl:inputValueCalc and dfdl:outputValueCalc for example, cannot be put into scope. Nor can dfdl:choiceDispatchKey or dfdl:choiceBranchKey.


________________________________
From: Costello, Roger L. <co...@mitre.org>
Sent: Thursday, April 9, 2020 1:25 PM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: Properties versus meta-properties

Hi Folks,

I hope you will help me think this through. Or, tell me that I'm off track.

Data formats are specified by properties such as representation, encoding, separator, separatorPosition, and so forth. Properties are at the heart of DFDL. The essence of the DFDL specification is a listing of properties and their allowable values.

The following property/value pairs might be specified for a data format:

        representation = text
        encoding = ASCII

Those property/value pairs apply to all the data items in the data format. Conversely, the following property/value pairs apply to just one data item:

        name = person
         lengthKind = explicit
         length = {../num}
         lengthUnits = characters

The first set of property/value pairs have an applies-to-all-data-items property. The applies-to-all-data-items property is a meta-property. The second set of property/value pairs have an applies-just-to-this-data-item property. Another meta-property!

Do you agree? If yes, then what is the name of the applies-to-all-data-items meta-property? What is the name of the applies-just-to-this-data-item meta-property?

Any thoughts you might have on this would be greatly appreciated.

/Roger