<br><font size=2 face="sans-serif">Some interesting discussion on the hexBinary
and base64Binary.. Schema authors also had reservations on having these
2 types with same value space and considered a possibility of having one
binary type with encoding facet to specify hex and base64 which would have
been a much better solution. I am equally perplexed on the use case for
having pattern (and also enumeration) facet on the hexBinary and base64Binary
as the facet work on the lexical space.</font>
<br>
<br><font size=2 face="sans-serif">May be the conservative approach for
us is to treat these built-in schema type as is and only allow the
dfdl set of annotations pertaining to allowable facets.. </font>
<br>
<br><font size=2 face="sans-serif">By copy to Sandy - do you know of a
use case where pattern facet is used on hexBinary and base64Binary</font>
<br>
<br>
<br><font size=2 face="sans-serif">http://lists.w3.org/Archives/Public/www-xml-schema-comments/2001AprJun/0067.html</font>
<br>
<br><font size=2 face="sans-serif">Some excerpts from discussion</font>
<br>
<br><tt><font size=2>
There are two possible ways to fix this before
going to recommendation:<br>
<br>
1.
return to the CR status of a binary datatype with an<br>
encoding facet that could be either 'hex' or 'base64'. <br>
2.
eliminate one of hexBinary or base64Binary, and call the<br>
remaining type 'binary'. *Note that this is the most conservative<br>
decision*. The missing encoding could always be added back, but once<br>
released as an official recommendation parsers would be required to<br>
support both encodings for all time. <br>
<br>
</font></tt>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Suman Kalia<br>
IBM Toronto Lab<br>
WebSphere Business Integration Application Connectivity Tools <br>
Tel : 905-413-3923 T/L 969-3923<br>
Fax : 905-413-4850 T/L 969-4850<br>
Internet ID : kalia@ca.ibm.com</font>
<br><font size=1 color=#800080 face="sans-serif">----- Forwarded by Suman
Kalia/Toronto/IBM on 11/21/2007 11:50 AM -----</font>
<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">11/21/2007 11:08 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">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] OGF DFDL WG call today 2007-11-21</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
We may or may not achieve quorum today because of the US holiday tomorrow
and big travel day today.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I will join the call at 12noon US.ET, and if we have enough people by 12:05
then I'd like to discuss one or more of these topics</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
* hexBinary and base64Binary - I still find these confusing. <br>
* array prefix and suffix - just review resolution of this issue - leaving
out for now just to be conservative. Could put back in fairly easily.</font><font size=3>
</font><font size=2 face="sans-serif"><br>
* choiceType and length properties on xs:choice</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
My latest musings on hexBinary and base64Binary ....</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
E.g., XSD allows pattern and enumeration facets on these</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
<element name="aThing" type="base64Binary"
length="3" <br>
pattern="AAAA|////"
/></font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I think that pattern is a regexp for a base64 string matching 3 bytes of
zeros or 3 bytes of all ones, but my regexp syntax is no doubt incorrectly
escapified. ("A" is 6 bits of zero, "/" is 6 bits of
1 in base64).</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
To me this is marvelously confusing. It feels downright silly to allow
pattern and enumeration on these things. </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
I'd like to adopt the strictest possible sensible thing. <br>
- hexBinary only, binary representation only, no pattern or enumeration
facets supported or allowed for this type. </font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
There is still the issue of default/fixed.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
E.g., </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
<element name="unknownStuff" type="hexBinary"
fixed="F41306C0" dfdl:lengthKind="implicit" /></font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
The user specifies what the bytes are as a hex string, and since they said
it's hexBinary, they use hex to express the literal content. This is a
way to say "right here in the data there's this blob of stuff I don't
understand, but it always contains these data bytes". I've certainly
seen the need for this sort of thing. It's being ignored on input, but
on output it generates the fixed bytes of data so as to create valid output
even when you don't understand this part of the data format. In fact, the
cases I've seen are using this to skip over decimal numbers the wierd format
of which isn't understood. The above pattern could be one or more decimal
numbers in strange formats. </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
However, I can see the slippery slope from here to allowing pattern and
enumeration facets, so I'd be happy ruling out use of default and fixed
on hexBinary type also, just to make it even simpler.</font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
Also, this element achieves the same end using our "%" escapes
in strings.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
<element name="unknownStuff" type="string"
dfdl:encoding="ascii" fixed="%F4%13%06%C0" dfdl:lengthKind="implicit"/></font><font size=3>
<br>
</font><font size=2 face="sans-serif"><br>
This works for any single-byte-wide character-set encoding. </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>