<?xml version="1.0" encoding="utf-8"?>
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" xmlns:q="http://cnx.rice.edu/qml/1.0" id="m9007" module-id="" cnxml-version="0.6">

  <title>CALS Table</title>

  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4">
  <!-- WARNING! The 'metadata' section is read only. Do not edit below.
       Changes to the metadata section in the source will not be saved. -->
  <md:content-id>m14396</md:content-id>
  <md:title>CALS Table</md:title>
  <md:version>1.4</md:version>
  <md:created>2007/01/02 12:05:38 US/Central</md:created>
  <md:revised>2009/06/30 13:10:48.737 GMT-5</md:revised>
  <md:authorlist>
    <md:author id="lizzardg">
        <md:firstname>Elizabeth</md:firstname>
        <md:surname>Gregory</md:surname>
        <md:fullname>Elizabeth Gregory</md:fullname>
        <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:author>
  </md:authorlist>
  <md:maintainerlist>
    <md:maintainer id="cnxorg">
        <md:firstname/>
        <md:surname>Connexions</md:surname>
        <md:fullname>Connexions</md:fullname>
        <md:email>cnx@cnx.org</md:email>
    </md:maintainer>
    <md:maintainer id="lizzardg">
        <md:firstname>Elizabeth</md:firstname>
        <md:surname>Gregory</md:surname>
        <md:fullname>Elizabeth Gregory</md:fullname>
        <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:maintainer>
    <md:maintainer id="barnhart">
        <md:firstname>Kyle</md:firstname>
        <md:surname>Barnhart</md:surname>
        <md:fullname>Kyle Barnhart</md:fullname>
        <md:email>barnhart@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  <md:license href="http://creativecommons.org/licenses/by/2.0/"/>
  <md:licensorlist>
    <md:licensor id="lizzardg">
        <md:firstname>Elizabeth</md:firstname>
        <md:surname>Gregory</md:surname>
        <md:fullname>Elizabeth Gregory</md:fullname>
        <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:licensor>
  </md:licensorlist>
  <md:parent-module href="http://cnx.org/content/m9007/2.22/">
    <md:content-id>m9007</md:content-id>
    <md:title>The Advanced CNXML</md:title>
    <md:authorlist>
      <md:author id="rars">
        <md:firstname>Ricardo</md:firstname>
        <md:othername>Anthony</md:othername>
        <md:surname>Radaelli-Sanchez</md:surname>
        <md:fullname>Ricardo Radaelli-Sanchez</md:fullname>
        <md:email>ricky@alumni.rice.edu</md:email>
      </md:author>
    </md:authorlist>
    <md:license href="http://creativecommons.org/licenses/by/1.0"/>
    <md:licensorlist>
      <md:licensor id="rars">
        <md:firstname>Ricardo</md:firstname>
        <md:othername>Anthony</md:othername>
        <md:surname>Radaelli-Sanchez</md:surname>
        <md:fullname>Ricardo Radaelli-Sanchez</md:fullname>
        <md:email>ricky@alumni.rice.edu</md:email>
      </md:licensor>
    </md:licensorlist>
  </md:parent-module>
  <md:keywordlist>
    <md:keyword>CALS</md:keyword>
    <md:keyword>CALS table</md:keyword>
    <md:keyword>CNXML</md:keyword>
    <md:keyword>table</md:keyword>
    <md:keyword>tables</md:keyword>
  </md:keywordlist>
  <md:subjectlist>
    <md:subject>Science and Technology</md:subject>
  </md:subjectlist>
  <md:abstract>A thorough explanation of inserting tables into your Connexions content using Edit-in-Place.</md:abstract>
  <md:language>en</md:language>
  <!-- WARNING! The 'metadata' section is read only. Do not edit above.
       Changes to the metadata section in the source will not be saved. -->
</metadata>
<featured-links>
  <!-- WARNING! The 'featured-links' section is read only. Do not edit below.
       Changes to the links section in the source will not be saved. -->
    <link-group type="supplemental">
      <link url="http://www.oasis-open.org/specs/a502.htm" strength="3">CALS Table Model Document Type Definition</link>
    </link-group>
  <!-- WARNING! The 'featured-links' section is read only. Do not edit above.
       Changes to the links section in the source will not be saved. -->
