Hello,
Is it possible to configure Geoserver to output all fields in the WFS response even though they don’t have any value (null)?
What does the standards say about that?
Regards,
Albin
Hello,
Is it possible to configure Geoserver to output all fields in the WFS response even though they don’t have any value (null)?
What does the standards say about that?
Regards,
Albin
Lundmark Albin ha scritto:
Hello,
Is it possible to configure Geoserver to output all fields in the WFS response even though they don't have any value (null)?
What does the standards say about that?
In case of nullable columns, we generate a schema stating minOccurs=0, so it's ok not to output the element at all.
A compliant parser should be able to handle that case as well.
Cheers
Andrea
Andrea Aime wrote:
Lundmark Albin ha scritto:
Hello,
Is it possible to configure Geoserver to output all fields in the WFS
response even though they don't have any value (null)?What does the standards say about that?
In case of nullable columns, we generate a schema stating minOccurs=0,
so it's ok not to output the element at all.
A compliant parser should be able to handle that case as well.
I made a test shapefile in order to see how a real GIS client (OpenJUMP WFS-plugin) works in this sitution. It seemed to have no problem. Even if request lead to response with just nulls in some attribute field, the field was still parsed into the OpenJUMP map layer schema.
What did not work quite right was creating a new Geoserver DataStore from shapefile which had an attribute field with only null values. In this case the Feature Type Editor does not list that shapefile field at all and thus it cannot be included into WFS. If I wrote even one single value to any cell of this field it did get listed by Feature Type Editor. I am playing with Geoserver 1.6.4.
-Jukka Rahkonen-
Rahkonen Jukka ha scritto:
Andrea Aime wrote:
Lundmark Albin ha scritto:
Hello,
Is it possible to configure Geoserver to output all fields in the
WFS response even though they don't have any value (null)?What does the standards say about that?
In case of nullable columns, we generate a schema stating
minOccurs=0, so it's ok not to output the element at all. A
compliant parser should be able to handle that case as well.I made a test shapefile in order to see how a real GIS client
(OpenJUMP WFS-plugin) works in this sitution. It seemed to have no
problem. Even if request lead to response with just nulls in some
attribute field, the field was still parsed into the OpenJUMP map
layer schema.What did not work quite right was creating a new Geoserver DataStore
from shapefile which had an attribute field with only null values.
In this case the Feature Type Editor does not list that shapefile
field at all and thus it cannot be included into WFS. If I wrote even
one single value to any cell of this field it did get listed by
Feature Type Editor. I am playing with Geoserver 1.6.4.
Interesting. Can you open a jira issue about this, and attach such
sample shapefile? I would like to figure out why the column was not
recognized.
Cheers
Andrae
Interesting. Can you open a jira issue about this, and attach such
sample shapefile? I would like to figure out why the column was not
recognized.
Created http://jira.codehaus.org/browse/GEOS-2207 with a minimal shapefile as an attachment.
-Jukka-
The schema would permit both omitting the element or outputting the element with empty value i.e null.
I think that controlling this behaviour could be useful, like for instance when the consumer doesn’t have access to the schema (even though that is bad).
Would it be a welcome addition/contribution?
/Björn
On Tue, Sep 9, 2008 at 3:02 PM, Andrea Aime <aaime@…1671…> wrote:
Lundmark Albin ha scritto:
Hello,
Is it possible to configure Geoserver to output all fields in the WFS
response even though they don’t have any value (null)?What does the standards say about that?
In case of nullable columns, we generate a schema stating minOccurs=0,
so it’s ok not to output the element at all.
A compliant parser should be able to handle that case as well.Cheers
Andrea
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Björn Harrtell ha scritto:
The schema would permit both omitting the element or outputting the element with empty value i.e null.
I think that controlling this behaviour could be useful, like for instance when the consumer doesn't have access to the schema (even though that is bad).
Would it be a welcome addition/contribution?
Well, yeah, it could be. I'm just wondering about where that can be
used. I mean, in order to decide which flavour you want, you need
to know that all your users have a broken client that does
not handle the missing attributes, and yet no one with a client
broken the other way (one that does not handle empty ones <element/>).
Seems to me you need to be in control of both the server and the
users, and you cannot fix the client software in the first place.
A little odd?
Cheers
Andrea
The spec says to omit the element. There was some conversation about this during the cite compliance phase of the spec, and the alternative was to use xs:nil elements for attributes with null values but still mandatory. But the spec writers chose the former.
-Justin
Lundmark Albin wrote:
Hello,
Is it possible to configure Geoserver to output all fields in the WFS response even though they don't have any value (null)?
What does the standards say about that?
Regards,
Albin------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Justin Deoliveira
Software Engineer, OpenGeo
http://opengeo.org
That settles it then I guess, thank you for clearing it up!
/Björn
On Tue, Sep 9, 2008 at 9:26 PM, Justin Deoliveira <jdeolive@…1671…> wrote:
The spec says to omit the element. There was some conversation about
this during the cite compliance phase of the spec, and the alternative
was to use xs:nil elements for attributes with null values but still
mandatory. But the spec writers chose the former.-Justin
Lundmark Albin wrote:
Hello,
Is it possible to configure Geoserver to output all fields in the WFS
response even though they don’t have any value (null)?What does the standards say about that?
Regards,
Albin
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users–
Justin Deoliveira
Software Engineer, OpenGeo
http://opengeo.org
This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users