STMML supports domain-independent STM information components
STM-ML defines a number of data types suited to STM. It also defines a number of complex data strucures such as arrays, matrices and tables. the constraints are sometimes created through elements and sometimes through attributes. We classify the general components as follows:
Abstract Data Structures
Links and References
Data-based simpleTypes
Common attribute types
array manages a homogenous 1-dimensional array of similar objects. These can be encoded as strings (i.e. XSD-like datatypes) and are concatenated as string content. The size of the array should always be >= 1.
The default delimiter is whitespace. The normalize-space() function of XSLT could be used to normalize all whitespace to single spaces and this would not affect the value of the array elements. To extract the elements java.lang.StringTokenizer could be used. If the elements themselves contain whitespace then a different delimiter must be used and is identified through the delimiter attribute. This method is mandatory if it is required to represent empty strings. If a delimiter is used it MUST start and end the array - leading and trailing whitespace is ignored. Thus size+1 occurrences of the delimiter character are required. If non-normalized whitespace is to be encoded (e.g. newlines, tabs, etc) you are recommended to translate it character-wise to XML character entities.
Note that normal Schema validation tools cannot validate the elements of array (they are defined as string) However if the string is split, a temporary schema can be constructed from the type and used for validation. Also the type can be contained in a dictionary and software could decide to retrieve this and use it for validation.
When the elements of the array are not simple scalars (e.g. scalars with a value and an error, the scalars should be used as the elements. Although this is verbose, it is simple to understand. If there is a demand for more compact representations, it will be possible to define the syntax in a later version.
<array size="5" title="value" dataType="xsd:decimal"> 1.23 2.34 3.45 4.56 5.67</array>
the size attribute is not mandatory but provides a useful validity check):
<array size="5" title="initials" dataType="xsd:string" delimiter="/">/A B//C/D-E/F/</array>
Note that the second array-element is the empty string ''.
<array title="mass" size="4" units="unit:g" errorBasis="observedStandardDeviation" minValues="10 11 10 9" maxValues="12 14 12 11" errorValues="1 2 1 1" dataType="xsd:float">11 12.5 10.9 10.2 </array>
scalar holds scalar data under a single generic container. The semantics are usually resolved by linking to a dictionary. scalar defaults to a scalar string but has attributes which affect the type.
scalar does not necessarily reflect a physical object (for which object should be used). It may reflect a property of an object such as temperature, size, etc.
Note that normal Schema validation tools cannot validate the data type of scalar (it is defined as string), but that a temporary schema can be constructed from the type and used for validation. Also the type can be contained in a dictionary and software could decide to retrieve this and use it for validation.
<scalar dataType="xsd:decimal" errorValue="1.0" errorBasis="observedStandardDeviation" title="body weight" dictRef="zoo:bodywt" units="units:g">34.3</scalar>
By default matrix represents a rectangular matrix of any quantities representable as XSD or STMML dataTypes. It consists of rows*columns elements, where columns is the fasting moving index. Assuming the elements are counted from 1 they are ordered V[1,1],V[1,2],...V[1,columns],V[2,1],V[2,2],...V[2,columns], ...V[rows,1],V[rows,2],...V[rows,columns]
By default whitespace is used to separate matrix elements; see array for details. There are NO characters or markup delimiting the end of rows; authors must be careful!. The columns and rows attributes have no default values; a row vector requires a rows attribute of 1.
matrix also supports many types of square matrix, but at present we require all elements to be given, even if the matrix is symmetric, antisymmetric or banded diagonal. The matrixType attribute allows software to validate and process the type of matrix.
<matrix id="m1" title="mattrix-1" dictRef="foo:bar" rows="3" columns="3" dataType="xsd:decimal" delimiter="|" matrixType="squareSymmetric" units="unit:m" >|1.1|1.2|1.3|1.2|2.2|2.3|1.3|2.3|3.3!</matrix>
Number of rows
Number of columns
units (recommended for numeric quantities!!)
Type of matrix (mainly square ones)
By default table represents a rectangular table of any quantities representable as XSD or STMML dataTypes. The default layout is columnwise, with columns columns, where each column is a (homogeneous) array of size rows data. This is the "normal" orientation of data tables but the table display could be transposed by XSLT transformation if required. Access is to columns, and thence to the data within them. DataTyping, delimiters, etc are delegated to the arrays, which must all be of the same size. For verification it is recommended that every array carries a size attribute.
<table rows="3" columns="2" title="people"> <array title="age" dataType="xsd:integer">3 5 7</array> <array title="name" dataType="xsd:string">Sue Fred Sandy</array> </table>
Number of rows
Number of columns
A generic container with no implied semantics. It just contains things and can have attributes which bind conventions to it. It could often act as the root element in an STM document.
<list> <array title="animals">frog bear toad</array> <scalar title="weight" dataType="xsd:float">3.456</scalar> </list>
An x/y coordinate pair consisting of two real numbers, separated by whitespace or a comma. In arrays and matrices, it may be useful to set a separate delimiter
<list> <array >1.2,3.4 3.2,4.5 6.7,23.1 </array> <array delimiter="/" >/1.2 3.4/3.2 4.5/6.7 23.1/</array> </list>
An x/y/z coordinate triple consisting of three real numbers, separated by whitespace or commas. In arrays and matrices, it may be useful to set a separate delimiter
<list> <array>1.2,3.4,1.2 3.2,4.5,7.3 6.7,23.1,5.6 </array> <array delimiter="/" >/1.2 3.4 3.3/3.2 4.5 4.5/6.7 23.1 5.6/</array> </list>
an enumerated type for all builtin allowed dataTypes in STM
dataTypeType represents an enumeration of allowed dataTypes (at present identical with those in XML-Schemas (Part2- datatypes). This means that implementers should be able to use standard XMLSchema-based tools for validation without major implementation problems.
It will often be used an an attribute on scalar, array or matrix elements.
<list xmlns="http://www.xml-cml.org/schema/core"> <scalar dataType="xsd:boolean" title="she loves me">true</scalar> <scalar dataType="xsd:float" title="x">23.2</scalar> <scalar dataType="xsd:duration" title="egg timer">PM4</scalar> <scalar dataType="xsd:dateTime" title="current data and time">2001-02-01:00:30</scalar> <scalar dataType="xsd:time" title="wake up">06:00</scalar> <scalar dataType="xsd:date" title="where is it">1752-09-10</scalar> <scalar dataType="xsd:anyURI" title="CML site">http://www.xml-cml.org/</scalar> <scalar dataType="xsd:QName" title="CML atom">cml:atom</scalar> <scalar dataType="xsd:normalizedString" title="song">the mouse ran up the clock</scalar> <scalar dataType="xsd:language" title="UK English">en-GB</scalar> <scalar dataType="xsd:Name" title="atom">atom</scalar> <scalar dataType="xsd:ID" title="XML ID">_123</scalar> <scalar dataType="xsd:integer" title="the answer">42</scalar> <scalar dataType="xsd:nonPositiveInteger" title="zero">0</scalar> </list>
The size of an array. Redundant, but serves as a check for processing software (useful if delimiters are used)
Some STM-ML elements (such as array) have content representing concatenated values. The default separator is whitespace (which can be normalised) and this should be used whenever possible. However in some cases the values are empty, or contain whitespace or other problematic punctuation, and a delimiter is required.
Note that the content string MUST start and end with the delimiter so there is no ambiguity as to what the components are. Only printable characters from the ASCII character set should be used, and character entities should be avoided.
When delimiters are used to separate precise whitespace this should always consist of spaces and not the other allowed whitespace characters (newline, tabs, etc.). If the latter are important it is probably best to redesign the application.
<array size="4" delimiter="|">|A|B12||D and E|</array> The values in the array are "A", "B12", "" (empty string) and "D and E" note the spaces
An array of floats or other real numbers. Not used in STM Schema, but re-used by CML.
<atomArray xmlns="http://www.xml-cml.org/schema/core" x2="1.2 2.3 3.4 5.6"/>
Allowed matrix types. These are mainly square matrices
<matrix id="m1" title="mattrix-1" dictRef="foo:bar" rows="3" columns="3" dataType="xsd:decimal" delimiter="|" matrixType="squareSymmetric" units="unit:m" >|1.1|1.2|1.3|1.2|2.2|2.3|1.3|2.3|3.3!</matrix>
1 2 3 4 0 3 5 6 0 0 4 8 0 0 0 2
A count multiplier for certain elements
A count multiplier for certain elements, such as action or object.
<list> <object title="frog" count="10"/> <action title="step3" count="3"> <p>Add 10 ml reagent</p> </action> </list>
A unique ID for STM elements. This is not formally of type ID (an XML NAME which must start with a letter and contain only letters, digits and .-_:). It is recommended that IDs start with a letter, and contain no punctuation or whitespace. The function generate-id() in XSLT will generate semantically void unique IDs
.It is difficult to ensure uniqueness when documents are merged. We suggest namespacing IDs, perhaps using the containing elements as the base. Thus mol3:a1 could be a useful unique ID. However this is still experimental.
See idType for full documentation.
A reference to a convention which is inherited by all the subelements.
It may be useful to create conventions with namespaces,
this attribute is inherited by its child elements; thus a molecule with a convention sets the default for its bonds and atoms. This can be overwritten if necessary by an explicit convention.
Use of convention will normally require non-STM-ML semantics, and should be used with caution. We would expect that conventions prefixed with "ISO" would be useful, such as ISO8601 for dateTimes.
<bond convention="fooChem" order="-5" xmlns:fooChem="http://www.fooChem/conventions"/>
Errors in values can be of several types and this simpleType provides a small controlled vocabulary
<scalar dataType="xsd:decimal" errorValue="1.0" errorBasis="observedStandardDeviation" title="body weight" dictRef="zoo:bodywt" units="units:g">34.3</scalar>
The maximum INCLUSIVE value of a sortable quantity such as numeric, date or string. It should be ignored for dataTypes such as URL. The use of min and max attributes can be used to give a range for the quantity. The statistical basis of this range is not defined. The value of max is usually an observed quantity (or calculated from observations). To restrict a value, the maxExclusive type in a dictionary should be used.
The type of the maximum is the same as the quantity to which it refers - numeric, date and string are currently allowed
<scalar dataType="xsd:float" maxValue="20" minValue="12">15</scalar>
The minimum INCLUSIVE value of a sortable quantity such as numeric, date or string. It should be ignored for dataTypes such as URL. The use of min and min attributes can be used to give a range for the quantity. The statistical basis of this range is not defined. The value of min is usually an observed quantity (or calculated from observations). To restrict a value, the minExclusive type in a dictionary should be used.
The type of the minimum is the same as the quantity to which it refers - numeric, date and string are currently allowed
<scalar dataType="xsd:float" maxValue="20" minValue="12">15</scalar>
link is an internal or external link to STMML or other object(s).
Semantics are similar to XLink, but simpler and only a subset is implemented. This is intended to make the instances easy to create and read, and software relatively easy to implement. The architecture is:
All links can have optional role attributes. The semantics of this are not defined; you are encouraged to use a URI as described in the XLink specification.
There are two address spaces:
Note: several other specific linking mechanisms are defined elsewhere in STM. relatedEntry should be used in dictionaries, and dictRef should be used to link to dictionaries. There are no required uses of link in STM-ML but we have used it to map atoms, electrons and bonds in reactions in CML
Relation to XLink. At present (2002) we are not aware of generic XLink processors from which we would benefit, so the complete implementation brings little extra value. Among the simplifications from Xlink are:
A string referencing a dictionary, units, convention or other metadata. The namespace is optional but recommended where possible
Note: this convention is only used within STM-ML and related languages; it is NOT a URI.
<list> <!-- dictRef is of namespaceRefType --> <scalar dictRef="chem:mpt">123</scalar> <!-- error --> <scalar dictRef="mpt23">123</scalar> </list>
A reference to an existing element in the document. The target of the ref attribute (which may be namepsaced) must exist. The test for validity will normally occur in the element's appinfo
Any DOM Node created from this element will normally be a reference to another Node, so that if the target node is modified a the dereferenced content is modified. At present there are no deep copy semantics hardcoded into the schema.
STM-ML provides a very small number of abstract elements to capture frequently encountered concepts in STM documents. There are no predetermined semantics or ontology; it is expected that descriptive metadata will be added through dictionaries.
All elements can contain any element children and can carry the common STM attributes. Currently there are the following:
An action which might occur in scientific data or narrative. The definition is deliberately vague, intending to collect examples of possible usage. Thus an action could be addition of materials, measurement, application of heat or radiation. The content model is unrestricted. action iself is normally a child of actionList
The start, end and duration attributes should be interpreted as
startCondition and endCondition values are not constrained, which allows XSL-like test attribute values. The semantics of the conditions are yet to be defined and at present are simply human readable.
The order of the action elements in the document may, but will not always, define the order that they actually occur in.
A delay can be shown by an action with no content. Repeated actions or actionLists are indicated through the count attribute.
<actionList title="boiling two eggs for breakfast"> <!-- start cooking at 9am --> <action title="turn on heat" start="T09:00:00" convention="xsd"/> <!-- human readable description of time to start action --> <action title="put egg into pan" startCondition="water is boiling" count="2"/> <!-- the duration is expressed in ISO8601 format --> <action title="boil eggs for 4 minutes" duration="4" units="units:min"/> <!-- action immediately follows last action --> <action title="remove egg from pan" count="1"/> <action title="boil second egg for a bit longer" duration="about half a minute"/> <!-- action immediately follows last action --> <action title="remove egg from pan" count="1"/> </actionList>
<actionList title="preparation of silanols"> <p>This is a conversion of a chemical synthesis to STM-ML. We have deliberately not marked up the chemistry in this example!</p> <action title="step2"> <p>Take 1 mmol of the diol and dissolve in dioxan in <object title="flask"> <scalar title="volume" units="units:ml">25</scalar> </object> </p> </action> <action title="step2"> <p>Place flask in water bath with magnetic stirrer</p> </action> <!-- wait until certain condition --> <actionList endCondition="bath temperature stabilised"/> <action title="step3"> <p>Add 0.5 ml 1 M H2SO4</p> </action> <!-- carry out reaction --> <actionList endCondition="reaction complete; no diol spot remains on TLC"> <actionList title="check tlc"> <!-- wait for half an hour --> <action duration="half an hour"/> <action title="tlc"> <p>extract solution and check diol spot on TLC</p> </action> </actionList> </actionList> <!-- work up reaction --> <action title="step5"> <p>Add 10 ml water to flask</p> </action> <action title="step6"> <p>Neutralize acid with 10% NaHCO3</p> </action> <action title="step7" count="3"> <p>Extract with 10ml ether</p> </action> <action title="step8"> <p>Combine ether layers</p> </action> <action title="step9" count="2"> <p>Wash ether with 10 ml water</p> </action> <action title="step10"> <p>Wash ether with 10 ml saturated NaCl</p> </action> <action title="step11"> <p>Dry over anhydrous Na2SO4 and remove solvent on rotary evaporator</p> </action> </actionList>
ActionList contains a series of actions or nested actionLists.
<!-- demonstrating parallel and sequential actions --> <actionList order="parallel" endCondition="all food cooked"> <!-- meat and potatoes are cooked in parallel --> <actionList title="meat"> <action title="cook" endCondition="cooked"> <p>Roast meat</p> </action> <action><p>Keep warm in oven</p></action> </actionList> <actionList title="vegetables"> <actionList title="cookVeg" endCondition="cooked"> <action title="boil water" endCondition="water boiling"> <p>Heat water</p> </action> <action title="cook" endCondition="potatoes cooked"> <p>Cook potatoes</p> </action> </actionList> <action><p>Keep warm in oven</p></action> </actionList> </actionList>
Deliberately vague. Thus an instrument might be built from sub component objects, or a program could be composed of smaller modules (objects). Unrestricted content model
<object title="frog" type="amphibian" count="5"> <scalar dataType="xsd:float" title="length" units="unit:cm">5</scalar> <obj1/> </object>
A container for any events that need to be recorded, whether planned or not. They can include notes, measurements, conditions that may be referenced elsewhere, etc. There are no controlled semantics
<observation type="ornithology"> <object title="sparrow" count="3"/> <observ/> </observation>
stmml holds stmml data under a single generic container. Other namespaces may be present as children. No semantics implied.
<stmml> <actionList> <action></action> </actionList> <object></object> <observation></observation> <!-- ==================== DICTIONARY =========== --> <dictionary> <annotation> <documentation></documentation> <appinfo></appinfo> </annotation> <entry term="foo"> <definition></definition> <alternative></alternative> <description></description> <enumeration></enumeration> <relatedEntry></relatedEntry> </entry> </dictionary> <!-- ================= METADATA ================== --> <metadataList> <metadata></metadata> </metadataList> <!-- ================= SCIENTIFIC UNITS ================== --> <unitList> <unitType id="ut1" name="u"> <dimension name="mass"></dimension> </unitType> <unit id="u1"></unit> </unitList> </stmml>
Dictionaries are a major part of STM-ML and supported as follows:
The dictionary itself:
A dictionary is a container for entry elements. Dictionaries can also contain unit-related information.
The dictRef attribute on a dictionary element sets a namespace-like prefix allowing the dictionary to be referenced from within the document. In general dictionaries are referenced from an element using the dictRef attribute.
<stm:dictionary xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1"> <stm:entry id="a001" term="Amplitude for charge density mixing" dataType="stm:decimal" units="arbitrary"> <stm:annotation> <stm:documentation> <div class="summary">Amplitude for charge density mixing</div> <div class="description">Not yet filled in...</div> </stm:documentation> </stm:annotation> <stm:alternative type="abbreviation">CDMixAmp</stm:alternative> </stm:entry> </stm:dictionary>
dictionary can be used in an instance document to reference the dictionary used. Example:
<list> <dictionary dictRef="core" href="../dictionary/coreDict.xml"/> </list>
This is so that a reference to a UnitList can be put in a dictionary.
<entry id="a003" term="alpha" dataType="float" minInclusive="0.0" maxInclusive="180.0" recommendedUnits="degrees"> <definition>The alpha cell angle</definition> </entry>
<entry id="a003" term="matrix1" dataType="float" rows="3" columns="4" unitType="unit:length" minInclusive="0.0" maxInclusive="100.0" recommendedUnits="unit:m" totalDigits="8" fractionDigits="3"> <definition>A matrix of lengths</definition> <description>A data instance will have a matrix which points to this entry (e.g. dictRef="foo:matrix1"). The matrix must be 3*4, composed of floats in 8.3 format, of type length, values between 0 and 100 and with recommended units metres. </description> </entry>
The definition for a dictionary entry, scientific units, etc.
The definition should be a short nounal phrase definining the subject of the entry. Definitions should not include commentary, implementations, equations or formulae (unless the subject is one of these) or examples. The description element can be used for these.
The definition can be in any markup language, but normally XHTML will be used, perhaps with links to other XML namespaces such as CML for chemistry.
<entry id="a7" term="Allosteric enzyme"> <definition>An <a href="#e3">enzyme</a> that contains a region to which small, regulatory molecules ("effectors") may bind in addition to and separate from the substrate binding site and thereby affect the catalytic activity. </definition> <description>On binding the effector, the catalytic activity of the <strong>enzyme</strong> towards the substrate may be enhanced, in which case the effector is an activator, or reduced, in which case it is a de-activator or inhibitor. </description> </entry>
Entries should have at least one separate definitions. description is then used for most of the other information, including examples. The class attribute has an uncontrolled vocabulary and can be used to clarify the purposes of the description elements.
<entry id="a7" term="Allosteric enzyme"> <definition>An <a href="#e3">enzyme</a> that contains a region to which small, regulatory molecules ("effectors") may bind in addition to and separate from the substrate binding site and thereby affect the catalytic activity. </definition> <description>On binding the effector, the catalytic activity of the <strong>enzyme</strong> towards the substrate may be enhanced, in which case the effector is an activator, or reduced, in which case it is a de-activator or inhibitor. </description> </entry>
The type of this information. This is not controlled, but examples might include:
An enumeration of string values. Used where a dictionary entry constrains the possible values in a document instance. The dataTypes (if any) must all be identical and are defined by the dataType of the containing element.
<entry term="crystal system" id="cryst1" dataType="string"> <definition>A crystal system</definition> <enumeration value="triclinic"> <annotation> <documentation> <div class="summary">No constraints on lengths and angles</div> </documentation> </annotation> </enumeration> <enumeration value="monoclinic"> <annotation> <documentation> <div class="summary">Two cell angles are right angles; no other constraints</div> </documentation> </annotation> </enumeration> <enumeration value="orthorhombic"> <annotation> <documentation> <div class="summary">All three angles are right angles; no other constraints</div> </documentation> </annotation> </enumeration> <enumeration value="tetragonal"> <annotation> <documentation> <div class="summary">Fourfold axis of symmetry; All three angles are right angles; two equal cell lengths; no other constraints</div> </documentation> </annotation> </enumeration> <enumeration value="trigonal"> <annotation> <documentation> <div class="summary">Threefold axis of symmetry; Two angles are right angles; one is 120 degrees; two equal lengths; no other constraints</div> </documentation> </annotation> </enumeration> <enumeration value="hexagonal"> <annotation> <documentation> <div class="summary">Sixfold axis of symmetry; Two angles are right angles; one is 120 degrees; two equal lengths; no other constraints</div> </documentation> </annotation> </enumeration> <enumeration value="cubic"> <annotation> <documentation> <div class="summary">All three angles are right angles; all cell lengths are equal</div> </documentation> </annotation> </enumeration> </entry>
An enumeration of string values. The dataTypes (if any) must all be identical and are defined by the dataType of the containing element.
Documentation can be added through an enumeration child
An alternative name for an entry
At present a child of entry which represents an alternative string that refers to the concept. There is a partial controlled vocabulary in alternativeType with values such as :
<entry term="ammonia" id="a1"> <alternative type="synonym">Spirits of hartshorn</alternative> <alternative type="my:formula">NH3</alternative> </entry>
alternativeType represents a the type of an alternative element.
The range of relationships is not restricted but should include parents, aggregation, seeAlso etc. dataCategories from ISO12620 can be referenced through the namespaced mechanism.
<stm:entry id="a14" term="Autoreceptor" xmlns:stm="http://www.xml-cml.org/schema/core"> <stm:definition>An <strong>autoreceptor</strong>, present at a nerve ending, is a <a href="#r1">receptor</a> that regulates, via positive or negative feedback processes, the synthesis and/or release of its own physiological ligand. </stm:definition> <stm:relatedEntry type="seeAlso" href="#h4">Heteroreceptor).</stm:relatedEntry> <stm:relatedEntry type="my:antonym" href="#h4">antiheteroreceptor).</stm:relatedEntry> <relatedEntry1/> </stm:entry>
relatedEntryType represents a the type of relationship in a relatedEntry element.
A documentation container similar to annotation in XML Schema.
A documentation container similar to annotation in XML Schema. At present this is experimental and designed to be used for dictionaries, units, etc. One approach is to convert these into XML Schemas when the documentation and appinfo children will emerge in their correct position in the derived schema.
It is possible that this may develop as a useful tool for annotating components of complex objects such as molecules.
<entry term="matrix"> <annotation> <documentation>This refers to mathematical matrices</documentation> <appinfo>... some code to describe and support matrices ...</appinfo> </annotation> </entry>
A container similar to documentation in XML Schema. This is NOT part of the textual content of an entry but is designed to support the transformation of dictionary entrys into schemas for validation. This is experimental and should only be used for dictionaries, units, etc. One approach is to convert these into XML Schemas when the documentation and appinfo children will emerge in their correct position in the derived schema.
Do NOT confuse documentation with the definition or the definition which are part of the content of the dictionary
If will probably only be used when there is significant appinfo in the entry or where the entry defines an XSD-like datatype of an element in the document.
<stm:documentation id="source" xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1"> Transcribed from IUPAC website </stm:documentation>
A container similar to appinfo in XML Schema.
A container for machine processable documentation for an entry. This is likely to be platform and/or language specific. It is possible that XSLT, RDF or XBL will emerge as generic languages
See annotation and documentation for further information
An example in XSLT where an element foo calls a bespoke template
.<s:appinfo xmlns:s="http://www.xml-cml.org/schema/core" xmlns="http://www.w3.org/1999/XSL/Transform"> <template match="foo"> <call-template name="processFoo"/> </template> </s:appinfo>
A reference to a dictionary entry.
Elements in data instances such as scalar may have a dictRef 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 document containing entry elements and validated against STM-ML Schema.
Where there is concern about the dictionary becoming separated from the document the dictionary entries can be physically included as part of the data instance and the normal XPointer addressing mechanism can be used.
This attribute can also be used on dictionary elements to define the namespace prefix
<scalar dataType="xsd:float" title="surfaceArea" dictRef="cmlPhys:surfArea" xmlns:cmlPhys="http://www.xml-cml.org/dict/physical" units="units:cm2">50</scalar>
<stm:list xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1"> <stm:observation> <p>We observed <object count="3" dictRef="#p1"/> constructing dwellings of different material</p> </stm:observation> <stm:entry id="p1" term="pig"> <stm:definition>A domesticated animal.</stm:definition> <stm:description>Predators include wolves</stm:description> <stm:description class="scientificName">Sus scrofa</stm:description> </stm:entry> </stm:list>
STM-ML supports metadata through the element metadata. If necessary several of these can be contained in a metadataList element.
A general container for metadata, including at least Dublin Core (DC) and CML-specific metadata
In its simple form each element provides a name and content in a similar fashion to the meta element in HTML. metadata may have simpleContent (i.e. a string for adding further information - this is not controlled).
<list> <metadataList> <metadata name="dc:coverage" content="Europe"/> <metadata name="dc:description" content="Ornithological chemistry"/> <metadata name="dc:identifier" content="ISBN:1234-5678"/> <metadata name="dc:format" content="printed"/> <metadata name="dc:relation" content="abc:def123"/> <metadata name="dc:rights" content="licence:GPL"/> <metadata name="dc:subject" content="Informatics"/> <metadata name="dc:title" content="birds"/> <metadata name="dc:type" content="bird books on chemistry"/> <metadata name="dc:contributor" content="Tux Penguin"/> <metadata name="dc:creator" content="author"/> <metadata name="dc:publisher" content="Penguinone publishing"/> <metadata name="dc:source" content="penguinPub"/> <metadata name="dc:language" content="en-GB"/> <metadata name="dc:date" content="1752-09-10"/> </metadataList> <metadataList> <metadata name="cmlm:safety" content="mostly harmless"/> <metadata name="cmlm:insilico" content="electronically produced"/> <metadata name="cmlm:structure" content="penguinone"/> <metadata name="cmlm:reaction" content="synthesis of penguinone"/> <metadata name="cmlm:identifier" content="smiles:O=C1C=C(C)C(C)(C)C(C)=C1"/> </metadataList> </list>
<list> <metadataList> <metadata name="dc:coverage" content="Europe"/> <metadata name="dc:description" content="Ornithological chemistry"/> <metadata name="dc:identifier" content="ISBN:1234-5678"/> <metadata name="dc:format" content="printed"/> <metadata name="dc:relation" content="abc:def123"/> <metadata name="dc:rights" content="licence:GPL"/> <metadata name="dc:subject" content="Informatics"/> <metadata name="dc:title" content="birds"/> <metadata name="dc:type" content="bird books on chemistry"/> <metadata name="dc:contributor" content="Tux Penguin"/> <metadata name="dc:creator" content="author"/> <metadata name="dc:publisher" content="Penguinone publishing"/> <metadata name="dc:source" content="penguinPub"/> <metadata name="dc:language" content="en-GB"/> <metadata name="dc:date" content="1752-09-10"/> </metadataList> <metadataList> <metadata name="cmlm:safety" content="mostly harmless"/> <metadata name="cmlm:insilico" content="electronically produced"/> <metadata name="cmlm:structure" content="penguinone"/> <metadata name="cmlm:reaction" content="synthesis of penguinone"/> <metadata name="cmlm:identifier" content="smiles:O=C1C=C(C)C(C)(C)C(C)=C1"/> </metadataList> </list>
This will be primarily used within the defintion of unitss.
<unitType id="energy" name="energy"> <dimension name="length"/> <dimension name="mass"/> <dimension name="time" power="-1"/> </unitType>
These are the 7 types prescribed by the SI system, together with the "dimensionless" type. We intend to be somewhat uncoventional and explore enhanced values of "dimensionless", such as "angle". This may be heretical, but we find the present system impossible to implement in many cases.
Used for constructing entries in a dictionary of units
<unitType id="energy" name="energy"> <dimension name="length"/> <dimension name="mass"/> <dimension name="time" power="-1"/> </unitType>
<stm:unitList xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1"> <!-- ======================================================================= --> <!-- ========================= fundamental types =========================== --> <!-- ======================================================================= --> <stm:unitType id="length" name="length"> <stm:dimension name="length"/> </stm:unitType> <stm:unitType id="time" name="time"> <stm:dimension name="time"/> </stm:unitType> <!-- ... --> <stm:unitType id="dimensionless" name="dimensionless"> <stm:dimension name="dimensionless"/> </stm:unitType> <!-- ======================================================================= --> <!-- ========================== derived types ============================== --> <!-- ======================================================================= --> <stm:unitType id="acceleration" name="acceleration"> <stm:dimension name="length"/> <stm:dimension name="time" power="-2"/> </stm:unitType> <!-- ... --> <!-- ======================================================================= --> <!-- ====================== fundamental SI units =========================== --> <!-- ======================================================================= --> <stm:unit id="second" name="second" unitType="time"> <stm:description>The SI unit of time</stm:description> </stm:unit> <stm:unit id="meter" name="meter" unitType="length" abbreviation="m"> <stm:description>The SI unit of length</stm:description> </stm:unit> <!-- ... --> <stm:unit id="kg" name="nameless" unitType="dimensionless" abbreviation="nodim"> <stm:description>A fictitious parent for dimensionless units</stm:description> </stm:unit> <!-- ======================================================================= --> <!-- ===================== derived SI units ================================ --> <!-- ======================================================================= --> <stm:unit id="newton" name="newton" unitType="force"> <stm:description>The SI unit of force</stm:description> </stm:unit> <!-- ... --> <!-- multiples of fundamental SI units --> <stm:unit id="g" name="gram" unitType="mass" parentSI="kg" multiplierToSI="0.001" abbreviation="g"> <stm:description>0.001 kg. </stm:description> </stm:unit> <stm:unit id="celsius" name="Celsius" parentSI="k" multiplierToSI="1" constantToSI="273.18"> <stm:description><p>A common unit of temperature</p></stm:description> </stm:unit> <!-- fundamental non-SI units --> <stm:unit id="inch" name="inch" parentSI="meter" abbreviation="in" multiplierToSI="0.0254" > <stm:description>An imperial measure of length</stm:description> </stm:unit> <!-- derived non-SI units --> <stm:unit id="l" name="litre" unitType="volume" parentSI="meterCubed" abbreviation="l" multiplierToSI="0.001"> <stm:description>Nearly 1 dm**3 This is not quite exact</stm:description> </stm:unit> <!-- ... --> <stm:unit id="fahr" name="fahrenheit" parentSI="k" abbreviation="F" multiplierToSI="0.55555555555555555" constantToSI="-17.777777777777777777"> <stm:description>An obsolescent unit of temperature still used in popular meteorology</stm:description> </stm:unit> </stm:unitList>
<stm:unitList xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1" dictRef="unit" href="units.xml" />
Mandatory for SI Units, optional for nonSI units since they should be able to obtain this from their parent. For complex derived units without parents it may be useful.
Used within a unitList
Distinguish carefully from unitsType which is primarily used for attributes describing the units that elements carry
<stm:unitList xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1"> <!-- ======================================================================= --> <!-- ========================= fundamental types =========================== --> <!-- ======================================================================= --> <stm:unitType id="length" name="length"> <stm:dimension name="length"/> </stm:unitType> <stm:unitType id="time" name="time"> <stm:dimension name="time"/> </stm:unitType> <!-- ... --> <stm:unitType id="dimensionless" name="dimensionless"> <stm:dimension name="dimensionless"/> </stm:unitType> <!-- ======================================================================= --> <!-- ========================== derived types ============================== --> <!-- ======================================================================= --> <stm:unitType id="acceleration" name="acceleration"> <stm:dimension name="length"/> <stm:dimension name="time" power="-2"/> </stm:unitType> <!-- ... --> <!-- ======================================================================= --> <!-- ====================== fundamental SI units =========================== --> <!-- ======================================================================= --> <stm:unit id="second" name="second" unitType="time"> <stm:description>The SI unit of time</stm:description> </stm:unit> <stm:unit id="meter" name="meter" unitType="length" abbreviation="m"> <stm:description>The SI unit of length</stm:description> </stm:unit> <!-- ... --> <stm:unit id="kg" name="nameless" unitType="dimensionless" abbreviation="nodim"> <stm:description>A fictitious parent for dimensionless units</stm:description> </stm:unit> <!-- ======================================================================= --> <!-- ===================== derived SI units ================================ --> <!-- ======================================================================= --> <stm:unit id="newton" name="newton" unitType="force"> <stm:description>The SI unit of force</stm:description> </stm:unit> <!-- ... --> <!-- multiples of fundamental SI units --> <stm:unit id="g" name="gram" unitType="mass" parentSI="kg" multiplierToSI="0.001" abbreviation="g"> <stm:description>0.001 kg. </stm:description> </stm:unit> <stm:unit id="celsius" name="Celsius" parentSI="k" multiplierToSI="1" constantToSI="273.18"> <stm:description><p>A common unit of temperature</p></stm:description> </stm:unit> <!-- fundamental non-SI units --> <stm:unit id="inch" name="inch" parentSI="meter" abbreviation="in" multiplierToSI="0.0254" > <stm:description>An imperial measure of length</stm:description> </stm:unit> <!-- derived non-SI units --> <stm:unit id="l" name="litre" unitType="volume" parentSI="meterCubed" abbreviation="l" multiplierToSI="0.001"> <stm:description>Nearly 1 dm**3 This is not quite exact</stm:description> </stm:unit> <!-- ... --> <stm:unit id="fahr" name="fahrenheit" parentSI="k" abbreviation="F" multiplierToSI="0.55555555555555555" constantToSI="-17.777777777777777777"> <stm:description>An obsolescent unit of temperature still used in popular meteorology</stm:description> </stm:unit> </stm:unitList>
A scientific unit. Units are of the following types:
Example:
<unit id="units:fahr" name="fahrenheit" parentSI="units:K" multiplierToSI="0.55555555555555555" constantToSI="-17.777777777777777777"> <description>An obsolescent unit of temperature still used in popular meteorology</description> </unit>
The factor by which the non-SI unit should be multiplied to convert a quantity to its representation in SI Units. This is applied before constantToSI. Mandatory for nonSI units; forbidden for SI units
The amount to add to a quantity in non-SI units to convert its representation to SI Units. This is applied after multiplierToSI. Optional for nonSI units; forbidden for SI units.
Scientific units. These will be linked to dictionaries of units with conversion information, using namespaced references (e.g. si:m)
Distinguish carefully from unitType which is an element describing a type of a unit in a unitList
<stm:unitList xmlns:stm="http://www.xml-cml.org/schema/stmml-1.1"> <!-- ======================================================================= --> <!-- ========================= fundamental types =========================== --> <!-- ======================================================================= --> <stm:unitType id="length" name="length"> <stm:dimension name="length"/> </stm:unitType> <stm:unitType id="time" name="time"> <stm:dimension name="time"/> </stm:unitType> <!-- ... --> <stm:unitType id="dimensionless" name="dimensionless"> <stm:dimension name="dimensionless"/> </stm:unitType> <!-- ======================================================================= --> <!-- ========================== derived types ============================== --> <!-- ======================================================================= --> <stm:unitType id="acceleration" name="acceleration"> <stm:dimension name="length"/> <stm:dimension name="time" power="-2"/> </stm:unitType> <!-- ... --> <!-- ======================================================================= --> <!-- ====================== fundamental SI units =========================== --> <!-- ======================================================================= --> <stm:unit id="second" name="second" unitType="time"> <stm:description>The SI unit of time</stm:description> </stm:unit> <stm:unit id="meter" name="meter" unitType="length" abbreviation="m"> <stm:description>The SI unit of length</stm:description> </stm:unit> <!-- ... --> <stm:unit id="kg" name="nameless" unitType="dimensionless" abbreviation="nodim"> <stm:description>A fictitious parent for dimensionless units</stm:description> </stm:unit> <!-- ======================================================================= --> <!-- ===================== derived SI units ================================ --> <!-- ======================================================================= --> <stm:unit id="newton" name="newton" unitType="force"> <stm:description>The SI unit of force</stm:description> </stm:unit> <!-- ... --> <!-- multiples of fundamental SI units --> <stm:unit id="g" name="gram" unitType="mass" parentSI="kg" multiplierToSI="0.001" abbreviation="g"> <stm:description>0.001 kg. </stm:description> </stm:unit> <stm:unit id="celsius" name="Celsius" parentSI="k" multiplierToSI="1" constantToSI="273.18"> <stm:description><p>A common unit of temperature</p></stm:description> </stm:unit> <!-- fundamental non-SI units --> <stm:unit id="inch" name="inch" parentSI="meter" abbreviation="in" multiplierToSI="0.0254" > <stm:description>An imperial measure of length</stm:description> </stm:unit> <!-- derived non-SI units --> <stm:unit id="l" name="litre" unitType="volume" parentSI="meterCubed" abbreviation="l" multiplierToSI="0.001"> <stm:description>Nearly 1 dm**3 This is not quite exact</stm:description> </stm:unit> <!-- ... --> <stm:unit id="fahr" name="fahrenheit" parentSI="k" abbreviation="F" multiplierToSI="0.55555555555555555" constantToSI="-17.777777777777777777"> <stm:description>An obsolescent unit of temperature still used in popular meteorology</stm:description> </stm:unit> </stm:unitList>
The start time in any allowable XSD representation of date, time or dateTime. This will normally be a clock time or date.
The start time in any allowable XSD representation of date, time or dateTime. This will normally be a clock time or date.
The end condition
At present a human-readable string describing some condition when the ac tion should end. As XML develops it may be possible to add machine-processable semantics in this field.
A grouping of list and scalar elements for use by other schemas. Experimental.
This is to allow non-STM schemas to include a generic "data" component in their elements. It is messy and probably should not survive. Better extensibility mechanisms should be found.
Use only within Schemas
A simple way of adding metadata to a piece of information. Likely to be fragile since the URI may disappear.
<list> <definition source="foo.html#a3">An animal with four legs</definition> <definition source="http://www.foo.com/index.html"> An animal with six legs</definition> </list>
A group of attribute applicable to most STM-ML elements. It is recommended that IDs are used widely. Titles have no semantics but are useful for humans (e.g. a bond angle could be labelled "ortho" or "gamma". Coventions are inherited by subelements; the default is the current schema.