</featured-links>
<content>
    

      <para id="calsp1">CNXML uses the industry standard <link url="http://www.oasis-open.org/specs/a502.htm">CALS Table
	  Model</link> for including tables into CNXML documents.  When you first insert a table using Edit-in-Place, you will see a blue window similar to the one shown in <link target-id="element-967"/>.</para>

      <figure id="element-967"><title>Adding a Table using Edit-in-Place</title><media id="id45802263" alt=""><image src="http://cnx.org/content/m19610/latest/eip-edit-new-table.png" mime-type="image/png"/></media></figure><para id="element-938">Using the Edit-in-Place interface, you can add a name and change how many rows or columns your table needs.  <note id="id45762361" type="important">Be sure to set the correct dimensions before you start editing the entries of the table, as the <code>Resize table</code> button will reset the entries to their default values.</note></para><para id="element-60">Once your table is correctly sized, you can start editing the entries of your table, as shown in <link target-id="element-382"/>.</para><figure id="element-382"><title>Editing Entries of a CALS Table</title><media id="id45760689" alt=""><image src="http://cnx.org/content/m19610/latest/eip-edit-table-entries.png" mime-type="image/png"/></media></figure><para id="element-748">Provided below is a brief description of the CALS tags,
	  their attributes, and children (along with <link target-id="grilltemp">a helpful example</link>).  For a more
	  complete description of the CALS Table consult the <link url="http://www.oasis-open.org/specs/a502.htm">CALS Table
	  Spec</link>.
      </para><section id="tablesec">
	<title>table</title>
	<para id="table">The <code>table</code> tag marks the beginning of a table.
	  It has an optional first child of <link document="m9000" target-id="name">name</link> (as you can see in the Edit-in-Place interface) and must contain one or more
	  <link target-id="tgroup">tgroup</link> tags.  The Edit-in-Place interface, however, only supports the utilization of one tgroup.  The
	  <code>table</code> tag also has many attributes, to find out
	  more information consult the <link url="http://www.oasis-open.org/specs/a502.htm">CALS Table
	  Spec</link>.
	</para>
      </section>

      <section id="tgroupsec">
	<title>tgroup</title>
	<para id="tgroup">The <code>tgroup</code> tag marks the beginning of a new
	  portion of a <link target-id="table">table</link>.  It has a
	  required attribute <code>cols</code> which is the number of
	  columns in the <code>tgroup</code>; as mentioned <link target-id="element-938">previously</link>, this attribute can be set using the Edit-in-Place interface.  Its children tags are
	  zero, one, or more <link target-id="colspec">colspec</link> or
	  <link target-id="spanspec">spanspec</link>, zero or one <link target-id="thead">thead</link> or <link target-id="tfoot">tfoot</link>, and one <link target-id="tbody">tbody</link> tag.
	</para>
      </section>

      <section id="colspecsec">
	<title>colspec</title>
	<para id="colspec">
	  The <code>colspec</code> tag is an <term>empty tag</term>
	  that specificies the column of a <link target-id="table">table</link> or <link target-id="entrytbl">entrytbl</link>.  The names and numbers
	  specified as attributes are used for referencing by other
	  tags.
	</para>
      </section>

      <section id="spanspecsec">
	<title>spanspec</title>
	<para id="spanspec">
	  The <code>spanspec</code> tag is an empty tag that
	  identifies a horizontal span of columns and associated
	  attributes that can subsequently be referenced by its
	  spanname for repeated use in <link target-id="entry">entry</link> or <link target-id="entrytbl">entrytbl</link> in different <link target-id="row">rows</link>.
	</para>
      </section>

      <section id="theadsec">
	<title>thead</title>
	<para id="thead">
	  The <code>thead</code> tag identifies the heading <link target-id="row">row</link> of a <link target-id="tgroup">tgroup</link> or <link target-id="entrytbl">entrytbl</link>.  The <code>thead</code>
	    tag can have zero, one, or more <link target-id="colspec">colspec</link> tags and one or more <link target-id="row">row</link>.
	</para>
      </section>

      <section id="tfootsec">
	<title>tfoot</title>
	<para id="tfoot">
	  The <code>tfoot</code> tag identifies the <link target-id="row">rows</link> of footer information that are
	    displayed after the <link target-id="tbody">tbody</link>.
	    The <code>tfoot</code> tag can have zero, one, or more
	    <link target-id="colspec">colspec</link> tags and one or more
	    <link target-id="row">row</link>.
	</para>
      </section>

      <section id="tbodysec">
	<title>tbody</title>
	<para id="tbody">
	  The <code>tbody</code> tag identifies the body of a <link target-id="tgroup">tgroup</link> or <link target-id="entrytbl">entrytbl</link>.  The <code>tbody</code>
	    tag must have one or more <link target-id="row">row</link>
	    tags.
	</para>
      </section>

      <section id="rowsec">
	<title>row</title>
	<para id="row">
	  The <code>row</code> tag identifies the row of information
	  in a <link target-id="thead">thead</link>, <link target-id="tbody">tbody</link>, or <link target-id="tfoot">tfoot</link>.  The <code>row</code> tag must
	  have one or more <link target-id="entry">entry</link> or <link target-id="entrytbl">entrytbl</link>.
	</para>
      </section>

      <section id="entrytblsec">
	<title>entrytbl</title>
	<para id="entrytbl">
	  The <code>entrytbl</code> tag takes the place of an <link target-id="entry">entry</link>, but fits into a single <link target-id="row">row</link> of <link target-id="tbody">tbody</link> in a <link target-id="tgroup">tgroup</link>.  The content model is the
	  same as that of a <link target-id="tgroup">tgroup</link> except
	  that <link target-id="tfoot">tfoot</link> is ommitted and
	  <code>entrytbl</code> is self-excluding.  Its children tags
	  are zero, one, or more <link target-id="colspec">colspec</link>
	  or <link target-id="spanspec">spanspec</link>, zero or one
	  <link target-id="thead">thead</link> or <link target-id="tfoot">tfoot</link>, and one <link target-id="tbody">tbody</link> tag.
	</para>
      </section>
      
      <section id="entrysec">
	<title>entry</title>
	<para id="entry">The <code>entry</code> tag identifies an entry in a <link target-id="row">row</link>.  The <code>entry</code> tag
	  contains ASCII text and zero, one, or many <link document="m14394" target-id="cite">cite</link>, <link document="m14394" target-id="term">term</link>, <link document="m14394" target-id="cnln">cnxn</link>, <link document="m14394" target-id="cnln">link</link>, <link document="m14394" target-id="code">code</link>, <link document="m14394" target-id="emphasis">emphasis</link>, or <link document="m12660">media</link>.
	</para>
      </section>

      <section id="using"><title>Using CALS Tables</title><para id="tablep3">It might sound a little confusing but I think that the best
	  way to understand a table is to look at <link target-id="tableexam"/>.  For more information, consult the
