• Object description in content mode
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Content>
<!-- exchanged data -->
<Object metaclass.name="Procedure" id="1">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Content>
</MegaExchange>
Object identification mechanisms
We need to make reference to objects internal or external to the document within the framework of:
- An object modification command
- An object modification command
- The link between one object and another
We distinguish objects described in the document from those not described in the document but which are the object of a command:
- Objects internal to the document: these are described in the document and can be referenced in the document via use of "id" and "idref" attributes of the <Object> tag.
- Objects external to the document: these are not described in the document but can be the target of a command. These should be recognized by the tool processing the document and are identified by the "_idabs" attribute of the object.
Object identification therefore uses either an identifier internal to the document or a MEGA absolute identifier.
Identification internal to the document is by use of the "id" attribute of the <Object> tag. The value of the "id" attribute must be unique throughout the document with no other constraint on form; it is an ID type attribute (ID type is defined in XML1.0 specifications). Reference to a document object is by using the "idref" attribute of the <Object> tag, which must therefore have the same value as the "id" attribute of the <Object> tag representing the referenced object. For example, within the framework of a link, the <Object> tags referencing linked objects can each have an "idref" attribute.
External identification is by definition of an
<Attribute> tag defining the value of its MEGA absolute identifier (object "_idabs" attribute). Objects can be created with an "_idabs" attribute by use of the
<Attribute> tag (see
Description of attribute values). Similarly,
<Object> tags referencing objects, as in the
<Delete>,
<Replace> or
<Link> tags, can identify objects by their MEGA absolute identifier, and in this case they contain an
<Attribute> tag specifying the value of the object "_idabs" attribute.