[Biojava-dev] SAX use conventions

David Huen smh1008@cus.cam.ac.uk
Mon, 16 Dec 2002 10:30:24 +0000


While debugging a problem with the use of the blast XML parser with 
BlastLikeSearchBuilder, I have come against a problem that may be best 
solved by us deciding on and sticking to a convention when using SAX.

When I wrote the blast XML parser, SAX was called with both the local and 
fully qualified names of elements/attributes in the parameter list.  This 
is incompatible with the use of SAX within BlastLikeSearchBuilder where 
attributes are recovered by calling the version of the getAttribute method 
that expects a XML 1.0 qualified name with the local name.  Nothing ever 
gets returned as a result.

I can fix this in one of two ways:-
i) change the blast xml parser to write out local names only to attributes
OR
ii) change ssbind to use the getAttributes call that expects the namespace 
URI and local name.  If this is done, will it break anything else?

Are there any views as to which solution is preferred?  I would probably 
prefer (ii) but I'd rather canvass opinion to establish a convention we can 
stick to hereafter.

Regards,
David Huen