[mapserver-dev] PropertyName discrepancies - MapServer or Spec

Ed Nash edward.nash at gmx.de
Thu Oct 11 23:03:34 PDT 2012


Hello Andreas,

I've just referred to the spec and as you say, example 9 uses
xmlns:FeatureName/xmlns:propertyName notation - on the other hand the
other examples (10, 11, 12) all use just xmlns:propertyName notation.
I agree that this appears a little confusing: I guess the logic of
defining wfs:PropertyName as xsd:string may be for specifying only
particular properties of child elements, for example:
<wfs:Query typeName="eg:River">
<wfs:PropertyName>eg:tributaries/eg:River/eg:Name</wfs:PropertyName>
...
- just a basic QName isn't sufficient here, but the text says that the
propertyName is an immediate child of the FeatureType, and looking at
the WFS 2.0.0 spec then it is actually defined as a QName in the XML
schema so I guess this should be taken as indicating what the original
intention was.

My conclusion is therefore the same as yours:  the QName of the
feature being queried should not be specified (repeated) and therefore
your customer's request and example 9 of the standard are both wrong.
Probably the semantics got changed somewhere in the drafting process
and not everything got corrected.

By the maxim of "be liberal in what you receive and strict in what you
deliver" then a reliable solution without having to modify your
client's software may be to check the specified property name and if
it contains an XPath (just checking for a / in the string is
sufficient), and the first part of the XPath is the qualified name of
the FeatureType then the first part gets stripped.

Regards,

Ed

On Wed, Oct 10, 2012 at 3:07 PM, Eichner, Andreas - SID-NLKM
<Andreas.Eichner at sid.sachsen.de> wrote:
>
> Hello guys,
>
> one of our customers had issues with GetFeature requests when using
> MapServer as a WFS. It's client software sent something like
> ...&PROPERTYNAME=ms:LayerName/ms:ColumnName&...
> I modified the mapwfs.c to simply strip anything in front of ColumnName.
> Now I wanted to create a ticket and attach the patch. So I studied the
> WFS 1.1 spec again and now I am completely confused:
>
> The chapter about the GetFeature operation states on page 36:
> "The value of each <wfs:PropertyName> element is a namespace-qualified
> name (XML
> Schema type QName, e.g. myns:address) whose value must match the name of
> one of the
> property elements in the GML representation of the relevant feature."
> So IMHO this means what MapServer implements: the textual content of a
> PropertyName should be <namespace prefix>:<local-name>. This basically
> means our customers request is invalid and I can drop my patch on the
> floor.
>
> But on the other hand the WFS 1.1 XML schema defines PropertyName as
> type xsd:string and section 7.4.1 states
> "A WFS must use XPath [8] expressions, as defined in this document, for
> referencing the properties and
> components of the value of properties of a feature encoded as XML
> elements or attributes." and I strongly believe that the PropertyName
> within a GetFeature actually is such a reference. And last but not least
> in GetFeature example 9 the following fragment is used:
>   <wfs:PropertyName>myns:Person/myns:lastName</wfs:PropertyName>
>
> How are you about this? Any ideas how to handle this?
>
> Crazy regards...
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list