Format in Detail
In the remainder of this document, MEGA data exchange XML format will be referred to as "MEGA XML".
MEGA data exchange XML document structure
Physical structure
Like all XML documents, MEGA XML documents must start with XML declaration:
<?xml version="1.0"?>.
Encoding can be specified using the "encoding" attribute.
<?xml version="1.0" encoding="ISO-8859-1"?>
MEGA XML documents should be expressed in a code supported by the applications used to process them. For example, before importing a MEGA XML document it should be confirmed that MEGA can handle documents in the encoding proposed. MEGA import, like any XML analyzer, can basically handle input of Unicode encodings: UTF-8, UTF-16 little endian and big endian and ASCII. Other encodings such as ISO Latin1 FR can be used.
Note: see XML specifications for values to be specified for the "encoding" attribute (ref. Extensible Markup Language (XML) 1.0:
http://www.w3.org/TR/2004/REC-xml-20040204/), and MEGA documentation to determine supported encodings.
Note: values that can be specified for the "encoding" attribute to identify the different encodings:
• "ISO-8859-1" corresponds to ISO Latin-1 FR encoding
• "UTF-8" corresponds to Unicode encoding on one or several bytes per character
• "UTF-16" corresponds to Unicode encoding on a multiple of two bytes per character
Logical structure
Like all XML documents, MEGA XML documents can have only one root tag, its name being <MegaExchange>.
A MEGA XML document firstly contains information relating to the document itself, such as the document creation date, the format version used or the attribute value expression language. This information is described in a <Header> tag.
In addition, information exchanged must be expressed either in a <Commands> tag, or in a <Content> tag
Example : MEGA data exchange XML document structure
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="format_version">Mega Xml Format Version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged data -->
<Add>
<Object metaclass.name="Procedure" id="1">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
Exchanged data description modes
Data exchanged via MEGA XML documents can be described in two modes:
- Either as a series of commands to be processed one after the other.
- Or as a repository content or sub-content, in other words as a set of objects.
Command exchange: <Commands> tag
Command series data expression mode is by use of the <Commands> tag.
It is this tag that contains command description tags in XML. The order of command description tags within the <Commands> tag is significant. It corresponds to the order in which commands must be processed by the MEGA XML document analysis tools. In fact, a command may not be validated unless preceding commands have been processed.
For example, if a command for creation of a link between two objects appears before the command for creation of one (or both) of the objects themselves, the link creation command is not valid from a logical viewpoint.
Example : Command exchange
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Procedure" id="1">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
Content exchange: <Content> tag
Content description mode uses the <Content> tag. This tag contains a collection of objects and links.
These objects and links should be interpreted as independent data free of any context: they are not connected to a particular repository and do not require any other data in order to be significant (except for the metamodel describing them).
Data of an XML exchange document using description mode produces creation commands (creation of described objects and links) when the document is imported.
Order of appearance of tags describing data contained in the <Content> tag is significant. It corresponds to the order in which data must be processed by the MEGA XML document analysis tools.
If a link between two objects appears before one (or both) of the objects themselves, the link description is not valid from a logical viewpoint.
Example : Content description mode data exchange
<?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>
In content description mode, we can explicitly show the hierarchical view of exchanged data structure. In fact, tags describing objects can themselves contain other tags describing contained objects from a logical viewpoint (for example a procedure containing operations).
This hierarchical description is valid only in content description mode.
Example : <Object> tag containing an <Object> tag
<?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>
<!-- hierarchical link use -->
<Link metaassociationend.name="Contained operation">
<!-- contained object -->
<Object metaclass.name="Operation" id="2">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Link>
</Object>
</Content>
</MegaExchange>
Commands description: <Add>, <Delete>, <Replace> tags
Command tags can be used only in command mode. These tags are contained in the
<Commands> tag explained in the chapter
Command exchange: <Commands> tag.
The three available commands are:
- Creation command represented by an <Add> tag.
- Deletion command represented by a <Delete> tag.
- Modification command represented by a <Replace> tag.
Each of these three commands can be applied to an object or to a link: a tag representing a command can contain one tag only: <Object> or <Link>.
In command mode, <Object> tags cannot directly or indirectly contain other <Object> tags. : The hierarchical aspect of exchanged data logical structure cannot be represented by the hierarchical aspect of XML when data is exchanged in command mode.
Example : Object and link creation commands
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Class">
<Attribute metaattribute.name="UML ClassName (Français)">Ma classe</Attribute>
</Object>
</Add>
<Add>
<Link frommetaclass.name="Package" metaassociationend.name="Contained class ">
<Object metaclass.name="Package">
<Attribute metaattribute.name="Name">My package</Attribute>
</Object>
<Object metaclass.name="Class">
<Attribute metaattribute.name="Name">My org-unit</Attribute>
</Object>
<Attribute metaattribute.name="Order">9999</Attribute>
</Link>
</Add>
</Commands>
</MegaExchange>
Object Descriptions
Objects are described by the <Object> tag..
The MetaClass of the object is identified by the name or MEGA absolute identifier (idabs in hexadecimal) of the MetaClass. The name of the MetaClass is specified by the value of the "metaclass.name" attribute of the <Object> tag, the idabs of the MetaClass is specified by the value of the "metaclass.id" attribute of the <Object> tag.
In addition, the objects themselves must be identified when we wish to make reference to them in the exchange document (see
Object identification mechanisms).
Example : Object metaclass identification by metaclass name
<?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">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Content>
</MegaExchange>
Example : Object metaclass identification by metaclass idabs
<?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.id="B1EDB25E2C1401BB">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Content>
</MegaExchange>
Command Mode
In commands description mode, an object is described in an <Add>, <Delete> or <Replace> tag, depending on whether we wish to create, delete or modify the object.
In this case, the <Object> tag describing the object can if necessary contain an <Extension> tag containing information not allowed for by MEGA XML format. It also contains <Attribute> tags specifying attribute values characterizing this object, these tags following the <Extension> tag if this is present.
Example : Object creation command by attribute specification
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Procedure" id="1">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
<Attribute metaattribute.name="Type-Procedure">General</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
An object described in a deletion command must make reference to an existing object recognized by the tool analyzing the MEGA XML document. The object description must therefore specify the value of its MEGA absolute identifier (object "_idabs" attribute) in an <Attribute> tag.
Example : Object deletion command
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Delete>
<Object metaclass.name="Procedure">
<!-- object identifier attribute -->
<Attribute metaattribute.name="_IdAbs">MnJgyaAJ0100</Attribute>
</Object>
</Delete>
</Commands>
</MegaExchange>
An object described in a modification command must make reference to an existing object recognized by the tool analyzing the MEGA XML document. The object description must therefore specify the value of its MEGA absolute identifier (object "_idabs" attribute) in an <Attribute> tag. In addition to the <Attribute> tag specifying the MEGA absolute identifier value, we find <Attribute> tags giving the values of attributes to be changed for the object concerned.
Example : Object modification command
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Replace>
<Object metaclass.name="Procedure">
<!-- object identifier attribute -->
<Attribute metaattribute.name="_IdAbs">MnJgyaAJ0100</Attribute>
<!-- modified attribute -->
<Attribute metaattribute.name="Code-Procedure">XYZ</Attribute>
</Object>
</Delete>
</Commands>
</MegaExchange>
Content Mode
In content description mode, <Object> tags describing objects are contained in the <Content> tag.
The <Object> tag describing the object can if necessary contain an <Extension> tag containing information not allowed for by MEGA XML format. It also contains <Attribute> tags specifying attribute values characterizing this object. These tags follow the <Extension> tag if this is present.
In addition, in content description mode, objects can be described as containing other objects. The
<Object> tag can therefore indirectly contain other
<Object> tags describing contained objects (see
Hierarchical link in content mode).
The same considerations apply to <Object> tags representing contained objects, which can themselves contain <Object> tags.
Example: 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.
Example : Identification by <Object> tag id attribute
<?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>
<Object metaclass.name="Procedure" id="2">
<Attribute metaattribute.name="Name">Procedure–2</Attribute>
</Object>
<Link frommetaclass.name="Procedure" metassociationend.name="Next procedure">
<Object metaclass.name="Procedure" idref="1"/>
<Object metaclass.name="Procedure" idref="2"/>
</Link>
</Content>
</MegaExchange>
Example : Identification by idabs
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Procedure">
<Attribute metaattribute.name="Name">Procedure–1</Attribute>
<!-- object identifier attribute -->
<Attribute metaattribute.name="_IdAbs">MnJgyaAJ0100</Attribute>
</Object>
</Add>
<Delete>
<Object metaclass.name="Procedure">
<!-- object identifier attribute -->
<Attribute metaattribute.name="_IdAbs">MnJgyaAJ0100</Attribute>
</Object>
</Delete>
</Commands>
</MegaExchange>
Link description
Links are described by the <Link> tag..
The MetaAssociation of the link is identified by the name or MEGA absolute identifier (idabs in hexadecimal form) of the MetaAssociationEnd by which the objects are connected.
The name of the MetaAssociationEnd is specified by the value of the "metaassociationend.name" attribute of the <Link> tag.
The idabs of the MetaAssociationEnd is specified by the value of the "metaassociationend.id" attribute of the <Link> tag.
One of the attributes "metaassociationend.name" or "metaassociationend.id" must be present to identify the link. Both can be present simultaneously.
Hierarchical link in content mode
In content mode, a link can be represented hierarchically. The <Object> tag representing the first object therefore contains a <Link> tag which itself contains the <Object> tag describing the connected object.
The <Link> tag serves to specify the MetaAssociationEnd by which the second object is connected. To do this, we must therefore specify the "metaassociationend.name" attribute or the "metaassociationend.id" attribute.
In addition, the <Link> tag can contain <Attribute> tags describing link attribute values. These <Attribute> tags are placed before the <Object> tag.
Example: Hierarchical ink 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>
<!-- hierarchical link use -->
<Link metaassociationend.name="Contained operation">
<!-- link attributes -->
<Attribute metaattribute.name="Order">1</Attribute>
<!-- contained object -->
<Object metaclass.name="Operation" id="2">
<Attribute metaattribute.name="Name">Procedure-1</Attribute>
</Object>
</Link>
</Object>
</Content>
</MegaExchange>
Other links
Links that are not hierarchical links can be used in both command mode command tags (<Add>, <Delete>, <Replace>) and in the content mode <Content> tag. These links make reference to two connected objects describing but not referencing these objects. The connected objects can be external to the document.
A link between two objects is described by the MetaAssociationEnd by which the second object is connected to the first. To do this, the <Link> tag representing the link contains either the MetaAssociationEnd idabs value in hexadecimal form in the "metaassociationend.id" attribute, or the MetaAssociationEnd name value in the "metaassociationend.name" attribute. In the latter case, the MetaClass of origin of the MetaAssociationEnd must be specified, ie. the MetaClass of the first object. This is done via the "frommetaclass.id" or "frommetaclass.name" attributes of the <Link> tag, specifying either the MetaClass idabs in hexadecimal form or the MetaClass name.
In addition, the <Link> tag contains two <Object> tags that reference the two connected objects. Each of these has a "metaclass.id" attribute specifying either the MetaClass idabs in hexadecimal form, or a "metaclass.name" attribute specifying its name. The object is referenced either by specifying the "idref" attribute value of the <Object> tag in the <Link> tag, which should be equal to the "id" attribute value of the <Object> tag describing the object referenced in the document, or by adding an <Attribute> tag specifying the "_idabs" attribute value of the referenced object, which in this case can be an object not described in the document.
Finally, the <Link> tag can contain <Attribute> tags describing link attribute values. These <Attribute> tags are placed after the two <Object> tags.
Example : Description of a link between two objects of the document: use of “idref” attribute
<?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="Package" id="1">
<Attribute metaattribute.name="Name">Package-1</Attribute>
</Object>
<Object metaclass.name="Package" id="2">
<Attribute metaattribute.name="Name">Package-2</Attribute>
</Object>
<Link frommetaclass.name="Package" metaassociationend.name="Referenced package">
<!-- link source object -->
<Object metaclass.name="Package" idref="1"/>
<!-- link destination object -->
<Object metaclass.name="Package" idref="2"/>
<!-- link attributes -->
<Attribute metaattribute.name="Order">9999</Attribute>
</Link>
</Content>
</MegaExchange>
Example : Description of a link between two objects by idabs
<?xml version="1.0" encoding="ISO-8859-1"?>
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Link frommetaclass.name="Package" metaassociationend.name="Referenced package">
<!-- link source object -->
<Object metaclass.name="Package">
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
</Object>
<!-- link destination object -->
<Object metaclass.name="Package">
<Attribute metaattribute.name="_idabs">dCyP0ZtmxSA8</Attribute>
</Object>
<!-- link attributes -->
<Attribute metaattribute.name="Order">9999</Attribute>
</Link>
</Add>
</Commands>
</MegaExchange>
Description of attribute values
Attribute values are specified in <Attribute> tags. The following tags can contain attribute values: <Header>, <Link>, <Object>, <Add>, <Delete>, <Replace>.
In an <Attribute> tag, the valuated characteristic is identified by the "metaattribute.name" attribute, which determines its name, or by the "metaattribute.id" attribute, which determines its idabs in hexadecimal form.
The value is directly contained in the <Attribute> tag..
Example : Description of an attribute value
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Package">
<!-- object attributes -->
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
<Attribute metaattribute.name="nom">Packagee-1</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
Attribute value format
Direct values in <Attribute> tags are expressed in the format specified by the <Attribute> tag representing the "default_format" attribute of the <Header> tag.
If this attribute is not specified, default format is left to the tool analyzing the document.
Example : Attribute value default format
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
<Attribute metaattribute.name="default_format">internal</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Package">
<!-- object attributes -->
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
<Attribute metaattribute.name="nom">Packagee-1</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
The <Attribute> tag enables attribute value specification in several formats. The different forms that the attribute value can take are each contained in a <Value> tag, the format being specified by the <Value> tag "format" attribute.
Example : Attribute value expressed in several formats
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="xmg_version">XMG version 0.1</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Application">
<!-- object attributes -->
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
<Attribute metaattribute.name="name">Application-1</Attribute>
<Attribute metaattribute.name="MMI">
<Value format="internal">W</Value>
<Value format="display">Windowed</Value>
</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
Translatable attributes and attribute value expression language
In the MEGA repository, for a given translatable attribute, there are as many attributes as there are languages into which the attribute is translatable. For example, for the "Name" attribute there are corresponding "Name (English)","Name (French)", "Name (Dutch)", etc. attributes.
In a MEGA XML document, the "language.id" and "language.name" attributes of the <Value> tag enable specification of the language in which the attribute value is expressed.
Translatable attributes are therefore identified by the name or absolute identifier of the root attribute using the "metaattribute.name" and "metaattribute.id" attributes of the <Attribute> tag, and the language in which the value is expressed using the "language.name" and "language.id" attributes.
For value expression language to be specified, at least one of the two attributes "language.name" or "language.id" must be present in the <Value> tag.
When neither the "language.name" nor the "language.id" attribute is present, the value is expressed in the language specified by the <Attribute> tag representing the "model_default_language" attribute of the <Header> tag.
Example : Attribute value expressed in default language
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="model_default_language"> Français</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Application">
<!-- object attributes -->
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
<Attribute metaattribute.name="name">Application-1</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
Example : Attribute value expressed in several languages
<MegaExchange>
<Header>
<!-- document information -->
<Attribute metaattribute.name="model_default_language"> Français</Attribute>
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Application">
<!-- object attributes -->
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
<Attribute metaattribute.name="name">
<Value>Invoicing</Value>
<Value language.name="English">Invoicing</Value>
</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
MEGA XML format extensions
MEGA XML format includes an extension mechanism enabling addition of information to different format tags.
A format extension is created by use of the <Extension> tag. The extension tag can contain any information expressed in XML.
Information contained in the <Extension> tag is not part of the format. It cannot be taken into account by a tool using MEGA XML format.
The following tags can contain an extension tag: <Header>, <Link>, <Object>, <Add>, <Delete>, <Replace>.
Example of use of the <Extension> tag by MEGA
The <Extension> tag is used by the MEGA import function which creates a report of commands analyzed at import. The report contains commands analyzed in MEGA XML format indicating if they have been accepted, rejected or contain warnings. Therefore each MEGA XML format command in the report can contain an <Error> tag or <Warning> tags in the <Extension> tag of the command concerned. These tags enable appreciation of the import result, but are not to be taken into account in another context.
Example 1 : Use of the <Extension> tag by MEGA
<MegaExchange>
<Header>
<!-- document information -->
</Header>
<Commands>
<!-- exchanged commands -->
<Add>
<Object metaclass.name="Application">
<Extension>
<Error code="XXXXXXXX">There is no « metaattribute » with « color » value as « name »<Error>
</Extension>
<!-- object attributes -->
<Attribute metaattribute.name="_idabs">ODiTpSNApa10</Attribute>
<Attribute metaattribute.name="name">Invoicing</Attribute>
<Attribute metaattribute.name="color">blue</Attribute>
</Object>
</Add>
</Commands>
</MegaExchange>
Attributes of MEGA XML documents used by MEGA
A MEGA XML document exported from a MEGA repository contains a certain number of attributes that describe general elements relating to the document itself. These are described in this section.
Document attributes are located in the <Header> tag of the document.
Example: Document attributes
<?xml version="1.0" encoding="UTF-8"?>
<MegaExchange>
<Header>
<Attribute metaattribute.id="27C729AE3F4E004A" metaattribute.name="exchange_format_version">
<Value format="internal">000100</Value>
<Value format="display">MEGA XML version 0.1</Value>
</Attribute>
<Attribute metaattribute.id="27C729AE3F4E0050" metaattribute.name="mega_version">
<Value format="internal">25856</Value>
<Value format="display">MEGA Version 2005 Pre release</Value>
</Attribute>
<!-- ... -->
</Header>
<Commands>
<!-- ... -->
</Commands>
</MegaExchange>
Document attributes list
• exchange_format_version : this attribute indicates the version of MEGA XML exchange format.
• mega_version : this attribute indicates the version of MEGA used at export.
• metamodel_language : this attribute specifies the language used to identify types in the attributes of "metaclass.name", "metaattribute.name", "metaassociationend.name" tags.
• model_default_language : this attribute specifies the default language used for translatable attribute values of objects and links when the language has not been specified by "language.name" or "language.id" attributes of the <Value> tag.
• author : the value of the author attribute identifies the user that executed export.
• source_database : the value of the source_database attribute identifies the repository from which export was executed.
• creation_date : specifies MEGA XML document creation date.