mbeckerle commented on PR #918:
URL: https://github.com/apache/daffodil/pull/918#issuecomment-1397207221

   Let me opine about this for a sec and I think the right thing to do will 
emerge.
   
   DFDL didn't want to allow 'bits' for some things to both make 
implementations not have to agonize of features nobody would need, and to avoid 
users causing themselves grief. E.g., if we only want to support IEEE floats on 
byte boundaries then restricting xs:float to not have length units 'bits' makes 
some sense.
   
   What we have learned is that data format spec documents often pick one way 
of expressing length, e.g., bits, and stick with it. When creating a DFDL 
schema it is helpful to use the units that are in the spec document, even if 
the usage is restricted to multiples of 8 bits long.  So it is convenient in 
some cases to say dfdl:lengthUnits='bits' even for types where bits makes no 
sense like xs:float. 
   
   So for that reason, I think Daffodil never implemented checks to enforce 
what can have length units bits.
   
   But, to the letter of the DFDL spec, length units 'bits' isn't allowed, so 
not portble.
   
   So I think we want a tunable that says to warn on this usage (which can be 
suppresed), and a tunable to allow/disallow length units bits - i.e., cause it 
to be an SDE. 
   
   This would apply to all the types where we allow bits, but the DFDL spec 
does not. 
   Including hexBinary, float, double, decimal, integer, nonNegativeInteger 
(assuming I have the right list).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to