DescribeFeatureType Response |
The WFS 2.0.0 service supports two output formats when responding to DescribeFeatureType operations. These two formats are explicitly declared in the Capabilities XML document as "application/gml+xml;version=3.2" and "text/xml;subtype=gml/3.2".
WFS 2.0.0 supports multiple namespaces, but an XML Schema document can only describe elements of a single namespace, so an WFS 2.0.0 service cannot describe multiple namespaces with one XML Schema document. To solve this problem, WFS 2.0.0 can generate an XML Schema document. This XML Schema document is a "package" Schema that can import different namespaces (XML namespace attributes are xmlns)。
Requests to use multiple namespaces to describe feature types are as follows:
<?xml version="1.0" ?>
<DescribeFeatureType version="2.0.0" service="WFS"
xmlns="http://www.opengis.net/wfs/2.0" xmlns:ns01="http://www.server01.com/ns01"
xmlns:ns02="http://www.server02.com/ns02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0.0/wfs.xsd">
<TypeName>ns01:TreesA_1M</TypeName>
<TypeName>ns02:RoadL_1M</TypeName>
</DescribeFeatureType>
In response to the above request, WFS 2.0.0 will generate the following response result:
<?xml version="1.0" ?>
<xsd:schema targetNamespace="http://www.server01.com/ns01"
xmlns:ns01="http://www.server01.com/ns01" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<import namespace="http://www.server02.com/ns02"
schemaLocation="http://www.yourserver.com/wfs.cgi?
REQUEST=DescribeFeatureType&TYPENAMES=ns02:RoadL_1M" />
<xsd:element name="TREESA_1M" type="ns01:TREESA_1MType"
substitutionGroup="gml:_AbstractFeature" />
<xsd:complexType name="TREESA_1MType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<!-- list property declarations for feature type TREESA_1M -->
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- other declarations that are part of this schema -->
</xsd:schema>
The response result of the request example is as follows: