dev@fi.java.net

Re: SAX interfaces for encoding algorithms and restricted alphabets

From: Eduardo Pelegri-Llopart <Eduardo.Pelegrillopart_at_Sun.COM>
Date: Wed, 26 Jan 2005 08:30:34 -0800

We should make it very clear which APIs are 'committed' and which are
not and may change from release to release. Obviously, the fewer
committed APIs the better...

        - eduard/o

Paul Sandoz wrote:
> Hi,
>
> I have added some SAX interfaces for the notification of primitive
> types, restricted characters and in general for encoding algorithms and
> restricted alphabets.
>
> I have created a new package:
>
> com.sun.xml.fastinfoset.api
>
> for all API (non-implementation) related functionality that could be
> exposed to a developer. At some point we may want to split this out into
> a separate jar and rename the package to something else...
>
>
> In the com.sun.xml.fastinfoset.api.sax package there are three interfaces.
>
> 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.
>
> The AlphabetAndAlgorithmContentHandler provides generic support for Fast
> Infoset restricted alphabets and encoding algorithms. For encoding
> algorithms no processing of the octets will occur, just the reporting of
> the octets and the encoding algorithm URI and index. It would be up to
> the application to then process the data accordingly based on the URI or
> index. I am not sure if we need another interface to return an Object
> instead of bytes if the SAX processor is capable of processing the data
> according to some plugable encoders. TO support this we may need some
> Encoder interfaces/classes in "com.sun.xml.fastinfoset.api".
>
>
> There is some interaction that needs to be specified for the use of all
> three interfaces. For example the AlphabetAndAlgorithmContentHandler
> could be used for:
>
> - all built-in and application defined algorithms and alphabets
> - all application defined algorithms and alphabets
>
> Further more character data could be returned for all built-in
> algorithms and alphabets unless the PrimitiveTypeContentHandler and
> RestrictedCharacterContentHandler are set on the XMLReader.
>
> Basically we need to carefully define a bunch of properties and features
> related to all this.
>
> To document all this i think we need a FastInfosetXMLReader that extends
> XMLReader with setters and getters for appropriate properties and
> features (as well as being able to set/get from the XMLReader interface).
>
> Next, an extention to the org.xml.sax.Attributes is required to report
> the same functionality but not through callbacks (hopefully we can reuse
> the same design for StAX, for content and attribute values).
>
> Paul.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_fi.dev.java.net
For additional commands, e-mail: dev-help_at_fi.dev.java.net