Contents > 7 SDMetrics Metamodel and XMI Transformation Files > 7.2 XMI Transformation Files > 7.2.3 Tips on Writing XMI Transformations > 7.2.3.5 Optional XMI ID

7.2.3.5 Optional XMI ID

When SDMetrics reads an XMI file, a UML model element is recognized only if its XML element in the XMI source file has an XMI ID, specified by the XML attribute "xmi.id" or "xmi:id". This should be the normal behavior. However, some XMI exporters do not endow all UML model elements with XMI IDs. For such cases, you can specify that an xmitransformation should be applied even if the XML element has no XMI ID:
<xmitransformation modelelement="taggedvalue" xmipattern="UML:TaggedValue" 
      requirexmiid="false">
   <trigger name="tag" ...
   ...
</xmitransformation>
If attribute "requirexmiid" is set to "false", SDMetrics recognizes XML elements which have no XMI ID, as long as the XML element specifies no XMI IDREF cross reference (attribute "xmi.idref" or "xmi:idref") either. By default, "requirexmiid" is "true".