Notes on Tools
NIST XMI Validator Validation Criteria
The validator currently checks the following conformance criteria:
- UML/XMI anomalies: Many processors may function OK despite these
(including the Validator) but interoperability may be impaired:
- An object referenced was not found in the file. Details
- The XMI uses a URI the Validator cannot resolve Details
- An XMI href dereferences to a primitive type or element in a version of UML other than that of the model. Details
- The members of a Set are not unique. Details
- A property of the object doesn't specify a value where one is required. Details
- No class with the name specified exists in the metamodel. Details
- The class of the object does not define the property specified. Details
- The processor cannot infer the type implied. Details
- The value of a property violates the multiplicity constraint
of the property. Details
- The value of a property is incompatible with its declared type. Details
- The object to be extended by the stereotype, referenced by its xmi:id, could not be found. Details
- The object to be extended by the stereotype is not of a type that can be
extended by the stereotype. Details
- The same type of stereotype is applied multiply to the object. Details
- The file contains XMI elements from a stereotype inside the uml:Model XML element. Details
- Direct creation of an instance of an abstract class is implied. Details
- The evaluation of an OCL constraint against the object returned ocl:False. Details
- There was an error while executing OCL code. Details
- There is an error in the metamodel causing a type exception. Details
- There was an error while executing OCL that provides the value of a derived attribute. Details
- OCL code tried to evaluate a declared derived attribute for which derivation is absent. Details
- The file contains two or more XML elements with identical xmi:id. Details
- A PrimitiveType was expected; what was found is not that. Details
- A list of references specified by XMI encoding rule 2j uses
more than one space between references. Details
- The file serializes a default value. Details
- The file serializes a derived value. Details
- The file serializes values for the opposite of a property declared composite. Details
- A cycle exists in the uml:OwnedElement property of the reported elements. Details
- The xmi:type attribute was specified with an XML element that uses href. Details
- Major errors: It is unlikely that a processor will function when faced with these.
(The valiadator will report the error and stop.):
- An error that is not classified. See the error text for details.
- Either an XMI namespace was not provided or what was provided is not known to be associated with XMI.
- No uml:Model element can be found in the XMI file.
- XML errors.
- Validator Limitations: These are things that are not problems with the
exchange file, but rather current limitations of the validation tool. The
Validator sometimes sets properties in the model to an enumeration value
'TOOL-LIMITATION' to express the occurrence of the limitation. Instances of these
are reported too.
Additional notes about the Validator
Here are some things to keep in mind when using the Validator:
- Objects are represented as:
The 'id' has no meaning outside of the Validator.
- < 'className' 'instanceName', id='someNumber'> if it is a NamedElement with a name;
- < 'className' <<'stereotypeName'>> 'instanceName', id='someNumber'>
if it is stereotyped object with a name;
- < 'className' [unnamed], id='someNumber'> if it is an unnamed NamedElement, and;
- < 'className' id='someNumber'> otherwise.
- Enumerations are represented as the enumeration value preceded by a '#'.
- Collections are represented by < Set|Bag|Sequence|OrderedSet of 'elementCount' 'type' >
- The value of a Collection is represented by ['value' , 'value'....].
- Unset values are represented by 'null'
- The errors are listed in an order suggested for their resolution
(resolve the earlier ones first). The reason we suggest this ordering
is that some of the earlier errors have repercusions (they produce subsequent errors).
There is little point in investigating a 'missing mandatory' value error,
for example, when the source of the error is reported more specifically
as use of an xmi:idref where the referent is not in the file.
- When the Model attempts to define a Set, but the members supplied
contain duplicates, the Validator reports the error and creates a Bag
with all the members. Using a Bag might have repercusions in later
processing, but removing the duplicates and creating a Set is
simplistic and can also lead to downstream problems. Note: The error
message, but not the Model, describes the object as a Set. The corresponding
Bag in the Model has an id one greater than the offending Set object
reported in the error message.
- Validator results are available for 30 minutes after the file is run.
After 30 minutes, the information associated with the run (information
attached to the session cookie) is garbage collected.
If 30 minutes seems too short, let me know.
The Model Diff capability is used to compar an uploaded user model of a MIWG test case
against a reference model of that test case. It reports where one of the two models
has an element that the other does not, and where values of properties of elements
Models Pre-loaded into the Validator
The models listed below are loaded into the Validator and can be referenced as a whole
through the 'XML namespace URI' shown. Elements of the model can be referenced through
the 'XMI href URI' shown.
CMOF 2.0 (cmof)XML namespace URI:
http://schema.omg.org/spec/MOF/2.0/XMI href URI:
Generated from infralib/10-08-15-cleanup.xmi (which is a metamodel specified in UML).
updated with OCL from uml23 only where appropriate. (I hope!)
Send questions or comments to