niemopen / niem-model

The NIEM reference data model
Other
11 stars 6 forks source link

Added attribute augmentations for nc:Metadata and cui:PortionMarkingMetadata #70

Closed cdmgtri closed 12 months ago

cdmgtri commented 1 year ago

Added attribute augmentations for nc:Metadata and cui:PortionMarkingMetadata (#46)

The NDR is removing support for the structures:metadata and structures:relationshipMetadata attributes. Metadata properties can now be added to class types directly, via augmentation, or via extension.

For data types (representing a value, like a string or a number), element metadata properties cannot be attached directly. Instead, the NDR will now support attribute augmentations, which allow attributes to be created with representation term Ref and type xs:IDREFS. This XML Schema type allows a set of space-delimited xs:IDREF values, or pointers in XML.

Example schema changes from Core:

+ <xs:attribute name="portionMarkingMetadataRef" type="xs:IDREFS">
+   <xs:annotation>
+     <xs:documentation>An attribute reference to cui:PortionMarkingMetadata.</xs:documentation>
+   </xs:annotation>
+ </xs:attribute>

  <xs:element name="PortionMarkingMetadata" type="cui:PortionMarkingMetadataType" nillable="true">
    <xs:annotation>
      <xs:documentation>Metadata about the Controlled Unclassified Information
       (CUI) portion marking of a document.</xs:documentation>
    </xs:annotation>
  </xs:element>

Example usage in a message:

<my:Message>
  <nc:Person>
    <nc:PersonName>
-     <nc:PersonSurName structures:metadata="P01">Smith</nc:PersonSurName>
+     <nc:PersonSurName cui:portionMarkingMetadataRef="P01">Smith</nc:PersonSurName>
    </nc:PersonName>
  </nc:Person>

  <cui:PortionMarkingMetadata structures:id="M01">
    <!-- ... -->
  </cui:PortionMarkingMetadata>
</my:Message>

The structures metadata attributes were very generic and did not convey what kind of information should be referenced. These new attribute augmentations have semantic names, making the requirements of a message specification clearer.

This approach should be used along with the new support for attribute wildcards in the structures schema, allowing message designers to attach declared attributes to NIEM-conformant complex types (classes or complex data types).