|Home MORPH Syntax Instances|
|Sponsored by Magnetar Games||Main - Specification - Forum - Syntax|
Contact Us MORPH
The Instances section holds data which represents a snapshot of a simulation. The element may contain any sequence of nesting of ClassSet and Class elements as desired by the DSL to create a metanode structure for the instance data. The Instances section would not occur in a product definition file, but rather in scenario files. However the <Instances> element must be declared in the DSL's schema for validation purposes.
This is an optional category container for instances. The name of the element may be the class name appended with "Set" or it may be the class's PluralName. The ClassSet element is optional on all levels and may be omitted by the DSL.
The Class element takes on the name of the actual class.
The Instance element represents an instance of an object. Thus this should contain all of the attributes which are valid on instance documents. These are assigned through use of <xs:attributeGroup ref="ClassNameAttrs"/> and/or <xs:group ref="ClassNameGroupAttrs"/>.
Attribute "Prototype" - xs:NMTOKEN - requiredThis attribute references a prototype declared in the Prototypes section.
Attribute "ID" - xs:stringThe ID attribute is optional because it may be inferred from the document by internally numbering all leaf nodes. It is up to the DSL to decide whether it is necessary to provide an explicit ID to each instance, and whether those ID numbers are reused with future instances, or if the number is always reserved even if the instance ceases to exist in the scenario. The format of the IDs (whether they use names or numbers) is not defined.
This element allows a product to assign a value to the user attributes which it has added to classes.
Attribute "Ref" - xs:NMTOKEN - requiredThis must reference the name of a user attribute declared in the ObjectClasses section.
Attribute "Value" - xs:string - requiredThis is the value of the attribute for this instance.