I was going to say lets just fix the problem ... treat literals as they are String literals. We can certerntly provide convience methods toInt toDouble etc... so we don't perform caching multiple times.

I want to smack the filter code at somepoint (to allow breathing room for Filter 1.1), if enough of us are interested in the problems lets solve this one in an orderly fashion? Note this would be a GeoServer1.4.0 fix (I really hope they release soon).

Cheers,
Jody

[EMAIL PROTECTED] wrote:
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




-------------------------------------------------------
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

Reply via email to