Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Here is the definition of BASE:

Code Block
borderStylesolid
titleDefinition of BASE
borderStylesolid
<xsd:complexType name="BASE">
  <xsd:sequence>
    ... other elements ...
    <xsd:element ref="HEAD">
    ... other elements ...
  </xsd:sequence>
</xsd:complexType>

A programmer might be tempted to "subclass" BASE like this:

Code Block
borderStylesolid
titleIncorrect definition of DERIVED
borderStylesolid
<xsd:complexType name="DERIVED">
  <xsd:restriction base="BASE">
    <xsd:sequence>
      ... other elements ...
      <xsd:element ref="LEAF">
      ... other elements ...
    </xsd:sequence>
  </xsd:restriction>
</xsd:complexType>

...

In the navigation of the schema tree, the first error encountered is in gmlBase.xsd:

Code Block
titleMetaDataPropertyType
borderStylesolid
titleMetaDataPropertyType
	<complexType name="MetaDataPropertyType">
		<annotation>
			<documentation>Base type for complex metadata property types.</documentation>
		</annotation>
		<choice minOccurs="0">
			<element ref="gml:_MetaData"/>
			<any processContents="lax"/>
		</choice>
		<attributeGroup ref="gml:AssociationAttributeGroup"/>
		<attribute name="about" type="anyURI" use="optional"/>
	</complexType>

...

This error type 2 occurs because the child does not include the "name" property.

Code Block
titleAbstractReferenceSystemBaseType
borderStylesolid
titleAbstractReferenceSystemBaseType
<complexType name="DefinitionType">
  <annotation>
     <documentation>...</documentation>
  </annotation>
  <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>

...
<complexType name="AbstractReferenceSystemBaseType" abstract="true">
  <annotation>
    <documentation>...</documentation>
  </annotation>
  <complexContent>
    <restriction base="gml:DefinitionType">
      <sequence>
        <element ref="gml:metaDataProperty" minOccurs="0" maxOccurs="unbounded"/>
        <element ref="gml:remarks" minOccurs="0">
          <annotation>
            <documentation>Comments on or information about this reference system, including source information. </documentation>
          </annotation>
        </element>
        <element ref="gml:srsName"/>
      </sequence>
      <attribute ref="gml:id" use="required"/>
    </restriction>
  </complexContent>
</complexType>

...