Definition Type: Element
Name: table
Namespace: http://www.xml-cml.org/schema
Containing Schema: schema.xsd
Abstract
Documentation:
A rectangular table of any quantities. By default table represents a rectangular table of any simple quantities representable as XSD or CML dataTypes. There are three layouts, columnwise, rowwise and without markup. In all cases it is essential that the columns, whether explicit or otherwise, are homogeneous within the column. Also the metadata for each column must be given explicitly. columns: There is a single arrayList child containing (homogeneous) child elements (array or listof 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 or lists, which must all be of the same size. rows: with explicit trows. The metadata is carried in a theader element of size cols. Within each trow the data are contained in tcells content: The metadata is carried in a theader element of size cols. data are contained in a single tableContent with columns moving fastest. Within the content the data are whitespace (or delimiter) separated. For verification it is recommended that tables carry rows and columns attributes. The type of the tables should also be carried in a tableTypeattribute> Validity contraints (XPath expression in table context) type @tableType @rows actual rowCount @columns actual columnCount tableHeader arrayList tableRowList tableContent column based columnBased recommended ./arrayList/@size or arrayList/*[self::array or self::list]/@size optional ./arrayList/@size or count(arrayList/*[self::array or self::list]) forbidden required forbidden forbidden row based rowBased recommended ./tableRowList/@size or count(tableRowList/tableRow) recommended count(tableHeader/tableHeaderCell) or count(tableRowList/tableRow/tableCell) required forbidden required forbidden content based contentBased required only by analysing tde table recommended count(tableHeader/tableHeaderCell) required forbidden forbidden required
Collapse XSD Schema Diagram:
Drilldown into tableContent in schema schema_xsd Drilldown into tableRowList in schema schema_xsd Drilldown into tableHeader in schema schema_xsd Drilldown into arrayList in schema schema_xsd Drilldown into dictRef in schema schema_xsd Drilldown into dictRef in schema schema_xsd Drilldown into convention in schema schema_xsd Drilldown into convention in schema schema_xsd Drilldown into id in schema schema_xsd Drilldown into id in schema schema_xsd Drilldown into title in schema schema_xsd Drilldown into title in schema schema_xsd Drilldown into tableType in schema schema_xsd Drilldown into tableType in schema schema_xsd Drilldown into units in schema schema_xsd Drilldown into units in schema schema_xsd Drilldown into columns in schema schema_xsd Drilldown into columns in schema schema_xsd Drilldown into rows in schema schema_xsd Drilldown into rows in schema schema_xsdXSD Diagram of table in schema schema_xsd (Chemical Markup Language (CML))
Collapse XSD Schema Code:
<xsd:element name="table" id="el.table">
    <xsd:annotation>
        <xsd:documentation>
            <h:div class="summary" xmlns:h="http://www.w3.org/1999/xhtml">A rectangular table of any quantities.</h:div>
            <h:div class="description" xmlns:h="http://www.w3.org/1999/xhtml">
                <h:p>By default <h:tt>table</h:tt> represents a rectangular table of any simple quantities
               representable as XSD or CML dataTypes. There are three layouts, columnwise, rowwise and
               without markup. In all cases it is essential that the columns, whether explicit or
               otherwise, are homogeneous within the column. Also the metadata for each column must
               be given explicitly.
               <ul xmlns=""><li>columns:  
               There is a single <h:a href="el.arrayList">arrayList</h:a> child containing (homogeneous) child
               elements (<h:a href="el.array">array</h:a> or <h:a href="el.list">list</h:a>of 
               size <h:tt>rows</h:tt> 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 or lists, which must all be of the same size.
	       </li>
                        <li>rows: with explicit <tt>trow</tt>s. The metadata is carried in a <tt>theader</tt>
	       element of size <tt>cols</tt>. Within each trow the data are contained in tcells</li>
                        <li>content: The metadata is carried in a <tt>theader</tt>
	       element of size <tt>cols</tt>. data are contained in a single <tt>tableContent</tt> 
	       with columns moving fastest. Within the content the data are whitespace (or delimiter) separated.</li>
                    </ul>
	        For 
	       verification it is recommended that tables carry <h:tt>rows</h:tt> and <h:tt>columns</h:tt> attributes.
	       The type of the tables should also be carried in a <tt xmlns="">tableType</tt>attribute&gt;
               </h:p>
            </h:div>
            <h:div xmlns:h="http://www.w3.org/1999/xhtml">Validity contraints (XPath expression in table context)
               <h:table><h:tr><h:th>type</h:th>
                        <h:th>@tableType</h:th>
                        <h:th>@rows</h:th>
                        <h:th>actual rowCount</h:th>
                        <h:th>@columns</h:th>
                        <h:th>actual columnCount</h:th>
                        <h:th>tableHeader</h:th>
                        <h:th>arrayList</h:th>
                        <h:th>tableRowList</h:th>
                        <h:th>tableContent</h:th>
                    </h:tr>
                    <h:tr>
                        <h:td>column based</h:td>
                        <h:td>columnBased</h:td>
                        <h:td>recommended</h:td>
                        <h:td>./arrayList/@size or arrayList/*[self::array or self::list]/@size</h:td>
                        <h:td>optional</h:td>
                        <h:td>./arrayList/@size or count(arrayList/*[self::array or self::list])</h:td>
                        <h:td>forbidden</h:td>
                        <h:td>required</h:td>
                        <h:td>forbidden</h:td>
                        <h:td>forbidden</h:td>
                    </h:tr>
                    <h:tr>
                        <h:td>row based</h:td>
                        <h:td>rowBased</h:td>
                        <h:td>recommended</h:td>
                        <h:td>./tableRowList/@size or count(tableRowList/tableRow)</h:td>
                        <h:td>recommended</h:td>
                        <h:td>count(tableHeader/tableHeaderCell) or count(tableRowList/tableRow/tableCell)</h:td>
                        <h:td>required</h:td>
                        <h:td>forbidden</h:td>
                        <h:td>required</h:td>
                        <h:td>forbidden</h:td>
                    </h:tr>
                    <h:tr>
                        <h:td>content based</h:td>
                        <h:td>contentBased</h:td>
                        <h:td>required</h:td>
                        <h:td>only by analysing tde table</h:td>
                        <h:td>recommended</h:td>
                        <h:td>count(tableHeader/tableHeaderCell)</h:td>
                        <h:td>required</h:td>
                        <h:td>forbidden</h:td>
                        <h:td>forbidden</h:td>
                        <h:td>required</h:td>
                    </h:tr>
                </h:table>
            </h:div>
            <h:div class="example" href="table1.xml" xmlns:h="http://www.w3.org/1999/xhtml" />
            <h:div class="example" href="table2.xml" xmlns:h="http://www.w3.org/1999/xhtml" />
            <h:div class="example" href="table3.xml" xmlns:h="http://www.w3.org/1999/xhtml" />
        </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
        <xsd:sequence>
            <xsd:choice>
                <!-- columnwise arrays -->
                <xsd:element ref="arrayList" minOccurs="0" maxOccurs="1" />
                <!-- OR header, followed by rows or content -->
                <xsd:sequence>
                    <xsd:element ref="tableHeader" minOccurs="1" maxOccurs="1" />
                    <xsd:choice>
                        <!-- rowwise rows -->
                        <xsd:element ref="tableRowList" minOccurs="0" maxOccurs="unbounded" />
                        <!-- unmarked content -->
                        <xsd:element ref="tableContent" minOccurs="0" maxOccurs="1" />
                    </xsd:choice>
                </xsd:sequence>
            </xsd:choice>
        </xsd:sequence>
        <xsd:attributeGroup ref="rows" />
        <xsd:attributeGroup ref="columns" />
        <xsd:attributeGroup ref="units" />
        <xsd:attributeGroup ref="tableType" />
        <!--          <xsd:attributeGroup ref="dataType"/> -->
        <xsd:attributeGroup ref="title" />
        <xsd:attributeGroup ref="id" />
        <xsd:attributeGroup ref="convention" />
        <xsd:attributeGroup ref="dictRef" />
    </xsd:complexType>
</xsd:element>
Collapse Child Elements:
Name Type Min Occurs Max Occurs
arrayList nsA:arrayList 0 1
tableHeader nsA:tableHeader 1 1
tableRowList nsA:tableRowList 0 unbounded
tableContent nsA:tableContent 0 1
Collapse Child Attributes:
Name Type Default Value Use
rows nsA:rows (Optional)
columns nsA:columns (Optional)
units nsA:units (Optional)
tableType nsA:tableType (Optional)
title nsA:title (Optional)
id nsA:id (Optional)
convention nsA:convention (Optional)
dictRef nsA:dictRef (Optional)