Well this discussion came up actually before during the development of the
wfs 1.1 spec and there were three options.
1. omit the element
2. create an empty element
3. use the xs:nil construct
In the end (1) was decided upon. (2) I believe creates invalid xml
documents and (3) I can't remember.
So long story short this would go against the specification so not
something we would want to do by default (perhaps by format_option?)
Then there is the question of other formats, like geojson which i believe
apply the same method for null properties that are null (although i could
be wrong).
On Wed, Aug 22, 2012 at 5:42 AM, Andrea Aime
<[email protected]>wrote:
> Hi all,
> as you probably know our current GML2 output (GetFeature and
> GetFeatureInfo)
> omits fully the elements whose value is null.
>
> This causes issues in some dumb clients, such as javascript ones, as they
> may
> show up a reduced set of attributes hiding the fact there are more.
> Now, one could run a DescribeFeatureType but WFS might be not enabled,
> and running an extra call might be undesirable anyways.
>
> What problems do you see if we start returning an empty element instead of
> no
> element at all for empty attributes? That is:
> <myAttribute/>
> Do you believe we could just do that by default, or should it have a
> configuration
> flag to enable/disable it?
>
> Coding wise for GML2 generation the change is trivial (and it would really
> be
> all I need, but I'm trying to think in more general terms).
> GML3 wise uh... not sure. Maybe it's just a matter of changing
> GML3EncodingUtils.encodeSimpleContent, but I may be wrong
>
> Opinions?
>
> Cheers
> Andrea
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 962313
> mob: +39 339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel