Each Metafacades descriptor (andromda-metafacades.xml) must comply with the following XSD Schema:
<xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified"><!-- Used for mapping contexts. An example for a context is: An entity is a context for its attributes. So, the metaclass "Attribute" would be mapped to the class for "EntityAttributeFacade" if the Attribute belongs to an entity. If the Attribute belongs to any other Classifier, it would be mapped to a simple "AttributeFacade" and therefore would NOT need the context --><xs:elementname="context"type="xs:string"/><!-- specifies the default metafacade (if a metafacade is not explicitly defined for an element this will be used instead) --><xs:elementname="default"> <xs:complexType> <xs:attributename="class"type="xs:string"use="required"/> </xs:complexType> </xs:element> <xs:elementname="metafacade"> <xs:complexType> <xs:sequence> <xs:elementref="mapping"minOccurs="0"maxOccurs="1"/> <xs:elementref="property"minOccurs="0"maxOccurs="unbounded"/> </xs:sequence> <xs:attributename="class"type="xs:string"use="required"/><!-- You should set the context root to 'true' when the metafacade mapping will be used as a context for other mappings --><xs:attributename="contextRoot"type="xs:boolean"use="optional"default="false"/> </xs:complexType> <xs:uniquename="uniqueMetafacadePropertyName"> <xs:selectorxpath="property"/> <xs:fieldxpath="@name"/> </xs:unique> </xs:element> <xs:elementname="mapping"> <xs:complexType> <xs:sequence> <xs:elementref="stereotype"minOccurs="0"maxOccurs="unbounded"/> <xs:elementref="context"minOccurs="0"maxOccurs="1"/> <xs:elementname="property"minOccurs="0"maxOccurs="unbounded"> <xs:complexTypemixed="true"> <xs:attributename="name"type="xs:string"use="required"/> </xs:complexType> </xs:element> </xs:sequence><!-- defines the class to which this mapping shall apply (can be a metafacade or a metaclass) --><xs:attributename="class"type="xs:string"use="required"/> </xs:complexType> <xs:uniquename="uniqueMetafacadePropertyReference"> <xs:selectorxpath="property"/> <xs:fieldxpath="@reference"/> </xs:unique> </xs:element> <xs:elementname="metafacades"> <xs:complexType> <xs:sequence> <xs:elementref="default"minOccurs="0"maxOccurs="1"/> <xs:elementref="property"minOccurs="0"maxOccurs="unbounded"/> <xs:elementref="metafacade"minOccurs="1"maxOccurs="unbounded"/> </xs:sequence><!-- Specifies the pattern of the classes based on the metaclass interface names, for example '{0}Impl' might be the value, where '{0}' represents the metaclass interface name --><xs:attributename="metaclassPattern"type="xs:string"use="optional"> <xs:annotation> <xs:documentation> Specifies the pattern of the metaclass implementation classes based on the name of the metaclass interface, for example <em>{0}.{1}Impl</em> might be the value, where <em>{0}</em> represents the metaclass interface package and <em>{1}</em> the name of the metafacade. At least one set of registered metafacades must have this attribute defined. </xs:documentation> </xs:annotation> </xs:attribute> </xs:complexType> <xs:uniquename="uniquePropertyReference"> <xs:selectorxpath="property"/> <xs:fieldxpath="@reference"/> </xs:unique> </xs:element><!-- property references are properties you wish to configure on a metafacade, through bean properties --><xs:elementname="property"> <xs:complexType> <xs:attributename="reference"type="xs:string"use="required"/> </xs:complexType> </xs:element> <xs:elementname="stereotype"type="xs:string"/> </xs:schema>