[xsd-users] C++/Parser errors from GML schemas
Boris Kolpackov
boris at codesynthesis.com
Mon Oct 17 06:00:55 EDT 2005
James,
I was test the in-development version of xsd against the GML schemas
you sent me and found out that they are not quite valid. In this version,
I decided to turn "expensive" (time and memory -wise) checks (such as
unique particle attribution, etc.) on which uncovered the whole bunch
of errors (see below). I checked one instance and turned out that the
schema is indeed invalid. For example, here is the snippet from
coordinateOperations.xsd:519:
<complexType name="OperationMethodBaseType" abstract="true">
<complexContent>
<restriction base="gml:DefinitionType">
<sequence>
<element ref="gml:metaDataProperty" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:methodName"/>
</sequence>
<attribute ref="gml:id" use="required"/>
</restriction>
</complexContent>
</complexType>
Now look at the base type definition (dictionary.xsd:35):
<complexType name="DefinitionType">
<complexContent>
<restriction base="gml:AbstractGMLType">
<sequence>
<element ref="gml:metaDataProperty" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:description" minOccurs="0"/>
<element ref="gml:name" maxOccurs="unbounded"/>
</sequence>
<attribute ref="gml:id" use="required"/>
</restriction>
</complexContent>
</complexType>
There are two problems in this case:
1. OperationMethodBaseType should explicitly declare each element found
in DefinitionType (name and description are missing).
2. We cannot add any new elements/attributes (methodName in this case)
for valid OperationMethodBaseType content model should also be
valid per DefinitionType.
hth,
-boris
coverage.xsd:392:39: error: Recurse: There is not a complete functional mapping between the particles
coordinateOperations.xsd:519:62: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:421:48: error: Recurse: There is not a complete functional mapping between the particles
datums.xsd:27:60: error: Recurse: There is not a complete functional mapping between the particles
coordinateOperations.xsd:712:70: error: Recurse: There is not a complete functional mapping between the particles
coordinateOperations.xsd:28:74: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:408:37: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:283:43: error: Recurse: There is not a complete functional mapping between the particles
geometryPrimitives.xsd:1294:44: error: Recurse: There is not a complete functional mapping between the particles
referenceSystems.xsd:25:70: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:296:45: error: Recurse: There is not a complete functional mapping between the particles
geometryPrimitives.xsd:1346:53: error: Recurse: There is not a complete functional mapping between the particles
datums.xsd:383:56: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:328:47: error: Recurse: There is not a complete functional mapping between the particles
geometryPrimitives.xsd:1324:52: error: Recurse: There is not a complete functional mapping between the particles
datums.xsd:313:60: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:315:43: error: Recurse: There is not a complete functional mapping between the particles
coordinateOperations.xsd:648:65: error: Recurse: There is not a complete functional mapping between the particles
coordinateSystems.xsd:110:71: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:264:45: error: Recurse: There is not a complete functional mapping between the particles
geometryPrimitives.xsd:1362:46: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:379:43: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:360:45: error: Recurse: There is not a complete functional mapping between the particles
dynamicFeature.xsd:69:32: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:347:45: error: Recurse: There is not a complete functional mapping between the particles
coverage.xsd:437:46: error: Recurse: There is not a complete functional mapping between the particles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20051017/0d38cf8a/attachment.pgp
More information about the xsd-users
mailing list