dev@fi.java.net

To support restricted alphabets with an API or not?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 27 Jan 2005 11:55:29 +0100

Hi,

After responding to Alan's email on attributes i am in two minds whether
it is appopriate to support restricted alphabets in the manner i
proposed earlier.

It would simplify things greatly (SAX attributes and also for StAX) if
we just provide API support for encoding algorithms (and keep closer to
the nature of what they are for FI rather than trying to abstract).

Thus for text content we can have two interfaces:

- the first for built-in support, returning arrays of primitive types.

- the second for generic support: generic support for application
defined encoding algorithms and also for generic support for built-in
encoding algorithms.

For attributes and StAX we can have three additional methods to get
access to the data.

I will send out a further email today with some Java code (it was to
hasty to put stuff in CVS!).


There are some further cases for generic support, but do not want to
detract from the fundamental design: for generic support we need to
decide whether Object as well as byte[] should be returned. For generic
built-in support arrays can be returned (copying of arrays will be
required and cannot be reused, which is the case anyway for attributes).
For generic application defined support some additional APIs would be
required to register application defined encoding algorithms (we can
probably share the framework with the built-in algorithms).

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_fi.dev.java.net
For additional commands, e-mail: dev-help_at_fi.dev.java.net