On Wed, Aug 22, 2012 at 5:18 PM, Justin Deoliveira <[email protected]>wrote:

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

That's odd? I've just tried to replace elements in a GeoServer WFS response
with empty ones, as follows:

<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs";
  xmlns:wfs="http://www.opengis.net/wfs"; xmlns:gml="
http://www.opengis.net/gml";
  xmlns:GeoSolutions="http://www.geo-solutions.it"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.opengis.net/wfs
http://demo1.geo-solutions.it:80/geoserver-enterprise/schemas/wfs/1.0.0/WFS-basic.xsd
http://www.geo-solutions.it
http://demo1.geo-solutions.it:80/geoserver-enterprise/GeoSolutions/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=GeoSolutions%3Acities
">
  <gml:boundedBy>
    <gml:null>unknown</gml:null>
  </gml:boundedBy>
  <gml:featureMember>
    <GeoSolutions:cities fid="cities.1">
      <GeoSolutions:the_geom>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
          <gml:coordinates xmlns:gml="http://www.opengis.net/gml";
            decimal="." cs="," ts=" ">-16.2617,28.4623</gml:coordinates>
        </gml:Point>
      </GeoSolutions:the_geom>
      <GeoSolutions:TYPE />
      <GeoSolutions:NATION />
      <GeoSolutions:CNTRYNAME>Spain</GeoSolutions:CNTRYNAME>
      <GeoSolutions:LEVEL>1</GeoSolutions:LEVEL>
      <GeoSolutions:NAME>Santa Cruz de Tenerife</GeoSolutions:NAME>
      <GeoSolutions:NAMEPRE />
      <GeoSolutions:CODE />
      <GeoSolutions:PROVINCE>38</GeoSolutions:PROVINCE>
      <GeoSolutions:PROVNAME>Santa Cruz de Tenerife</GeoSolutions:PROVNAME>
      <GeoSolutions:UNPROV>0</GeoSolutions:UNPROV>
      <GeoSolutions:CONURB />
    </GeoSolutions:cities>
  </gml:featureMember>
</wfs:FeatureCollection>

Eclipse says the above document is valid (that GeoServer is available to
the internet so you
can try out validation yourself)

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

Reply via email to