dev@fi.java.net

Re: AttributesHolder

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 04 Mar 2005 09:37:46 +0100

Alan Hudson wrote:
> I think the getValue methods should convert native datatypes to strings
> if asked for the value. This way you can feed this data into a non-fi
> aware stream and it will just work. right now it returns null for
> this. thoughts?
>

Currently i have tried to keep sort of consitent behaviour for the
returning of element content and attribute values.

When a PrimitiveContentHandler is registered then primtive types:

- for element content will be returned by methods on the handler; and

- for attribute values will be obtained by call to getAlgorithmData.

Registering of a PrimitiveContentHandler signals that the application
can process primitive types for element content and attribute values. A
non-fi aware stream should not register a PrimitiveContentHandler then
all primitive types will be returned as strings for both element content
and attribute values (not very efficiently mind you as i have not
optimized the code, and also i have not checked it is completely
conformant in terms of the characters produced).

Do you think we need to separate out how we manage element content and
attribute values for encoding algorithms?

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109