Alot of this is more opinion and best practices, and likely relies
heavily on what the specification of the data says and what the person
wants the resulting infoset to look like. So I could see any of those as
valid. Though, perspective #3 is, to me, the least appealing since it
models syntax as data. This can be useful in some cases, but often just
makes things more complicated and hard to use.

Annother perspective is that the label is an initiator or "tag" for the
message, e.g.

  <xs:element name="dear_sir" type="xs:string"
    dfdl:initiator="Dear%SP;Sir:" ... />

Which would yield an infoset like:

  <really-simple-format>
    <dear_sir>Thank you for your response.</dir_sir>
  </really-simple-format>

- Steve

On 11/13/18 2:45 PM, Costello, Roger L. wrote:
> Hello DFDL community,
> 
> I have a simple data format:
> 
>       Label: Message
> 
> Here is an example data:
> 
>       Dear Sir: Thank you for your response.
> 
> How to characterize the form of that data format? I can think of three 
> different perspectives:
> 
> Perspective #1: There is a sequence of strings, separated by a colon.
> 
> Perspective #2: There is a label terminated by a colon, followed by a message.
> 
> Perspective #3: There is a label (no colon in it), a colon, and a message.
> 
> The DFDL Schema is designed differently, depending on the perspective. And, 
> the XML that is generated differs, depending on the perspective. For example, 
> the first two perspectives might yield this XML:
> 
> <really-simple-format>
>   <label>Dear Sir</label>
>   <message>Thank you for your response.</message>
> </really-simple-format>
> 
> Whereas the last perspective might yield this XML:
> 
> <really-simple-format>
>   <label>Dear Sir</label>
>   <colon>:</colon>
>   <message>Thank you for your response.</message>
> </really-simple-format>
> 
> Question: Can you think of any other perspectives? 
> 
> /Roger
> 

Reply via email to