variableLength means the storage taken
depends on the alternative selected, Fixed length means shorter alternatives
are padded to the length of the longest. unresolvable means what it means
now, which is that you can't tell which variant it is (which also implies
the storage required is fixed length).
...mikeb
Mike Beckerle
STSM, Architect, Scalable Computing
IBM Software Group
Information Platform and Solutions
Westborough, MA 01581
direct: voice and FAX 508-599-7148
assistant: Pam Riordan
priordan@us.ibm.com
508-599-7046
Or allow xs:choice to carry dfdl:length
& dfdl:lengthKind. Then lengthKind="implicit" could
mean the length is the longest of the modelled alternatives.
Regards, Steve
Steve Hanson
WebSphere Message Brokers
Hursley, UK
Internet: smh@uk.ibm.com
Phone (+44)/(0) 1962-815848
E.g., a hidden or non-hidden field which
is a byte array or hexBinary to absorb the padding bytes at the ends of
the shorter variants. Or one could put trailing skip bytes on the last
element or group of each of the shorter variants.
One can also encapsulate the whole choice
in a sequence whose length is the fixed maximum length. This is my personal
favorite, since it uses the FinalUnused that is already in the grammar.
E.g., suppose the length of the longest
variant is 258 bytes.
The only thing I don't like about this
is I don't have a way to express the length other than to hard-code the
constant 258, but since tooling would typically put this in based on Cobol
descriptors or other information I don't mind so much.
...mikeb
Mike Beckerle
STSM, Architect, Scalable Computing
IBM Software Group
Information Platform and Solutions
Westborough, MA 01581
direct: voice and FAX 508-599-7148
assistant: Pam Riordan
priordan@us.ibm.com
508-599-7046
One extra thought post-call, caused
by thinking about the FinalUnused part of a sequence.
Some fixed length choices have a rule that each branch of the choice must
be of equal length. This results in unused bytes for branches shorter than
the maximum. In a bitstream instance, a user will see these bytes.
Perhaps the grammar should acknowledge their existence, even if there are
no DFDL properties to express the bytes (like FinalUnused)?
Regards, Steve
Steve Hanson
WebSphere Message Brokers
Hursley, UK
Internet: smh@uk.ibm.com
Phone (+44)/(0) 1962-815848
Mike Beckerle <beckerle@us.ibm.com> Sent by: dfdl-wg-bounces@ogf.org
10/11/2007 00:16
To
dfdl-wg@ogf.org
cc
Subject
[DFDL-WG] Grammar as adapted to infoset
I took a crack at this. I ripped it out of the main document for faster
review/turnaround.
I think this matches the latest infoset email diagram.
Mike Beckerle
STSM, Architect, Scalable Computing
IBM Software Group
Information Platform and Solutions
Westborough, MA 01581
direct: voice and FAX 508-599-7148
assistant: Pam Riordan
priordan@us.ibm.com
508-599-7046 --
dfdl-wg mailing list
dfdl-wg@ogf.org
http://www.ogf.org/mailman/listinfo/dfdl-wg