<br><font size=2 face="sans-serif">Hi Martin, </font>
<br>
<br><font size=2 face="sans-serif">Great to have you chime in on this.</font>
<br>
<br><font size=2 face="sans-serif">The difficulty I have is that the XSD
&quot;logical&quot; types hexBinary and base64Binary suggest a representation.
Given this I think it is better to eliminate the crazy combinations of
hexBinary &quot;logical&quot; type with base64 physical and the other way
round. &nbsp;The XML formalisms like the PSVI already suggest that the
logical data for hexBinary and base64Binary are the same binary bytes,
not the encoded strings. </font>
<br>
<br><font size=2 face="sans-serif">Next isue is do we need to support hex
and base64 representation text encodings or not. It has been suggested
that we can leave this out, at least for V1.0 of DFDL. Obviously there
are multi-layer formats (like MIME), which make heavy use of encoded data,
but for V1.0 of DFDL describing these multi-layer encodings in a single
schema is already something we're putting off. </font>
<br>
<br><font size=2 face="sans-serif">So assuming we put off encodings, &nbsp;at
that point you'd have two identical types, i.e., there'd be no difference
in DFDL between what xs:hexBinary and xs:base64Binary would mean, in which
case it is conservative for us to leave one out, and base64 generates confusion
by name alone so I'd have to pick that one.</font>
<br>
<br><font size=2 face="sans-serif">So you arrive at &nbsp;having only hexBinary
and only with binary, not text, representation. </font>
<br>
<br><font size=2 face="sans-serif">Minimalist, but probably sufficient.</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>&quot;Westhead, Martin
(Martin)&quot; &lt;westhead@avaya.com&gt;</b> </font>
<p><font size=1 face="sans-serif">11/19/2007 02:13 PM</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@IBMUS, &quot;Steve
Hanson&quot; &lt;smh@uk.ibm.com&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">&lt;dfdl-wg@ogf.org&gt;</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] DFDL hexBinary and base64Binary</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 color=#000080 face="Arial">I am way out of the loop here,
but I felt motivated to throw in a few cents on this discussion.</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">As far as scope goes, it seems
to me a reasonable goal to consider would be to include all the primitive
types of XML Schema as in scope. That would suggest that hexBinary and
base64 should be included.</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">Regarding implementation, what
concerns me about the discussion is the confusion between data model and
representation that I seem to be hearing. (Perhaps I am bringing this to
the discussion in which case please set me straight).</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">The way it looks to me is that
when you specify the XML Schema “type” in the DFDL document you are specifying
the data model, or another way to put it is that you are specifying the
form of the XML document that would be output if your DFDL parser were
producing a document. This should be separated from the discussion of the
representation of the data that you are reading in.</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">So what I expect is that there
are three different data models for this kind of data:</font>
<br><font size=2 face="sans-serif">1. &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#000080 face="Arial">Sequence
of bytes</font>
<br><font size=2 face="sans-serif">2. &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#000080 face="Arial">hexBinary</font>
<br><font size=2 face="sans-serif">3. &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#000080 face="Arial">base64</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">And there are three different
underlying representations of the data that could be read from:</font>
<br><font size=2 face="sans-serif">1. &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#000080 face="Arial">bytes</font>
<br><font size=2 face="sans-serif">2. &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#000080 face="Arial">bin
hex</font>
<br><font size=2 face="sans-serif">3. &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=#000080 face="Arial">base
64</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">And ideally you should be able
to choose the model and the data separately (IMO).</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">Am I making sense?</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<br><font size=2 color=#000080 face="Arial">Martin</font>
<br><font size=2 color=#000080 face="Arial">&nbsp;</font>
<div align=center>
<br>
<hr></div>
<br><font size=2 face="Tahoma"><b>From:</b> dfdl-wg-bounces@ogf.org [mailto:dfdl-wg-bounces@ogf.org]
<b>On Behalf Of </b>Mike Beckerle<b><br>
Sent:</b> Monday, November 19, 2007 8:34 AM<b><br>
To:</b> Steve Hanson<b><br>
Cc:</b> dfdl-wg@ogf.org<b><br>
Subject:</b> Re: [DFDL-WG] DFDL hexBinary and base64Binary</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 face="sans-serif"><br>
Steve, (&amp; team)</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
What you are suggesting is the simplest of the simple. No 'text' representation
at all, &nbsp;Users who have actual hexidecimal strings in their data can
always model them as either strings or if they're small enough, integers
in base 16 text.</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
In this case the only difference between hexBinary and base64Binary is
what happens if you coerce the infoset value to a string and this is into
the API space which is outside the scope of DFDL.</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="sans-serif"><br>
To me this suggests that we leave out base64Binary entirely for V1.0 to
avoid confusion (it will be confusing to people to explain that hexBinary
and base64Binary are synonymous in DFDL)</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="sans-serif"><br>
So the net functionality for DFDL v1.0 would be this only:</font><font size=3 face="Times New Roman">
</font>
<p>
<table border=4 width=100%>
<tr valign=top>
<td width=5%>
<div align=center><font size=1 face="Arial"><b><i>type</i></b></font></div>
<td width=47%>
<div align=center><font size=1 face="Arial"><b><i>representation</i></b></font></div>
<td width=14%>
<div align=center><font size=1 face="Arial"><b><i>lengthKind</i></b></font></div>
<td width=10%>
<div align=center><font size=1 face="Arial"><b><i>resulting length (in
bytes)</i></b></font></div>
<td width=22%>
<div align=center><font size=1 face="Arial"><b><i>other</i></b></font></div>
<tr valign=top>
<td><font size=2 face="Arial">xs:hexBinary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">binary</font><font size=3 face="Times New Roman">
<br>
(note: required - If 'text' specified it causes a schema definition error.
This reserves the 'text' behavior for possible future use.) </font>
<td><font size=2 face="Arial">implicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">xs:length facet </font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">explicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">dfdl:length </font>
<td><font size=1 face="Arial">Validation: xs:length facet must be equal
to resulting length in bytes &nbsp;</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">(TBD: similar range checks on xs:minLength,
xs:maxLength) </font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">endOfData or delimited or nullTerminated</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">variable</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="Arial">Validation: xs:length facet must be equal
to resulting length in bytes &nbsp;</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">(TBD: similar range checks on xs:minLength,
xs:maxLength) </font></table>
<br><font size=3 face="Times New Roman"><br>
<br>
</font><font size=2 face="sans-serif"><br>
I'm very happy with this for V1.0.</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="sans-serif"><br>
Any further comments or should we go with this for V1.0?</font><font size=3 face="Times New Roman">
<br>
</font><font size=2 face="sans-serif"><br>
...mikeb</font><font size=3 face="Times New Roman"> <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><font size=3 face="Times New Roman"><br>
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=41%><font size=1 face="sans-serif"><b>Steve Hanson &lt;smh@uk.ibm.com&gt;</b>
<br>
Sent by: dfdl-wg-bounces@ogf.org</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="sans-serif">11/19/2007 10:23 AM</font><font size=3 face="Times New Roman">
</font>
<td width=58%>
<br>
<table width=100%>
<tr valign=top>
<td width=12%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=87%><font size=1 face="sans-serif">dfdl-wg@ogf.org</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=3 face="Times New Roman">&nbsp;</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] DFDL hexBinary and base64Binary</font></table>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=50%><font size=3 face="Times New Roman">&nbsp;</font>
<td width=50%><font size=3 face="Times New Roman">&nbsp;</font></table>
<br></table>
<br><font size=3 face="Times New Roman"><br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
My view: The logical type is binary, so the data in the information item
is binary, the length facets should always deal in bytes, and validation
checks the length of the binary data in bytes.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
From the above, of the two simplifications below, I would rather disallow
the text representations of xs:hexBinary and xs:base64Binary. Fyi MRM today
<br>
- does not support text reps for binary <br>
- has not had such a request from users <br>
- uses length/minLength/maxLength facets to validate binary field length
post-parse</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
- uses length/maxLength to populate the default for the physical length.
<br>
<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><font size=3 face="Times New Roman">
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=46%><font size=1 face="sans-serif"><b>Mike Beckerle &lt;beckerle@us.ibm.com&gt;</b>
<br>
Sent by: dfdl-wg-bounces@ogf.org</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="sans-serif">16/11/2007 23:09</font><font size=3 face="Times New Roman">
</font>
<td width=53%><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=13%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=86%><font size=1 face="sans-serif">dfdl-wg@ogf.org</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<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] DFDL hexBinary and base64Binary</font></table>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=50%><font size=3 face="Times New Roman">&nbsp;</font>
<td width=50%><font size=3 face="Times New Roman">&nbsp;</font></table>
<br></table>
<br><font size=3 face="Times New Roman"><br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
<br>
I'm trying to wrap up the opaque/hexBinary/base64Binary topic.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
I need opinions on this discussion.</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
Currently we have a property, dfdl:binaryType </font><font size=2 face="Arial"><b>:</b></font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><b><br>
<br>
Properties Specific to Binary Types (hexBinary, base64Binary)</b></font><font size=3 face="Times New Roman">
</font>
<p>
<table border=4 width=100%>
<tr valign=top>
<td width=18%><font size=1 face="Arial"><i>Property Name</i></font><font size=3 face="Times New Roman">
</font>
<td width=81%><font size=1 face="Arial"><i>Description</i></font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td><font size=1 face="Arial">binaryType</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="Arial">Enum</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">This specifies the encoding method for the
binary. &nbsp;</font><font size=3 face="Times New Roman"> </font>
<p><font size=1 face="Arial">Valid values are ‘unspecified’, ‘hexBinary’,
‘base64Binary’, ‘uuencoded’</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">Annotation: dfdl:element (simple type ‘binary’,
‘opaque’)</font></table>
<p><font size=2 face="sans-serif"><br>
<br>
This property speaks to what kinds of representations can we interpret
and construct logical hexbinary values from? (similarly base64Binary)</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
I believe the above is not clear, and causes issues with the xs:length
facet of XSD.</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
I propose the 4 tables below which describe the 4 cases:</font><font size=3 face="Times New Roman">
</font><font size=2 face="sans-serif"><br>
<br>
hexbinary - binary</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
hexbinary - text</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
base64binary - binary</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
base64binary - text</font><font size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
<br>
I have specified these so that the meaning of the xs:length facet is always
interpreted exactly as in XSD. It always refers to the number of bytes
of the unencoded binary data, and never to the number of characters in
the encoded form.</font><font size=3 face="Times New Roman"> </font>
<p>
<table border=4 width=100%>
<tr valign=top>
<td width=9%>
<div align=center><font size=1 face="Arial"><b><i>type</i></b></font></div>
<td width=9%>
<div align=center><font size=1 face="Arial"><b><i>representation</i></b></font></div>
<td width=27%>
<div align=center><font size=1 face="Arial"><b><i>lengthKind</i></b></font></div>
<td width=16%>
<div align=center><font size=1 face="Arial"><b><i>resulting length (in
bytes)</i></b></font></div>
<td width=37%>
<div align=center><font size=1 face="Arial"><b><i>other</i></b></font></div>
<tr valign=top>
<td><font size=2 face="Arial">xs:hexBinary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">binary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">implicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">xs:length facet </font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">explicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">dfdl:length </font>
<td><font size=1 face="Arial">Validation: xs:length facet must be equal
to resulting length in bytes &nbsp;</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">(TBD: similar range checks on xs:minLength,
xs:maxLength) </font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">endOfData or delimited or nullTerminated</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">variable</font><font size=3 face="Times New Roman">
</font>
<td><font size=3 face="Times New Roman">&nbsp;</font></table>
<p><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<table border=4 width=100%>
<tr valign=top>
<td width=7%>
<div align=center><font size=1 face="Arial"><b><i>type</i></b></font></div>
<td width=7%>
<div align=center><font size=1 face="Arial"><b><i>representation</i></b></font></div>
<td width=19%>
<div align=center><font size=1 face="Arial"><b><i>lengthKind</i></b></font></div>
<td width=15%>
<div align=center><font size=1 face="Arial"><b><i>resulting length (in
characters)</i></b></font></div>
<td width=49%>
<div align=center><font size=1 face="Arial"><b><i>other</i></b></font></div>
<tr valign=top>
<td><font size=2 face="Arial">xs:hexBinary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">text</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">implicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">2 * xs:length facet</font><font size=3 face="Times New Roman">
</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">explicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">dfdl:length</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="Arial">Validation: xs:length facet &nbsp;* 2 must
be equal to resulting character length (after removing all non-hex characters)</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">&nbsp;(TBD: similar range checks on xs:minLength,
xs:maxLength) </font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">endOfData, delimited, nullTerminated</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">Variable</font><font size=3 face="Times New Roman">
</font>
<td><font size=3 face="Times New Roman">&nbsp;</font></table>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<table border=4 width=100%>
<tr valign=top>
<td width=11%>
<div align=center><font size=1 face="Arial"><b><i>type</i></b></font></div>
<td width=9%>
<div align=center><font size=1 face="Arial"><b><i>representation</i></b></font></div>
<td width=26%>
<div align=center><font size=1 face="Arial"><b><i>dfdl:lengthKind</i></b></font></div>
<td width=15%>
<div align=center><font size=1 face="Arial"><b><i>resulting length (in
bytes)</i></b></font></div>
<td width=36%>
<div align=center><font size=1 face="Arial"><b><i>other</i></b></font></div>
<tr valign=top>
<td><font size=2 face="Arial">xs:base64Binary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">binary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">implicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">xs:length facet </font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">explicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">dfdl:length </font>
<td><font size=1 face="Arial">Validation: xs:length facet must be equal
to resulting length in bytes </font>
<p><font size=1 face="Arial">(TBD: similar range checks on xs:minLength,
xs:maxLength) </font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">endOfData or delimited or nullTerminated</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">variable</font><font size=3 face="Times New Roman">
</font>
<td><font size=3 face="Times New Roman">&nbsp;</font></table>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<table border=4 width=100%>
<tr valign=top>
<td width=8%>
<div align=center><font size=1 face="Arial"><b><i>type</i></b></font></div>
<td width=6%>
<div align=center><font size=1 face="Arial"><b><i>representation</i></b></font></div>
<td width=18%>
<div align=center><font size=1 face="Arial"><b><i>lengthKind</i></b></font></div>
<td width=14%>
<div align=center><font size=1 face="Arial"><b><i>resulting length (in
characters)</i></b></font></div>
<td width=51%>
<div align=center><font size=1 face="Arial"><b><i>other</i></b></font></div>
<tr valign=top>
<td><font size=2 face="Arial">xs:base64Binary</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">text</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">implicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">8/6 * xs:length facet</font><font size=3 face="Times New Roman">
</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">explicit</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">dfdl:length</font><font size=3 face="Times New Roman">
</font>
<td><font size=1 face="Arial">Validation: xs:length facet &nbsp;* &nbsp;8/6
must be equal to resulting character length (after removing all non-base64-encoding
characters)</font><font size=3 face="Times New Roman"> </font>
<p><font size=1 face="Arial">(TBD: similar range checks on xs:minLength,
xs:maxLength) </font>
<tr valign=top>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=3 face="Times New Roman">&nbsp;</font>
<td><font size=2 face="Arial">endOfData, delimited, nullTerminated</font><font size=3 face="Times New Roman">
</font>
<td><font size=2 face="Arial">Variable</font><font size=3 face="Times New Roman">
</font>
<td><font size=3 face="Times New Roman">&nbsp;</font></table>
<p><font size=2 face="sans-serif">Looking at the above, one way to simplify
things quite a bit is to disallow the xs:length and xs:minLength and xs:maxLength
&nbsp;facet on hexBinary and base64Binary types in DFDL schemas.</font><font size=3 face="Times New Roman">
</font>
<p><font size=2 face="sans-serif">Then the implicit lengthKind goes away,
and the complex validation check for the xs:length facet goes away. &nbsp;I
recommend this.</font><font size=3 face="Times New Roman"> </font>
<p><font size=2 face="sans-serif">Another simplification alternative is
to disallow representation text altogether, but I am concerned that peopel
with data that does contain hex or base64 data will naturally want to use
these types to model it. &nbsp;I don't recommend this.</font><font size=3 face="Times New Roman">
</font>
<p><font size=2 face="sans-serif">...mikeb</font><font size=3 face="Times New Roman">
</font>
<p><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; priordan@us.ibm.com <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 508-599-7046</font><font size=2 face="Courier New"><br>
--<br>
dfdl-wg mailing list<br>
dfdl-wg@ogf.org<br>
http://www.ogf.org/mailman/listinfo/dfdl-wg</font><font size=3 face="Times New Roman">
<br>
<br>
</font>
<div align=center>
<br>
<hr></div>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font><font size=3 face="Times New Roman"> </font>
<p><font size=3 face="Times New Roman"><br>
<br>
</font><font size=3 face="sans-serif"><br>
<br>
</font><font size=3 face="Times New Roman"><br>
<br>
</font>
<div align=center>
<br>
<hr></div>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font><font size=3 face="Times New Roman"> </font>
<p><font size=3 face="Times New Roman"><br>
<br>
</font><font size=3 face="sans-serif"><br>
</font><font size=2 face="Courier New"><br>
--<br>
 dfdl-wg mailing list<br>
 dfdl-wg@ogf.org<br>
 http://www.ogf.org/mailman/listinfo/dfdl-wg</font><font size=3 face="Times New Roman">
</font>
<p>