cml

<h:div class="summary">A general container for CML elements.</h:div>
<h:div class="description">Often the root of the CML (sub)doc. Has no explicit function but can serve to hold the dictionary and namespace and version information, and is a useful tag to alert CML processors and search/XMLQuery tools that there is chemistry in the doc. Can contain any content, but usually a list of molecules and other CML components. The fileId attribute can be used to preserve the origin of the information, though metadat should also be used. Can be nested.</h:div>
<h:div class="example" href="cml1.xml"/>

Element Information

Model

anyCml | ANY element from ANY namespace OTHER than 'http://www.xml-cml.org/schema' | ANY element from LOCAL namespace 'No Namespace'
Children: anyCml

Attributes

QName Type Fixed Default Use Inheritable Annotation
convention namespaceRefType optional
<h:div class="summary">A reference to a convention.</h:div>
<h:div class="description">There is no controlled vocabulary for conventions, but the author must ensure that the semantics are openly available and that there are mechanisms for implementation. The convention is inherited by all the subelements, so that a convention for
  <h:tt>molecule</h:tt>would by default extend to its
  <h:tt>bond</h:tt>and
  <h:tt>atom</h:tt>children. This can be overwritten if necessary by an explicit
  <h:tt>convention</h:tt>.
  <h:p>It may be useful to create conventions with namespaces (e.g.
    <h:tt>iupac:name</h:tt>). Use of
    <h:tt>convention</h:tt>will normally require non-STMML semantics, and should be used with caution. We would expect that conventions prefixed with "ISO" would be useful, such as ISO8601 for dateTimes.</h:p>
  <h:p>There is no default, but the conventions of STMML or the related language (e.g. CML) will be assumed.</h:p>
</h:div>
<h:div class="example" id="ex" href="convGroup1.xml"/>
dictRef namespaceRefType optional
<h:div class="summary">A reference to a dictionary entry.</h:div>
<h:div class="description">Elements in data instances such as _scalar_ may have a
  <h:tt>dictRef</h:tt>attribute to point to an entry in a dictionary. To avoid excessive use of (mutable) filenames and URIs we recommend a namespace prefix, mapped to a namespace URI in the normal manner. In this case, of course, the namespace URI must point to a real XML doc containing _entry_ elements and validated against STMML Schema.
  <h:p>Where there is concern about the dictionary becoming separated from the doc the dictionary entries can be physically included as part of the data instance and the normal XPointer addressing mechanism can be used.</h:p>
  <h:p>This attribute can also be used on _dictionary_ elements to define the namespace prefix</h:p>
</h:div>
<h:div class="example" href="dictRefGroup1.xml"/>
fileId xsd:string optional
<h:div class="summary">Information identifying the name of a file or other resource.</h:div>
<h:div class="description">This allows an element (such as cml) to carry limited information about provenance such as the name of the doc used to provide the content. It is not a complete solution but can help to protect a doc becoming separated from its external metadata. It is restricted to the basic XML character set (printable ANSI) and whitespace (which should anyway be discouraged) is normalized to single space (attribute values cannot carry newlines). Quotation marks and other horrors (as used in some OS) should be avoided.</h:div>
id idType optional
<h:div class="summary">A unique ID for an element.</h:div>
<h:div class="description">Id is used for machine identification of elements and in general should not have application semantics. It is similar to the XML ID type as containing only alphanumerics, '_', ',' and '-' and and must start with an alphabetic character. Ids are case sensitive. Ids should be unique within local scope, thus all atoms within a molecule should have unique ids, but separated molecules within a doc (such as a published article) might have identical ids. Software should be able to search local scope (e.g. all atoms within a molecule). However this is under constant review.</h:div>
title xsd:string optional
<h:div class="summary">A title on an element.</h:div>
<h:div class="description">No controlled value.</h:div>
<h:div class="example" href="title1.xml"/>
version xsd:string optional
<h:div class="summary">The version of the element</h:div>
<h:div class="general">cml or identifier elements can currently have versions. They may be dependent on the date of release and this attribute is highly recommended. There is no controlled syntax.</h:div>
Wildcard: ANY attribute from ANY namespace OTHER than 'http://www.xml-cml.org/schema'

Source

<xsd:element name="cml" id="el.cml" substitutionGroup="anyCml">
  <xsd:annotation>
    <xsd:documentation>
      <h:div class="summary">A general container for CML elements.</h:div>
      <h:div class="description">Often the root of the CML (sub)doc. Has no explicit function but can serve to hold the dictionary and namespace and version information, and is a useful tag to alert CML processors and search/XMLQuery tools that there is chemistry in the doc. Can contain any content, but usually a list of molecules and other CML components. The fileId attribute can be used to preserve the origin of the information, though metadat should also be used. Can be nested.</h:div>
      <h:div class="example" href="cml1.xml"/>
    </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="fileId"/>
    <xsd:attributeGroup ref="version"/>
    <xsd:anyAttribute namespace="##other" processContents="lax"/>
  </xsd:complexType>
</xsd:element>

Sample

< cml xmlns = "http://www.xml-cml.org/schema" xmlns:dc = "http://purl.org/dc/elements/1.1/" convention = "conventions:molecular" >

< dc:title>

test file for http://www.xml-cml.org/conventions/molecular convention

</ dc:title>

< dc:description>

valid molecular - atom has a child but it is not from the CML namespace

</ dc:description>

< dc:author>

J A Townsend

</ dc:author>

< dc:rights>

Copyright J A Townsend jat45@cantab.net 2009.

</ dc:rights>

< dc:date>

2009-01-21

</ dc:date>

< molecule id = "m1" >

< atomArray>

< atom id = "a1" elementType = "H" >

< dc:description>

a non CML element child of atom

</ dc:description>

</ atom>

</ atomArray>

</ molecule>

</ cml>