Hi All,
I want to restrict geometry GML in WFS GetFeature responses, so it
should be able to serve only attributes. I've tried to achieve it
using schema mapping described here:
http://docs.geoserver.org/stable/en/user/services/wfs/schemamapping.html
I choosed the built-in layer topp:states and created a file
workspaces/topp/states_shapefile/states/schema.xsd
with contents
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://www.openplans.org/topp">
<xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="http://att-it.homelinux.net:23880/geoserver/schemas/gml/2.1.2/feature.xsd"/>
<xsd:complexType name="statesType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="STATE_NAME"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="STATE_FIPS"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SUB_REGION"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="STATE_ABBR"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LAND_KM"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="WATER_KM"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="PERSONS"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="FAMILIES"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="HOUSHOLD"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="WORKERS"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="DRVALONE"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="CARPOOL"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="PUBTRANS"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EMPLOYED"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="UNEMPLOY"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SERVICE"
nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="MANUAL" nillable="true"
type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SAMP_POP"
nillable="true" type="xsd:double"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="states" substitutionGroup="gml:_Feature"
type="topp:statesType"/>
</xsd:schema>
but nothing changes as I try the demo request.
thank you in advance.
best regards: Balázs Bámer