<xsd:element name="bond" id="el.bond">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">A bond between atoms, or between atoms and bonds.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">_bond_ is a child of _bondArray_ and contains bond information. Bond must refer to at least two atoms (normally using _atomRefs2_) but may also refer to more for multicentre bonds. Bond is often EMPTY but may contain _electron_, _length_ or _bondStereo_ elements.</h:div>
<h:div class="example" href="bond1.xml" xmlns:h="http://www.w3.org/1999/xhtml" />
<!--
<h:div class="example" href="bond2.xml"></h:div>
-->
</xsd:documentation>
<xsd:documentation>
<h:div class="validation" href="cmlCore.val.bond.xml" xmlns:h="http://www.w3.org/1999/xhtml" />
</xsd:documentation>
<xsd:appinfo>
<comment xmlns="">Validate Bonds</comment>
<template match="bond" id="val-bond" xmlns="">
<comment>Atom Refs for 2-atom bond</comment>
<variable name="at1" select="substring-before(normalize-space(@atomRefs2),' ')" />
<variable name="at2" select="substring-after(normalize-space(@atomRefs2),' ')" />
<comment>Are atoms distinct?</comment>
<if test="$at1 = $at2">
<call-template name="error">
<with-param name="error">BOND (<value-of select="@id" />): ATOMS not distinct: <value-of select="$at1" /></with-param>
</call-template>
</if>
<comment>Do both atoms exist in current molecule context?</comment>
<if test="not(key('atoms', $at1))">
<call-template name="error">
<with-param name="error">BOND (<value-of select="@id" />): ATOMREF not found: <value-of select="$at1" /></with-param>
</call-template>
</if>
<if test="not(key('atoms', $at2))">
<call-template name="error">
<with-param name="error">BOND (<value-of select="@id" />): ATOMREF not found: <value-of select="$at2" /></with-param>
</call-template>
</if>
</template>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType id="bond.content.id">
<xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="bondType" />
<xsd:element ref="electron">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">One or more electrons associated with the bond.</h:div>
<h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">The _bondRef_ on the _electron_ should point to the id on the bond. We may relax this later and allow reference by context.</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element ref="bondStereo">
<xsd:annotation>
<xsd:documentation>
<h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">The stereo convention for the bond.</h:div>
<h:div class="general" xmlns:h="http://www.w3.org/1999/xhtml">only one convention allowed.</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:choice>
</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="atomRefs2" />
<xsd:attributeGroup ref="atomRefs">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific" xmlns:h="http://www.w3.org/1999/xhtml">This is designed for multicentre bonds (as in delocalised systems or electron-deficient centres. The semantics are experimental at this stage. As an example, a B-H-B bond might be described as
<bond atomRefs="b1 h2 b2"/.</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="bondRefs">
<xsd:annotation>
<xsd:documentation>
<h:div class="specific" xmlns:h="http://www.w3.org/1999/xhtml">This is designed for pi-bonds and other systems where formal valence bonds are not drawn to atoms. The semantics are experimental at this stage. As an example, a Pt-|| bond (as the Pt-ethene bond in Zeise's salt) might be described as <bond atomRefs="pt1" bondRefs="b32"/.</h:div>
</xsd:documentation>
</xsd:annotation>
</xsd:attributeGroup>
<xsd:attributeGroup ref="order" />
</xsd:complexType>
</xsd:element>
|