Hi, thanks for this..
problem with the escape thing is that oracle doesn't seem to like an
attempt to escape anything other than a \ or a %.
so if i issue:
<wfs:Query typeName="ntlis:CADASTRE">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="%" singleChar="_" escape="\">
<ogc:PropertyName>ntlis:LAISKEY</ogc:PropertyName>
<ogc:Literal>550 \\ \\ \\ \\ 04915%</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
the sql is:
SELECT blah,"GEOMETRY" FROM "CADASTRE" WHERE UPPER("LAISKEY") LIKE
UPPER('550 \\ \\ \\ \\ 04915%') ESCAPE '\'
which works fine (valid select query), but of course returns no results.
if i issue:
<wfs:Query typeName="ntlis:CADASTRE">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="%" singleChar="_" escape="\">
<ogc:PropertyName>ntlis:LAISKEY</ogc:PropertyName>
<ogc:Literal>550 \ \ \ \ 04915%</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
oracle spits the dummy with:
(blah) WHERE UPPER("LAISKEY") LIKE UPPER('550 \ \ \ \ 04915%') ESCAPE
'\'
ORA-01424: missing or illegal character following the escape character
so i don't think i'm able to escape anything using an oracle datastore
other than \ or %.. at least at the data level.
Regarding the CDATA suggestion, Rob Atkinson suggested the same thing
directly to me.. unfortunately when i execute:
<wfs:Query typeName="ntlis:CADASTRE">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="%" singleChar="_" escape="\">
<ogc:PropertyName>ntlis:LAISKEY</ogc:PropertyName>
<ogc:Literal><![CDATA[550 04915%]]></ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
the resulting SQL is still:
SELECT blah,"GEOMETRY" FROM "CADASTRE" WHERE UPPER("LAISKEY") LIKE
UPPER('550 04915%')
not sure where that leaves us..
-i
-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Thursday, 14 February 2008 1:37 AM
To: Ivan Price
Cc: Geoserver-devel
Subject: Re: [Geoserver-devel] problem with multiple spaces in an
attribute filter..
Hi Ivan,
Unfortunately we are not sure if this is a bug yet. The xml schema spec
is not all that clear. I asked on the devel list... and someone
suggested escaping the spaces. Which I think might have a decent chance
of working. So I guess your literal would come out as:
"550 \\ \\ \\ \\ 07683%"
Or something. Perhaps you can try this option.
Ivan Price wrote:
Justin,
should i submit a bug for this one so it doesn't get lost ? i have
come up with a data hack to get by for now.. but think that at some
time in the future people should be able to do a filter honouring
whitespace.
-i
-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Wednesday, 6 February 2008 11:01 PM
To: Ivan Price
Cc: Andrea Aime; Geoserver-devel
Subject: Re: [Geoserver-devel] problem with multiple spaces in an
attribute filter..
Yes, this seems silly to me as something you can not do either. But
unless I am mis interpreting the specs wrong it does not seem so. I am
going to send an email to the wfs mailing list and see what they have
to say about this. I will let you know what I find.
-Justin
Ivan Price wrote:
OK thanks for that,
is there a workaround ? i'm happy to use soomething other than
'literal'
but looking through the specs i can't find an alternative.. literal
is
always the container for the value.
Surely its not impossible to filter a layer using a value that
contains
2 consecutive spaces ? can geoserver/geotools be tricked with some
character code or escaping to disguise the multiple spaces?
-i
-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Wednesday, 6 February 2008 7:52 AM
To: Andrea Aime
Cc: Ivan Price; Geoserver-devel
Subject: Re: [Geoserver-devel] problem with multiple spaces in an
attribute filter..
Justin, this is parsed by the xml-xsd parser right? Do you know if
the parser may be stripping the spaces?
Yes, the xml parser is collapsing the whitespace, and looking at the
schema defition for Literal, it should be. If you examine the type
hierachy of Literal, its whiteSpace facet has the value of
"collapse",
and not "preserve". From what I can tell only types that extend from
"string" preserve whitespace.
I admit... that does not make sense for a "literal". Tough call. I
could be reading something wrong... perhaps we should consult the
filter spec writers on this one.
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com
!DSPAM:4007,47b24c46162551804284693!
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com