> Yes, the filter-and-literal stuff was poorly designed. well, I didn't want to go to such lengths - but it's definitely a flaw. > > Basically, what needs to happen is the actual filter class should just > store the literals as strings, and the filter evaluation code should do > any necessary conversion. The main problem is that the Filter parser > cannot, apriori, know what type the <Literal> elements are, but it > guesses anyways. Whats needed is the FeatureType that the Filter is > being evaluated against (this can get more complicated if the > FeatureType has <choice> elements in it). yes, that's it! :)
> One possible bandaid would be a function that takes a Filter object and > a FeatureType then 'fixes' all the literals in it. We'll have to make > sure that this works with the new Feature Model. isn't that too late? when a filter parser mutilates a literal there's no way back - consider the following literals: * 1234567890123456 - this looks like an integer to the parser as it contains solely of numbers - but it's no integer on most machines * 0123 will be converted to 123 by the parser - the leading zero will be lost * 15E1 will be taken as a float regardless of its meaning (in this case a room number) I'm pretty aware that there are implications on other projects - my very own problem is located in geoserver, but the root cause is undoubtedly in getools' filter implementation. Wouldn't it be good to have an alternative filter implementation that other tools (like geoserver) could optionally use? Cheers, Jürgen "Jetzt Handykosten senken mit klarmobil - 18 Ct./Min.! Hier klicken" www.klarmobil.de/index.html?pid=73025 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
