<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 &nbsp;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">&lt;sequence dfdl:lengthKind=&quot;explicit&quot;
dfdl:length=&quot;258&quot; dfdl:lengthUnits=&quot;bytes&quot; dfdl:applies=&quot;hereOnly&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &lt;choice&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.....</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp;&lt;/choice&gt;</font>
<br><font size=2 face="sans-serif">&lt;/sequence&gt;</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 &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;priordan@us.ibm.com
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;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> &nbsp;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. &nbsp;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 &lt;beckerle@us.ibm.com&gt;</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 &nbsp; <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; priordan@us.ibm.com
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 508-599-7046<br>
</font><tt><font size=2>--<br>
 &nbsp;dfdl-wg mailing list<br>
 &nbsp;dfdl-wg@ogf.org<br>
 &nbsp;http://www.ogf.org/mailman/listinfo/dfdl-wg</font></tt>
<br>
<br>