W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2011

Re: base64Binary lexical/octet length

From: xmlplus custodians <xmlplus.custodians@gmail.com>
Date: Tue, 12 Apr 2011 00:33:46 +0530
Message-ID: <BANLkTimkhqNX9U+1BKU2FzFhCUD4An_hcg@mail.gmail.com>
To: Michael Kay <mike@saxonica.com>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, xmlschema-dev@w3.org
Mike,

I agree. It is evident that only 1 or 2 trailing "=" chars should be
allowed.
I am assuming that, this fact can be deduced too, for those who prefer
intuitive ideas. In case we end up with fewer than 24 bits (of octets) in
the last group, ie. either 8 bits or 16 bits, then they would encode to 2
and 3 base64 chars respectively. Thus the need of exactly 2 and 1 padding(=)
chars in those cases to make up for the 4-char base64 groups.

-- 
Best Regards,
Satya Prakash Tripathi

On Mon, Apr 11, 2011 at 11:03 PM, Michael Kay <mike@saxonica.com> wrote:

>
>  You may find it helpful to read RFC 3548, which is normatively referred
>> to from the XSD spec.
>>
>> http://www.ietf.org/rfc/rfc3548.txt
>>
>>
> It may also be worth noting that XSD requires strict conformance to the
> RFC, whereas most base64 implementations available "in the wild" are liberal
> in what they accept, for example in areas such as the exact number of
> trailing "=" signs.
>
> Michael Kay
> Saxonica
>
Received on Monday, 11 April 2011 19:04:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 11 April 2011 19:04:15 GMT