Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument with Dot and PropertyName use #17

Closed
ocourtin opened this issue Oct 8, 2012 · 1 comment
Closed

Argument with Dot and PropertyName use #17

ocourtin opened this issue Oct 8, 2012 · 1 comment

Comments

@ocourtin
Copy link

ocourtin commented Oct 8, 2012

<wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"     xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" maxFeatures="1000" outputFormat="GML2">    <wfs:Query xmlns:tows="http://www.tinyows.org/" typeName="tows:dot.test">    <ogc:PropertyName>tows:nom.dept</ogc:PropertyName><ogc:PropertyName>tows:the_geom</ogc:PropertyName>    </wfs:Query></wfs:GetFeature>



<layer ns_prefix="tows" 
     ns_uri="http://www.tinyows.org/" 
     retrievable="1" 
     name="dot.test" 
     title="dot" />



CREATE TABLE "dot.test" (
gid integer NOT NULL,
"nom.dept" character varying(40),
gmi_cntry character varying(3),
region character varying(25),
the_geom geometry(MultiPolygon,4326)
);

Issue initially reported by Jukka on mailing list.

Could be fixed on Trunk by removing layer prefix PropertyName code:
(but have to be checked that no CITE regression is introduced, by such
a suppression)

diff --git a/src/wfs/wfs_request.c b/src/wfs/wfs_request.c
index d9ce947..05cd000 100644
--- a/src/wfs/wfs_request.c
+++ b/src/wfs/wfs_request.c
@@ -629,7 +629,6 @@ static void wfs_request_check_propertyname(ows * o, wfs_request * wr, list * lay
 {
   buffer *b;
   mlist *f;
 -  list *fe;
   list_node *ln, *ln_tpn;
   array *prop_table;
   mlist_node *mln = NULL;
@@ -658,25 +657,6 @@ static void wfs_request_check_propertyname(ows * o, wfs_request * wr, list * lay
     prop_table = ows_psql_describe_table(o, ln_tpn->value);

     for (ln = mln->value->first ; ln ; ln = ln->next) {
-      fe = list_explode('.', ln->value);
-
-      /*case layer_name.propertyname */
-      if (fe->first->next) {
-        /*check if propertyname values match typename or fid layer names */
-        if (!buffer_cmp(fe->first->value, ln_tpn->value->buf)) {
-          list_free(fe);
-          mlist_free(f);
-          wfs_error(o, wr, WFS_ERROR_NO_MATCHING,
-                    "propertyname values and typename values don't match", "GetFeature");
-          return;
-        }
-
-        /* keep only the propertyname (without the layer prefixed) */
-        buffer_empty(ln->value);
-        buffer_copy(ln->value, fe->last->value);
-      }
-
-      list_free(fe);

       /* if propertyname is an Xpath expression */
       if (check_regexp(ln->value->buf, "\\*\\["))
@ocourtin ocourtin reopened this Oct 14, 2012
@ocourtin
Copy link
Author

As we seen in #14 there is an issue in having dot both in layername and in propertyname.

As we choose to support dot in layer name (INSPIRE point of view),
we are not supporting anymore dot in propertyname.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant