On Jan 26, 2005, at 6:55 PM, Paul Sandoz wrote:
> Santiago Pericas-Geertsen wrote:
>> On Jan 26, 2005, at 4:46 PM, Paul Sandoz wrote:
>>> The PrimitiveTypeContentHandler and
>>> RestrictedCharacterContentHandler are desgined to be abstracted from
>>> the details of Fast Infoset and provide support for the built-in
>>> encoding algorithms and restricted alphabets.
>> In RestrictedCharacterContentHandler, don't you want to report the
>> data as byte[] for the built-in restricted alphabets.
>
> It is meant to return data as char[], the idea is the method just
> identifies the set of restricted characters. This may be useful for
> XSD validators or binders. However it this feature is not set the
> parser can just return these characters as normal character events.
If they are reported to RestrictedCharacterContentHandler, I don't
think they should be reported as char[] as this doubles the memory
requirements for the buffer. In some environments, this may be an
issue. IMO it is better to report them as byte[] and perhaps offer some
utility method to convert byte[] to char[], but leave this decision to
the app.
-- Santiago