<br><font size=2 face="sans-serif">There are of course alternatives. </font>
<br>
<br><font size=2 face="sans-serif">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. </font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">E.g., suppose the length of the longest
variant is 258 bytes.</font>
<br>
<br><font size=2 face="sans-serif"><sequence dfdl:lengthKind="explicit"
dfdl:length="258" dfdl:lengthUnits="bytes" dfdl:applies="hereOnly"></font>
<br><font size=2 face="sans-serif"> <choice></font>
<br><font size=2 face="sans-serif"> .....</font>
<br><font size=2 face="sans-serif"> </choice></font>
<br><font size=2 face="sans-serif"></sequence></font>
<br>
<br><font size=2 face="sans-serif">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. </font>
<br>
<br><font size=2 face="sans-serif">...mikeb</font>
<br>
<br>
<br><font size=2 face="sans-serif">Mike Beckerle<br>
STSM, Architect, Scalable Computing<br>
IBM Software Group<br>
Information Platform and Solutions<br>
Westborough, MA 01581<br>
direct: voice and FAX 508-599-7148<br>
assistant: Pam Riordan <br>
priordan@us.ibm.com
<br>
508-599-7046<br>
<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Steve Hanson/UK/IBM@IBMGB</b></font>
<p><font size=1 face="sans-serif">11/16/2007 11:24 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Mike Beckerle/Worcester/IBM</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">dfdl-wg@ogf.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [DFDL-WG] Grammar as adapted to
infoset</font><a href=Notes://D01ML259/85256FDB00077D54/38D46BF5E8F08834852564B500129B2C/408F4D595F0B43C18025738F0001F09B>Link</a></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br><font size=2 face="sans-serif">Hi Mike</font>
<br>
<br><font size=2 face="sans-serif">One extra thought post-call, caused
by thinking about the <b><i>FinalUnused</i></b> 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 <b><i>FinalUnused</i></b>)?</font>
<br><font size=2 face="sans-serif"><br>
Regards, Steve<br>
<br>
Steve Hanson<br>
WebSphere Message Brokers<br>
Hursley, UK<br>
Internet: smh@uk.ibm.com<br>
Phone (+44)/(0) 1962-815848</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Mike Beckerle <beckerle@us.ibm.com></b>
</font>
<br><font size=1 face="sans-serif">Sent by: dfdl-wg-bounces@ogf.org</font>
<p><font size=1 face="sans-serif">10/11/2007 00:16</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">dfdl-wg@ogf.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[DFDL-WG] Grammar as adapted to infoset</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
I took a crack at this. I ripped it out of the main document for faster
review/turnaround.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I think this matches the latest infoset email diagram.</font><font size=3>
<br>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
Mike Beckerle<br>
STSM, Architect, Scalable Computing<br>
IBM Software Group<br>
Information Platform and Solutions<br>
Westborough, MA 01581<br>
direct: voice and FAX 508-599-7148<br>
assistant: Pam Riordan <br>
priordan@us.ibm.com
<br>
508-599-7046<br>
</font><tt><font size=2>--<br>
dfdl-wg mailing list<br>
dfdl-wg@ogf.org<br>
http://www.ogf.org/mailman/listinfo/dfdl-wg</font></tt>
<br>
<br>