⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmlcore.xsd

📁 化学图形处理软件
💻 XSD
📖 第 1 页 / 共 5 页
字号:
<?xml version="1.0" encoding="utf-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"             xmlns="http://www.xml-cml.org/schema/cml2/core"             xmlns:cmlr="http://www.xml-cml.org/schema/reaction"             xmlns:cmls="http://www.xml-cml.org/schema/spectrum"             xmlns:cmlx="http://www.xml-cml.org/schema/extensions"             xmlns:sch="junk"             xmlns:stm="http://www.xml-cml.org/schema/stmml"             xmlns:xlink="http://www.w3.org/1999/xlink"             xmlns:val="http://www.w3.org/1999/XSL/TransformX"             targetNamespace="http://www.xml-cml.org/schema/cml2/core"             elementFormDefault="qualified"><!-- This schema version is taken from     http://www.xml-cml.org/dtdschema/cmlCore/cmlCore.xsd     on 2002-03-13 and is marked on that site as CML 2.0.          The terms of usage of this XML Schema for CML 2.0 is     given on the http://www.xml-cml.org/ website. -->            <!-- cannot always get this to work; it seems to be relativeto instance directory rather than schema directory.(This was a known Xerces bug - requires entityResolver ...)   <xsd:include schemaLocation="cmlCore0.xsd"/>    <xsd:include schemaLocation="angleUnitsType.xsd"/>    <xsd:include schemaLocation="atomRefs2.xsd"/>    <xsd:include schemaLocation="atomRefs3.xsd"/>    <xsd:include schemaLocation="atomRefs4.xsd"/>    <xsd:include schemaLocation="atomRefArrayType.xsd"/>   <xsd:include schemaLocation="atomIDType.xsd"/>   <xsd:include schemaLocation="countType.xsd"/>   <xsd:include schemaLocation="elementTypeType.xsd"/>   <xsd:include schemaLocation="elementTypeArrayType.xsd"/>   <xsd:include schemaLocation="formalChargeType.xsd"/>   <xsd:include schemaLocation="hydrogenCountType.xsd"/>   <xsd:include schemaLocation="isotopeType.xsd"/>   <xsd:include schemaLocation="lengthType.xsd"/>   <xsd:include schemaLocation="nonHydrogenCountType.xsd"/>   <xsd:include schemaLocation="nonNegativeAngleType.xsd"/>   <xsd:include schemaLocation="nonNegativeNumber.xsd"/>   <xsd:include schemaLocation="occupancyType.xsd"/>   <xsd:include schemaLocation="orderType.xsd"/>   <xsd:include schemaLocation="orderArrayType.xsd"/>   <xsd:include schemaLocation="spacegroupType.xsd"/>   <xsd:include schemaLocation="stereoType.xsd"/>   <xsd:include schemaLocation="stringBuiltinType.xsd"/>    <xsd:include schemaLocation="torsionAngleType.xsd"/>      <xsd:include schemaLocation="angle.xsd"/>   <xsd:include schemaLocation="atom.xsd"/>   <xsd:include schemaLocation="atomArray.xsd"/>   <xsd:include schemaLocation="atomParity.xsd"/>   <xsd:include schemaLocation="bond.xsd"/>   <xsd:include schemaLocation="bondArray.xsd"/>   <xsd:include schemaLocation="cml.xsd"/>   <xsd:include schemaLocation="crystal.xsd"/>   <xsd:include schemaLocation="electron.xsd"/>   <xsd:include schemaLocation="formula.xsd"/>   <xsd:include schemaLocation="length.xsd"/>   <xsd:include schemaLocation="molecule.xsd"/>   <xsd:include schemaLocation="name.xsd"/>   <xsd:include schemaLocation="reaction.xsd"/>   <xsd:include schemaLocation="sequence.xsd"/>   <xsd:include schemaLocation="stereo.xsd"/>   <xsd:include schemaLocation="symmetry.xsd"/>   <xsd:include schemaLocation="torsion.xsd"/>-->   <!-- the head of the schema --><xsd:annotation id="cmlc.ann.curation.0">  <xsd:documentation xml:lang="en">    <div class="curation">      <ul>        <li> Created by hand starting from output of dtd2xsd.      editing to enhance datatypes and content models, etc.      2001-09-21</li>        <li>First draft 2001-10-02</li>        <li>Next draft 2002-09-20 (sic)</li>      </ul>      <p>This schema represents a fundamental core for future CML. Some of the earlier      elements may be obsolete, and some will be moved into new CML schemaspaces. The       vocabulary is essentially unaltered but the syntax is simpler and the validation      is more powerful.</p>    </div>  </xsd:documentation></xsd:annotation><xsd:annotation id="cmlc.ann.xsl-valid">  <xsd:appinfo>    <val:key names="atoms" match="atom" use="@id"/>     <val:key names="bonds" match="bond" use="@id"/>     <val:key names="molecules" match="molecule" use="@id"/>    <val:template name="error">      <val:param name="error"/>      <val:message>XSLT validation error: <val:value-of select="$error"/></val:message>      <val:element name="error">XSLT validation error: <val:value-of select="$error"/>      </val:element>    </val:template>  </xsd:appinfo></xsd:annotation>    <xsd:simpleType name="angleUnitsType" id="st.angleUnitsType">     <xsd:annotation>     <xsd:documentation>       <div class="summary">an enumeration of allowed angle units</div>      <div class="description">      </div>      <div class="example">        <pre>        </pre>      </div>     </xsd:documentation>   </xsd:annotation>   <xsd:restriction base="xsd:string">     <xsd:enumeration value="degrees"/>     <xsd:enumeration value="radians"/>   </xsd:restriction> </xsd:simpleType>    <xsd:simpleType name="atomRefType" id="st.atomRefType">    <xsd:annotation>    <xsd:documentation>      <div class="summary">A reference to an existing atom</div>      <div class="example">         <pre>&lt;molecule id="m1"&gt;  &lt;atomArray&gt;    &lt;atom id="a1"/&gt;  &lt;/atomArray&gt;  &lt;electron id="e1" atomRef="a1"/&gt;&lt;/molecule&gt;</pre>      </div>    </xsd:documentation>    <xsd:appinfo>      <sch:pattern xmlns="http://www.ascc.net/xml/schematron" name="atomRef">        <sch:rule context="bond[@atomRefs2] | stereo[@atomRefs2]">          <sch:assert diagnostics="atomRefFormat" test="//atom/@id=substring-before(normalize-space(@atomRef), ' ')">atom in atomRef must point to existing atom</sch:assert>        </sch:rule>      </sch:pattern>      <sch:diagnostics>        <sch:diagnostic id="atomRefFormat">         Bad atomRef: <xsd:value-of select="@atomRef"/>        </sch:diagnostic>      </sch:diagnostics>     </xsd:appinfo>  </xsd:annotation>  <xsd:restriction base="xsd:string">    <xsd:pattern value=" *[A-Za-z_][A-Za-z0-9\-:_]*\s*"/>  </xsd:restriction></xsd:simpleType>    <xsd:simpleType name="atomRefs2Type" id="st.atomRefs2Type">    <xsd:annotation>    <xsd:documentation>      <div class="summary">A reference to two distinct existing atoms in order</div>      <div class="example">        <pre>&lt;molecule id="m1"&gt;  &lt;atomArray&gt;    &lt;atom id="a1"/&gt;      &lt;atom id="a2"/&gt;  &lt;/atomArray&gt;  &lt;bondArray&gt;    &lt;bond atomRefs2="a1 a2"/&gt;  &lt;/bondArray&gt;&lt;/molecule&gt;</pre>      </div>    </xsd:documentation>    <xsd:appinfo>      <sch:pattern xmlns="http://www.ascc.net/xml/schematron" name="atomRefs2">        <sch:rule context="bond[@atomRefs2] | stereo[@atomRefs2]">          <sch:assert diagnostics="atomRef2Format" test="not(substring-before(normalize-space(@atomRefs2), ' ')                =substring-after(normalize-space(@atomRefs2), ' '))">atoms in atomRefs must be distinct</sch:assert>          <sch:assert diagnostics="atomRef2Format" test="//atom/@id=substring-before(normalize-space(@atomRefs2), ' ')">first atom in atomRefs2 must point to existing atom</sch:assert>          <sch:assert diagnostics="atomRef2Format" test="//atom/@id=substring-after(normalize-space(@atomRefs2), ' ')">second atom in atomRefs2 must point to existing atom</sch:assert>        </sch:rule>      </sch:pattern>      <sch:diagnostics>               <sch:diagnostic id="atomRef2Format">            Bad atomRef2: <xsd:value-of select="@atomRefs2"/>               </sch:diagnostic>            </sch:diagnostics>          </xsd:appinfo>      </xsd:annotation>      <xsd:restriction base="xsd:string">         <xsd:pattern value="\s*\S+\s+\S+\s*"/>      </xsd:restriction>   </xsd:simpleType>       <xsd:simpleType name="atomRefs3Type" id="st.atomRefs3Type">        <xsd:annotation>         <xsd:documentation>      <div class="summary">A reference to three distinct existing atoms in order</div>      <div class="example">       <pre>&lt;molecule id="m1"&gt;  &lt;atomArray&gt;    &lt;atom id="a1"/&gt;      &lt;atom id="a2"/&gt;    &lt;atom id="a3"/&gt;  &lt;/atomArray&gt;  &lt;angle atomRefs3="a1 a2 a3" units="degrees"&gt;123.4&lt;/angle&gt;&lt;/molecule&gt;       </pre>      </div>         </xsd:documentation>         <xsd:appinfo>            <sch:pattern xmlns="http://www.ascc.net/xml/schematron" name="atomRefs3">               <sch:rule context="angle[@atomRefs3]">                  <sch:assert test="//atom/@id=substring-before(normalize-space(@atomRefs3), ' ')">first atom in atomRefs3 must point to existing atom</sch:assert>                  <sch:assert test="//atom/@id=substring-before(substring-after(normalize-space(@atomRefs3), ' '), ' ')">second atom in atomRefs3 must point to existing atom</sch:assert>                  <sch:assert test="//atom/@id=substring-after(substring-after(normalize-space(@atomRefs3), ' '), ' ')">third atom in atomRefs3 must point to existing atom</sch:assert>                  <sch:assert test="not(substring-before(normalize-space(@atomRefs3), ' ')                 =substring-after(substring-after(normalize-space(@atomRefs3), ' '), ' '))">atoms 1/3 in atomRefs3 must be distinct</sch:assert>                  <sch:assert test="not(substring-before(normalize-space(@atomRefs3), ' ')                 =substring-before(substring-after(normalize-space(@atomRefs3), ' '), ' '))">atoms 1/2 in atomRefs3 must be distinct</sch:assert>                  <sch:assert test="not(substring-after(substring-after(normalize-space(@atomRefs3), ' '), ' ')                 =substring-before(substring-after(normalize-space(@atomRefs3), ' '), ' '))">atoms 2/3 in atomRefs3 must be distinct</sch:assert>               </sch:rule>            </sch:pattern>         </xsd:appinfo>      </xsd:annotation>      <xsd:restriction base="xsd:string">         <xsd:pattern value="\s*(\S+\s+){2}\S+\s*"/>      </xsd:restriction>   </xsd:simpleType>       <xsd:simpleType name="atomRefs4Type" id="st.atomRefs4Type">        <xsd:annotation>         <xsd:documentation>      <div class="summary">A reference to four distinct existing atoms in order</div>      <div class="example">       <pre>&lt;molecule id="m1"&gt;  &lt;atomArray&gt;    &lt;atom id="a1"/&gt;      &lt;atom id="a2"/&gt;    &lt;atom id="a3"/&gt;    &lt;atom id="a4"/&gt;  &lt;/atomArray&gt;  &lt;torsion atomRefs4="a1 a2 a3 a4" units="degrees"&gt;123.4&lt;/torsion&gt;&lt;/molecule&gt;       </pre>      </div>         </xsd:documentation>         <xsd:appinfo>            <sch:pattern xmlns="http://www.ascc.net/xml/schematron" name="atomRefs4">               <sch:rule context="torsion[@atomRefs4] | atomParity[@atomRefs4]">                  <sch:assert test="//atom/@id=substring-before(normalize-space(@atomRefs4), ' ')">first atom in atomRefs4 must point to existing atom</sch:assert>                  <sch:assert test="//atom/@id=substring-before(substring-after(normalize-space(@atomRefs4), ' '), ' ')">second atom in atomRefs4 must point to existing atom</sch:assert>                  <sch:assert test="//atom/@id=substring-before(substring-after(substring-after(normalize-space(@atomRefs4), ' '), ' '), ' ')">third atom in atomRefs4 must point to existing atom</sch:assert>                  <sch:assert test="//atom/@id=substring-after(substring-after(substring-after(normalize-space(@atomRefs4), ' '), ' '), ' ')">fourth atom in atomRefs4 must point to existing atom</sch:assert> have to hack non-equivalence - with 6 assertions            </sch:rule>            </sch:pattern>         </xsd:appinfo>      </xsd:annotation>      <xsd:restriction base="xsd:string">         <xsd:pattern value="\s*(\S+\s+){3}\S+\s*"/>      </xsd:restriction>   </xsd:simpleType>       <xsd:simpleType name="atomRefArrayType" id="st.atomRefArrayType">        <xsd:annotation>         <xsd:documentation>      <div class="summary">An array of atomRefs</div>      <div class="description">            <p>The atomRefs         cannot be schema- or schematron-validated. Instances of this type will         be used in array-style representation of bonds and atomParitys.         It can also be used for arrays of atomIDTypes such as in complex setereochemistry,         geometrical definitions, atom groupings, etc.</p> </div>      <div class="example">       <pre>&lt;molecule id="m1"&gt;  &lt;atomArray atomID="a2 a4 a6"        elementType="O N S"/&gt;&lt;/molecule&gt;       </pre>      </div>         </xsd:documentation>         <xsd:appinfo>         </xsd:appinfo>      </xsd:annotation>      <xsd:list itemType="atomRefType"/>   </xsd:simpleType>   <xsd:simpleType name="atomIDType" id="st.atomIDType">     <xsd:annotation>      <xsd:documentation>   <div class="summary">An identifier for an atom</div>   <div class="description">         <p>Of the form prefix:suffix where prefix and suffix         are purely alphanumeric (with _ and -) and prefix         is optional. This is similar to XML IDs (and we promote         this as good practice for atomIDs. Other punctuation and          whitespace is forbidden, so IDs from (say) PDB files are         not satisfactory.</p>         <p>The prefix is intended to form a pseudo-namespace so that         atom IDs in different molecules may have identical suffixes.          It is also useful if the prefix is the ID for the molecule         (though this clearly has its limitation). Atom IDs should not         be typed as XML IDs since they may not validate.</p>         </div>   <div class="example">   <pre>&lt;cml&gt;  &lt;molecule id="m1"&gt;    &lt;atomArray&gt;&lt;!-- this atom might be referenced as m1:a2. This is not formally     part of CML yet --&gt;      &lt;atom id="a2" elementType="O"/&gt;    &lt;/atomArray&gt;  &lt;/molecule&gt;  &lt;molecule id="m2"&gt;    &lt;atomArray&gt;&lt;!-- this atom might be referenced as m2:a2. This is not formally     part of CML yet --&gt;      &lt;atom id="a2" elementType="O"/&gt;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -