[ 
https://issues.apache.org/jira/browse/DAFFODIL-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Lawrence updated DAFFODIL-2369:
-------------------------------------
    Fix Version/s:     (was: 3.0.0)

> TDML language needs comment syntax in documentPart byte and bits
> ----------------------------------------------------------------
>
>                 Key: DAFFODIL-2369
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2369
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: TDML Runner
>    Affects Versions: 2.7.0
>            Reporter: Mike Beckerle
>            Priority: Major
>
> The tdml:documentPart type='byte' element only interprets hex digit 
> characters. The documentPart bits only interprets 1 and 0.
> For bits, this makes it tempting to put labels in the data like:
>  
> {code:java}
> <tdml:documentPart type="bits"><![CDATA[
> 01 flagByte1
> 1 bool2
> ]]></tdml:documentPart>
> {code}
> As soon as the label contains a 1 or 0, you are in trouble though, because 
> then that part of the label is getting pikced up as data. The above data is 
> 0111, the 2nd 1-bit is from the word 'flagByte1'. 
> Nevertheless, if you are careful, with bits you can get away with labels.
> But, then if you try to do the same thing for documentPart type byte, all 
> hell breaks loose.because letters a-f and 0-9 all are interperted as hex data 
> even though other characters like ghi....z get ignored.
> This is all way too fragile.
> Lesson learned is that we need the ability to put labels inside TDML 
> documentPart data areas.  Breaking them up into separate documentPart 
> elements so you can use standard XML Comments is not effective enough due to 
> the clutter involved.
> It is very important to be able to put labels into data.
> So we need to do two things:
> 1) make document part type 'byte' and 'bit' reject any character other than 
> 0-9a-fA-F (for byte) and 0,1 (for bits) that isn't whitespace.
> 2) support a comment syntax. I suggest the C/C++ conventions of // (to end of 
> line - which is going to require use of a CDATA block since otherwise the 
> line-endings are fungible by XML) or the /* */ convention.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to