<link url="http://www.oasis-open.org/specs/a502.htm">CALS
	  Table Spec</link>.
</para>
	<example id="tableexam">
	  <figure id="element-905"><media id="id45883286" alt=""><image src="http://cnx.org/content/m19610/latest/eip-edit-table-flowers-example.png" mime-type="image/png"/></media></figure><code id="id46236544" display="block">&lt;thead&gt;
&lt;row&gt;
&lt;entry&gt;Month&lt;/entry&gt;
&lt;entry&gt;Flower&lt;/entry&gt;
&lt;/row&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;row&gt;
&lt;entry align="center"&gt;January&lt;/entry&gt;
&lt;entry align="center"&gt;Carnation&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry align="center"&gt;February&lt;/entry&gt;
&lt;entry align="center"&gt;Violet&lt;/entry&gt;
&lt;/row&gt; 
&lt;row&gt;
&lt;entry align="center"&gt;March&lt;/entry&gt;
&lt;entry align="center"&gt;Daffodil&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry align="center"&gt;April&lt;/entry&gt;
&lt;entry align="center"&gt;Sweet Pea&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry align="center"&gt;May&lt;/entry&gt;
&lt;entry align="center"&gt;Sunflower&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;June&lt;/entry&gt;
&lt;entry&gt;Honeysuckle&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;July&lt;/entry&gt;
&lt;entry&gt;Larkspur&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;August&lt;/entry&gt;
&lt;entry&gt;Lily&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;September&lt;/entry&gt;
&lt;entry&gt;Forget-Me-Not&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;October&lt;/entry&gt;
&lt;entry&gt;Marigold&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;November&lt;/entry&gt;
&lt;entry&gt;Chrysanthemum&lt;/entry&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;entry&gt;December&lt;/entry&gt;
&lt;entry&gt;Narcissus&lt;/entry&gt;
&lt;/row&gt;
&lt;/tbody&gt;</code>
	  <para id="element-96">This code will end up looking like <link target-id="birthflowers">this</link>:</para><table id="birthflowers" frame="all" summary="">
<title>Birth Flowers</title>
<tgroup cols="2" colsep="1" rowsep="1"><thead>
  <row>
    <entry>Month</entry>
    <entry>Flower</entry>
  </row>
</thead>
<tbody>
  <row>
    <entry align="center">January</entry>
    <entry align="center">Carnation</entry>
  </row>
  <row>
    <entry align="center">February</entry>
    <entry align="center">Violet</entry>
  </row> 
  <row>
    <entry align="center">March</entry>
    <entry align="center">Daffodil</entry>
  </row>
  <row>
    <entry align="center">April</entry>
    <entry align="center">Sweet Pea</entry>
  </row>
  <row>
    <entry align="center">May</entry>
    <entry align="center">Sunflower</entry>
  </row>
  <row>
    <entry align="center">June</entry>
    <entry align="center">Honeysuckle</entry>
  </row>
  <row>
    <entry align="center">July</entry>
    <entry align="center">Larkspur</entry>
  </row>
  <row>
    <entry align="center">August</entry>
    <entry align="center">Lily</entry>
  </row>
  <row>
    <entry align="center">September</entry>
    <entry align="center">Forget-Me-Not</entry>
  </row>
  <row>
    <entry align="center">October</entry>
    <entry align="center">Marigold</entry>
  </row>
  <row>
    <entry align="center">November</entry>
    <entry align="center">Chrysanthemum</entry>
  </row>
  <row>
    <entry align="center">December</entry>
    <entry align="center">Narcissus</entry>
  </row>
</tbody>
	    


</tgroup>
</table>
	</example>
      </section>

  </content>
</document>
