matrix

<h:div class="summary">A rectangular matrix of any quantities.</h:div>
<h:div class="description">
  <h:p>By default
    <h:tt>matrix</h:tt>represents a rectangular matrix of any quantities representable as XSD or STMML dataTypes. It consists of
    <h:tt>rows*columns</h:tt>elements, where
    <h:tt>columns</h:tt>is the fasting moving index. Assuming the elements are counted from 1 they are ordered
    <h:tt>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]</h:tt>
  </h:p>
  <h:p>By default whitespace is used to separate matrix elements; see
    <h:a href="el.array">array</h:a>for details. There are NO characters or markup delimiting the end of rows; authors must be careful!. The
    <h:tt>columns</h:tt>and
    <h:tt>rows</h:tt>attributes have no default values; a row vector requires a
    <h:tt>rows</h:tt>attribute of 1.</h:p>
  <h:p>
    <h:tt>matrix</h:tt>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
    <h:tt>matrixType</h:tt>attribute allows software to validate and process the type of matrix.</h:p>
</h:div>
<h:div class="example" href="matrix1.xml"/>

Element Information

Model

Attributes

QName Type Fixed Default Use Inheritable Annotation
columns sizeType optional
<h:div class="summary">Number of columns.</h:div>
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"/>
dataType dataTypeType optional
<h:div class="summary">The data type of the object.</h:div>
<h:div class="description">Normally applied to scalar/array objects but may extend to more complex one.</h:div>
delimiter delimiterType optional
<h:div class="summary">A delimiter character for arrays and matrices.</h:div>
<h:div class="description">By default array components ('elements' in the non-XML sense) are whitespace-separated. This fails for components with embedded whitespace or missing completely:
  <h:pre>Example: In the protein database ' CA' and 'CA' are different atom types, and and array could be: <array delimiter="/" dictRef="pdb:atomTypes">/ N/ CA/CA/ N/</array></h:pre>Note that the array starts and ends with the delimiter, which must be chosen to avoid accidental use. There is currently no syntax for escaping delimiters.</h:div>
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"/>
errorBasis errorBasisType optional
<h:div class="summary">Basis of the error estimate.</h:div>
<h:div class="description"/>
errorValueArray errorValueArrayType optional
<h:div class="summary">Array of error values.</h:div>
<h:div class="description">Reports the author's estimate of the error in an array of values. Only meaningful for dataTypes mapping to real number.</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>
matrixType matrixType optional
<h:div class="summary">Type of matrix.</h:div>
<h:div class="description">Mainly square, but extensible through the _xsd:union_ mechanis.</h:div>
maxValueArray floatArrayType optional
<h:div class="summary">Maximum values for numeric _matrix_ or _array.</h:div>
<h:div class="description">A whitespace-separated list of the same length as the array in the parent element.</h:div>
minValueArray floatArrayType optional
<h:div class="summary">Minimum values for numeric _matrix_ or _array.</h:div>
<h:div class="description">A whitespace-separated lists of the same length as the array in the parent element.</h:div>
rows sizeType optional
<h:div class="summary">Number of rows.</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"/>
units unitsType optional
<h:div class="summary">Scientific units on an element.</h:div>
<h:div class="description">These must be taken from a dictionary of units. There should be some mechanism for validating the type of the units against the possible values of the element.</h:div>
Wildcard: ANY attribute from ANY namespace OTHER than 'http://www.xml-cml.org/schema'

Source

<xsd:element name="matrix" id="el.matrix" substitutionGroup="anyCml">
  <xsd:annotation>
    <xsd:documentation>
      <h:div class="summary">A rectangular matrix of any quantities.</h:div>
      <h:div class="description">
        <h:p>By default
          <h:tt>matrix</h:tt>represents a rectangular matrix of any quantities representable as XSD or STMML dataTypes. It consists of
          <h:tt>rows*columns</h:tt>elements, where
          <h:tt>columns</h:tt>is the fasting moving index. Assuming the elements are counted from 1 they are ordered
          <h:tt>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]</h:tt>
        </h:p>
        <h:p>By default whitespace is used to separate matrix elements; see
          <h:a href="el.array">array</h:a>for details. There are NO characters or markup delimiting the end of rows; authors must be careful!. The
          <h:tt>columns</h:tt>and
          <h:tt>rows</h:tt>attributes have no default values; a row vector requires a
          <h:tt>rows</h:tt>attribute of 1.</h:p>
        <h:p>
          <h:tt>matrix</h:tt>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
          <h:tt>matrixType</h:tt>attribute allows software to validate and process the type of matrix.</h:p>
      </h:div>
      <h:div class="example" href="matrix1.xml"/>
    </xsd:documentation>
  </xsd:annotation>
  <xsd:complexType>
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attributeGroup ref="dataType"/>
        <xsd:attributeGroup ref="delimiter"/>
        <xsd:attributeGroup ref="rows"/>
        <xsd:attributeGroup ref="columns"/>
        <xsd:attributeGroup ref="units"/>
        <xsd:attributeGroup ref="title"/>
        <xsd:attributeGroup ref="id"/>
        <xsd:attributeGroup ref="convention"/>
        <xsd:attributeGroup ref="dictRef"/>
        <xsd:attributeGroup ref="matrixType"/>
        <xsd:attributeGroup ref="errorValueArray"/>
        <xsd:attributeGroup ref="errorBasis"/>
        <xsd:attributeGroup ref="minValueArray"/>
        <xsd:attributeGroup ref="maxValueArray"/>
        <xsd:anyAttribute namespace="##other" processContents="lax"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
</xsd:element>

Sample