Page 1 of 1

Problems validating GML 3.0

Posted: Mon Jun 28, 2004 10:05 pm
by Scott C
I have a schema that is importing the GML 3.0 schema and am getting all kinds of errors in Oxygen when I try to validate my schema that come from GML 3.0's xsd files.

For instance, dynamicFeatures.xsd defines a complexType called TrackType that throws the following errors:

SystemID: http://schemas.opengis.net/gml/3.0.0/ba ... eature.xsd
Location: 75:33
Description: E rcase-RecurseLax.2: There is not a complete functional mapping between the particles.
URL: http://www.w3.org/TR/xmlschema-1/#rcase-RecurseLax

SystemID: http://schemas.opengis.net/gml/3.0.0/ba ... eature.xsd
Location: 75:33
Description: E derivation-ok-restriction.5.4.2: Error for type 'TrackType'. The particle of the type is not a valid restriction of the particle of the base.
URL: http://www.w3.org/TR/xmlschema-1/#deriv ... estriction

In all, I receive 86 validation errors when validating my schema, but in reality there are 44 pairs of the above mentioned errors in various GML 3.0 xsd files.

Here is the beginning of my schema with the import statement. Maybe I'm doing something wrong in my import statement?

<?xml version="1.0" encoding="UTF-8"?>
<!-- OceanWatch Schema v.1 -->
<xs:schema targetNamespace="http://sri.scpa.com/oceanwatch/namespace" elementFormDefault="unqualified" xmlns="http://sri.scpa.com/oceanwatch/namespace" xmlns:ow="http://sri.scpa.com/oceanwatch/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml">
<xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.0.0/base/gml.xsd"/>

I'm a newbie to XML so I don't doubt that there is something I'm doing wrong and would appreciate any insights into this problem. Thanks!

for clarification

Posted: Mon Jun 28, 2004 10:36 pm
by Scott C
Now that I've registered, I can edit my thoughts in this reply. There are, of course, 43 pairs of errors totalling 86 validation errors in all. Also, here is the definition of the trackType element from GML 3.0's dynamicFeatures.xsd file which throws the errors I mentioned in my original post:

<element name="track" type="gml:TrackType" substitutionGroup="gml:history"/>
<!-- ===================================== -->
<complexType name="TrackType">
<annotation>
<documentation xml:lang="en"> The track of a moving object is a sequence of specialized timeslices that indicate the status of the object. </documentation>
</annotation>
<complexContent>
<restriction base="gml:HistoryPropertyType">
<sequence>
<element ref="gml:MovingObjectStatus" maxOccurs="unbounded"/>
</sequence>
</restriction>
</complexContent>
</complexType>

Posted: Tue Jun 29, 2004 11:55 am
by george
Hi Scott,

We are using the latest version of Xerces to perform schema validation. This topic, validation problems on GML appeared a couple of times in the past and it is hard to tell if the problem is in the parser or in the schema, although I tend to think that it is in the schema.
The current solution is to turn off the schema full checking feature [1] and you should be able to work with GML.

[1] http://www.oxygenxml.com/doc/ug-oxygen/ ... arser.html

Best Regards,
George