-
Notifications
You must be signed in to change notification settings - Fork 26
19115 1 Modularity Approach
As we developed the new XML schemas for ISO 19115-3 we used a new approach to improve modularity in the schema. This approach is used when a class in one namespace has an optional property from another namespace. As I am developing the schema implementation for ISO 19115-2 I need to use this approach in several locations. I am writing down the steps here so I get them right and can remember them!
We are adding a LE_ProcessParameter to the LE_Processing class so that parameters used in a LE_ProcessStep can be described. In order to do this we are reusing the concept of a SV_Parameter from the src namespace. This is an optional property in another namespace, time for modularity.
This namespace holds empty abstract types that are referenced by the namespaces that include the property in order to make it possible to import mcc (a small namespace with just abstract objects) instead of src (a big namespace with lots of stuff). the abstract object looks like:
<!-- Abstract SV_ServiceParameter added as part of ISO 19115-2 Revision 2017-01 -->
<element abstract="true" name="Abstract_Parameter" substitutionGroup="gco:AbstractObject"
type="mcc:Abstract_Parameter_Type"/>
<complexType abstract="true" name="Abstract_Parameter_Type">
<complexContent>
<extension base="gco:AbstractObject_Type">
<sequence/>
</extension>
</complexContent>
</complexType>
<complexType name="Abstract_Parameter_PropertyType">
<sequence minOccurs="0">
<element ref="mcc:Abstract_Parameter"/>
</sequence>
<attributeGroup ref="gco:ObjectReference"/>
<attribute ref="gco:nilReason"/>
</complexType>
The substitution group for the SV_Parameter element needs to be changed to mcc:Abstract_Parameter_Type, i.e. from
<element name="SV_Parameter" substitutionGroup="gco:AbstractObject" type="srv:SV_Parameter_Type">
<annotation>
<documentation>parameter information</documentation>
</annotation>
</element>
<complexType name="SV_Parameter_Type">
<complexContent>
<extension base="gco:AbstractObject_Type">
<sequence>...
</complexContent>
</complexType>
to
<element name="SV_Parameter" substitutionGroup="mcc:Abstract_Parameter" type="srv:SV_Parameter_Type">
<annotation>
<documentation>parameter information</documentation>
</annotation>
</element>
<complexType name="SV_Parameter_Type">
<complexContent>
<extension base="mcc:Abstract_Parameter_Type">
<sequence>...
</complexContent>
</complexType>