ISO-TC211/XML

mcc:URI can have no content

Opened this issue · 4 comments

the mcc:URI element can have no content according to the xml schema, the only way to put a URI in is in the uuid attribute defined on gco:AbstractObject. What is the logic for this, or is it an error?

from https://schemas.isotc211.org/19115/-3/mcc/1.0/commonClasses.xsd

<element name="URI" substitutionGroup="gco:AbstractObject" type="mcc:URI_Type">
    <annotation>
      <documentation>Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource</documentation>
    </annotation>
  </element>
  <complexType name="URI_Type">
    <complexContent>
      <extension base="gco:AbstractObject_Type">
        <sequence/>
      </extension>
    </complexContent>
  </complexType>

so in a data instance it looks like this

<mri:conceptIdentifier>
       <mcc:URI uuid="https://example.org/test"/>
</mri:conceptIdentifier>

The rule against not populating both an element & an attribute - where such rule logically exists - can't be enforced in XSD. It has to be in something like Schematron.

In ISO 19139, these "co-constraints" were listed in Table A.1. There wasn't one that matches this particular instance, because ISO 19139 encoded the "logical" URI type specifically as an attribute of type xs:anyURI. I'm pretty sure there weren't any elements that semantically "required" a URI.

In ISO 19115-1:2014, only conceptIdentifier uses the "commonly used" class URI

I'm not sure why ISO 19115-3 didn't include a "co-constraint" requirement on the anyURI type to say that the URI should be in the attribute, or only in one of the attribute & the element.

I guess I'm to blame on this one... slipped through the cracks somehow.

possible fixes...

for <complexType name="URI_Type">

URI as string value in mcc:URI

<extension base="gco:AbstractObject_Type">
        <sequence>
          <element name="uri" type="gco:CharacterString_PropertyType"/>
        </sequence>
      </extension>

OR uri attribute on mcc:URI

      <extension base="gco:AbstractObject_Type">
        <sequence/>     
        <attribute name="uri" type="xs:anyURI"/>
      </extension>

....