ISO-TC211/XML

Problem with MD_VectorSpatialRepresentation

Opened this issue · 1 comments

Oxygen is throwing a flag for the following code:

mdb:spatialRepresentationInfo
mri:MD_VectorSpatialRepresentation
mri:geometricObjects
mri:MD_GeometricObjects
mri:geometricObjectType
<mri:MD_GeometricObjectTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_GeometricObjectTypeCode"
codeListValue="complex"
codeSpace="001">
complex </mri:MD_GeometricObjectTypeCode>
</mri:geometricObjectType>
mri:geometricObjectCount
gco:Integer56</gco:Integer>
</mri:geometricObjectCount>
</mri:MD_GeometricObjects>
</mri:geometricObjects>
</mri:MD_VectorSpatialRepresentation>
</mdb:spatialRepresentationInfo>

It says one of mcc AbstractGenericName is expected. What am I doing wrong. My interpretation of the UML diagram makes me think I am correct. Any help would be appreciated.

MD_VestorSpatialRepresentation is defined in the msr namespace, not the mri namespace.

   <mdb:spatialRepresentationInfo>
      <msr:MD_VectorSpatialRepresentation>
         <msr:geometricObjects>
            <msr:MD_GeometricObjects>
               <msr:geometricObjectType>
                  <msr:MD_GeometricObjectTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_GeometricObjectTypeCode" codeListValue="complex" codeSpace="001">complex</msr:MD_GeometricObjectTypeCode>
               </msr:geometricObjectType>
               <msr:geometricObjectCount>
                  <gco:Integer>56</gco:Integer>
               </msr:geometricObjectCount>
            </msr:MD_GeometricObjects>
         </msr:geometricObjects>
      </msr:MD_VectorSpatialRepresentation>
   </mdb:spatialRepresentationInfo>

validates in Oxygen for me. Make sure you have the correct schema location, you'll need to use the mds schema; this brings msr with it.
in mdb:MD_Metadata element, include attribute
xsi:schemaLocation="http://standards.iso.org/iso/19115/-3/mds/1.0 http://standards.iso.org/iso/19115/-3/mds/1.0/mds.xsd"

Or you could start with mdb in schema location and add msr schema location explicitly (if you're not using any of the other extensions in mds).
mdb:MD_Metadata element, include attribute
xsi:schemaLocation="http://standards.iso.org/iso/19115/-3/mdb/1.0 http://standards.iso.org/iso/19115/-3/mdb/1.0/mdb.xsd
http://standards.iso.org/iso/19115/-3/msr/1.0 http://standards.iso.org/iso/19115/-3/msr/1.0/msr.xsd"