<xsd:element name="map" id="el.map" substitutionGroup="anyCml">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary">A container for links</h:div>
<h:div class="description">
<h:p>Usage is now standardized with map as the container and link as the individual links. The links are often effectively typed pointers to other parts of the doc. The type can be set for all links by the 'fromType' and 'toType' attributes, either in the map, which then applied to all links by default, or in individual links, when it overrides the map setting. Since ids may not be unique within a doc the refs can be given context with the 'fromRef' and 'toRef' attributes in the map element. If more than one context is used it may be better to use multiple maps. The role of map, and its relationship to RDF is still being developed.</h:p>
<h:p>Currently (2005) map has primarily been used to map atoms between reactants and products, but we also expect shortly to extend it to peak assignments and several otherr areas. A map consists of a number of links, which can be directional, relating two elements through their ids. Reference is through the mandatory 'to' and 'from' attributes which must point to existing id attributes on elements. The type of the dereferenced element can be specified in 'toType' and 'fromType' which, while redundant, is an aid to software and acts as a check on referential type integrity.</h:p>
<h:p>In principle any element can be linked to any other, with 1:1, 1:n, and n:m topology. We expect maps to be used for precise chemical concepts such as reactions, peak assignments, electron management, molecular superpositions, etc. and that these are supported by bespoke code. For other links, especially with complex topology, users should consider whether RDF may be more appropriate.</h:p>
<h:p>In some cases partial mapping is known (e.g. one set of atoms maps to another set), but the precise links are unknown. (This is not the same as n:m mapping where n*m precise links would be expected). In some cases there may be objects such as atomSets or peakGroups which could be linked to support this. Alternatively the 'fromSet' and 'toSet' attributes can be used to hold a list of ids. Thus from='a1 a2' to='b3 b4' might imply that there were two precise links (either {a1=>b3, a2=>b4} or {a1=>b4, a2=>b3}). This is most likely to be used in intermediate documents where more precise semantics can be added later. The ids must all refer to elements of the same type. Note that a 'to' link referencing a single atomSet (toType='atomSet') is not the same as a 'toSet' of toType='atom' with multiple atomIds. The first would require an 'atomSet' element in the doc; the second would not. The precise semantics such as the order of ids are application-dependent. If the order is known in both the toSet and fromSet then individual links should be used rather than adding the burden of deconstruction on the implementer.</h:p>
</h:div>
<h:div class="curation">2005-06-18: added typing and role and updated docs.</h:div>
<h:div class="curation">2006-08-05: added ref attribute.</h:div>
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="anyCml"/>
<xsd:any namespace="##other" processContents="lax"/>
<xsd:any namespace="##local" processContents="lax"/>
</xsd:choice>
<xsd:attributeGroup ref="title"/>
<xsd:attributeGroup ref="id"/>
<xsd:attributeGroup ref="convention"/>
<xsd:attributeGroup ref="dictRef"/>
<xsd:attributeGroup ref="ref"/>
<xsd:attributeGroup ref="fromType">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific">The type of the object/element in the 'from' attributes. Requires the objects referenced by the 'from' attributes to have a given elementType. Can be overridden by 'from' attributes in individual links. 2005-06-18: created</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="toType">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific">The type of the object/element in the 'to' attributes. Requires the objects referenced by the 'to' attributes to have a given elementType. Can be overridden by 'to' attributes in individual links. 2005-06-18: created</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="fromContext">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific">The id of the ancestral element of objects referenced by 'from' attributes. Provides a context for uniquifying the references in the 'from' attributes. Thus atoms referenced by ids should be unique within a given molecule and the id of this could be the 'fromContext'. 2005-06-18: created</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="toContext">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific">The id of the ancestral element of objects referenced by 'to' attributes. Provides a context for uniquifying the references in the 'to' attributes. Thus atoms referenced by ids should be unique within a given molecule and the id of this could be the 'toContext'. 2005-06-18: created</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="role">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific">The role of the map. Semantics are undefined, and can be used to provide a small semi-controlled vocabulary for identifying maps of different types. 2005-06-18: created</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
</xsd:element> |