dev@fi.java.net

Re: AttributesHolder

From: Alan Hudson <giles_at_yumetech.com>
Date: Fri, 20 Oct 2006 05:51:07 -0700

Paul Sandoz wrote:
> Hi Alan,
>
> This is the correct list.
>
> What version of FI are you looking at, see here for AttributesHolder [1]
> version 1.8 (for FI 1.1.x). It may be you are looking at an old one?
>
> The AttributesHolder.convertEncodingAlgorithmDataToString will convert
> any built in or registered encoding algorithm.
>
> The AttributesHolder.getValue(int index) will always return a string and
> convert the algorithm data if necessary.
>
> Ah!, but there is a bug for getValue(String uri, String localName), was
> this the method you were using?
>
> This method was not updated to do conversion. I have fixed this, which
> should be in the latest builds [2]. Let me know if you require a version
> rev so you have a location to a stable fixed distribution.
>
I'm ok working from CVS, thanks.

> Paul.
>
> [1]
> http://fisheye5.cenqua.com/browse/fi/FastInfoset/src/com/sun/xml/fastinfoset/sax/AttributesHolder.java?r=1.8
>
> [2]
> https://fi.dev.java.net/servlets/ProjectDocumentList?folderID=5845&expandFolder=5845&folderID=5844
>
>
> Alan Hudson wrote:
>
>> Paul, this may not be the right list now but I haven't posted in
>> ahile. If it isn't can you redirect to the right place?
>>
>> Looking at AttributesHolder.convertEncodingAlgorithmDataToString
>>

in getValue there was a check for the registeredEncodingAlgorithms table
being null. In this case I hadn't registered anything, ie I just used
the builtins. I checked in this fix.

         if (_algorithmData[index] == null ||
             (_registeredEncodingAlgorithms == null &&
_algorithmIds[index] >= EncodingConstants.ENCODING_ALGORITHM_BUILTIN_END)) {

             return null;
         }


You may want to require the builtins to be registered, not sure. If so
my change should be backed out and I'll change my user code. But
registered the builtins would be kinda annoying.



-- 
Alan Hudson
President Yumetech, Inc.                               www.yumetech.com
President Web3D Consortium                             www.web3d.org
206 340 8900