[DFDL-WG] Schema definition rule for alignment

Tim Kimber KIMBERT at uk.ibm.com
Fri Jun 18 09:38:29 CDT 2010


When alignmentUnits='bits', the rule highlighted below looks rather hard 
to justify. 
We should either
a) remove the rule entirely and allow any postiive integer > 1 or
b) make the rule apply only when alignmentUnits='bytes'
I favour a) because it's less work for an implementer.

alignment
Non-negative integer or 'implicit'
A non-negative number that gives the alignment required for the beginning 
of the item. If alignment is required then the size of the AlignmentFill 
grammar region will be non-zero if the item must be aligned to a boundary.
‘implicit' specifies that the natural alignment for the representation 
type is used. See the table of implicit alignments Table 11 Implicit 
Alignment in bits  If alignment is 'implicit' then alignmentUnits is 
ignored.
Values are usually 1, 2, 4, 8, 16 to match memory word alignment 
boundaries, 4096 to match page alignment boundaries. However, any 
non-negative integer power of 2 is allowed.
Annotation: dfdl:element, dfdl:simpleType, dfdl:sequence, dfdl:choice, 
dfdl:group
alignmentUnits
Enum
Valid values are ‘bits’ or ‘bytes’
Scales the alignment so alignment can be specified in either units of bits 
or units of bytes.
Annotation: dfdl:element, dfdl:simpleType, dfdl:sequence, dfdl:choice, 
dfdl:group
 
regards,

Tim Kimber, Common Transformation Team,
Hursley, UK
Internet:  kimbert at uk.ibm.com
Tel. 01962-816742 
Internal tel. 246742






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/dfdl-wg/attachments/20100618/2534183b/attachment.html 


More information about the dfdl-wg mailing list