Very good, thanks for the reply, so we'll have to wait for the fix
Best regards,
Massimo Ferraguto
-Original Message-
From: Kralidis,Tom [Ontario] [mailto:tom.krali...@ec.gc.ca]
Sent: Mon 16 February 2009 17:01
To: Massimo Ferraguto; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] SOS response XML validity
I have created a mapfile to generate a SOS response
containing data from a database. I have understood that
mapserver supports only flat reporting of the database
columns to the xml response.
My problem is that I wonder whether this kind of flat
response is valid or not. If I try to validate the response
against the xml schema I get errors.
How can I solve this problem of xml validity against the schema?
Here are the errors:
*** Error start ***
Element observedProperty is not allowed under element
om:Observation.
Reason: The following elements are expected at this
location (see below)
om:observedProperty
om:resultQuality
Annotations of type 'om:ObservationType' (see below)
Base type for Observations.
Observation is an act (event), whose result is an estimate
of the value of a property of the feature of interest.
The observed property may be any property associated with the
type of the feature of interest.
The following properties are inherited from AbstractFeatureType:
Error location: om:ObservationCollection / om:member /
om:Observation / observedProperty
Details
cvc-model-group: Element observedProperty
unexpected by type 'om:ObservationType' of element om:Observation.
cvc-elt.5.2.1: The element om:Observation is not
valid with respect to the actual type definition 'om:ObservationType'.
*** Error end ***
after modifying observedProperty == om:observedProperty I get another
error:
*** Error start ***
Text 'temperature' is not allowed for element
om:observedProperty. The element declaration's content type
is 'element-only'.
Error location: om:ObservationCollection / om:member /
om:Observation / om:observedProperty
Details
cvc-complex-type.2.3: Text 'temperature' is not
allowed for element om:observedProperty. The element
declaration's content type is 'element-only'.
cvc-elt.5.2.1: The element om:observedProperty is
not valid with
respect to the actual type definition
'swe:PhenomenonPropertyType'.
*** Error end ***
Here is an example response that I get from my server:
?xml version=1.0 encoding=ISO-8859-1?
om:ObservationCollection xmlns:gml=http://www.opengis.net/gml;
xmlns:ows=http://www.opengis.net/ows/1.1;
xmlns:swe=http://www.opengis.net/swe/1.0.1;
xmlns:xlink=http://www.w3.org/1999/xlink;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:sos=http://www.opengis.net/sos/1.0;
xmlns:om=http://www.opengis.net/om/1.0; gml:id=htb_offering
xsi:schemaLocation=http://www.opengis.net/om/1.0
http://schemas.opengis.net/om/1.0.0/om.xsd;
gml:description xmlns:gml=http://www.opengis.net/gml;htb
data/gml:description
gml:name xmlns:gml=http://www.opengis.net/gml;Helsinki
test bed data/gml:name
om:member
om:Observation
om:samplingTime
gml:TimeInstant
gml:timePosition20081127042000/gml:timePosition
/gml:TimeInstant
/om:samplingTime
om:procedure xlink:href=urn:ogc:def:procedure:temperature/
om:observedPropertytemperature/om:observedProperty
om:result
gml:featureMember xmlns:gml=http://www.opengis.net/gml;
gml:temperature
gml:boundedBy
gml:Envelope
gml:lowerCorner25.399600 60.316000/gml:lowerCorner
gml:upperCorner25.399600 60.316000/gml:upperCorner
/gml:Envelope
/gml:boundedBy
msGeometry
gml:Point
gml:pos25.399600 60.316000/gml:pos
/gml:Point
/msGeometry
locationid37/locationid
insertionTime20081127042054/insertionTime
latitude60.316/latitude
longitude25.3996/longitude
leveltypealtitude/leveltype
levelvalue17/levelvalue
levelunitm/levelunit
version1/version
parameterNametemperature/parameterName
value-1.1/value
unitC/unit
aggregationNameinstant/aggregationName
aggregationValue0/aggregationValue
aggregationUnitn/a/aggregationUnit
formn/a/form
/gml:temperature
/gml:featureMember
/om:result
/om:Observation
/om:member
/om:ObservationCollection
Note that we're working on validating the SOS GetObservation output (see
http://trac.osgeo.org/mapserver/ticket/2646), and what is in svn trunk
is very close to a valid XML document. We're close to having this for
5.4.
..Tom