ISO-TC211 / XML

XML schema, transforms, schematron rules, and examples for ISO TC211 Metadata Standards
46 stars 26 forks source link

Problem with MD_VectorSpatialRepresentation #197

Open mattCensus opened 6 years ago

mattCensus commented 6 years ago

Oxygen is throwing a flag for the following code:

complex 56 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.
smrgeoinfo commented 6 years ago

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"