<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_plain.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m9007">

  <name>CALS Table</name>

  <metadata>
  <md:version>1.3</md:version>
  <md:created>2007/01/02 12:05:38 US/Central</md:created>
  <md:revised>2007/10/30 14:35:17.568 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <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:abstract>A thorough explanation of inserting tables into your Connexions content using Edit-in-Place.</md:abstract>
</metadata>

  <content>
    

      <para id="calsp1">CNXML uses the industry standard <link src="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 <cnxn target="element-967"/>.</para>

      <figure id="element-967"><name>Adding a Table using Edit-in-Place</name>
 <media type="application/postscript" src="table.eps">
  <media type="image/png" src="table.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 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 <cnxn target="element-382"/>.</para><figure id="element-382"><name>Editing Entries of a CALS Table</name>
 <media type="application/postscript" src="table-entry.eps">
  <media type="image/png" src="table_entry.png"/>
 </media></figure><para id="element-748">Provided below is a brief description of the CALS tags,
	  their attributes, and children (along with <cnxn target="grilltemp">a helpful example</cnxn>).  For a more
	  complete description of the CALS Table consult the <link src="http://www.oasis-open.org/specs/a502.htm">CALS Table
	  Spec</link>.
      </para><section id="tablesec">
	<name>table</name>
	<para id="table">The <code>table</code> tag marks the beginning of a table.
	  It has an optional first child of <cnxn target="name" document="m9000">name</cnxn> (as you can see in the Edit-in-Place interface) and must contain one or more
	  <cnxn target="tgroup">tgroup</cnxn> 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 src="http://www.oasis-open.org/specs/a502.htm">CALS Table
	  Spec</link>.
	</para>
      </section>

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

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

      <section id="spanspecsec">
	<name>spanspec</name>
	<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 <cnxn target="entry">entry</cnxn> or <cnxn target="entrytbl">entrytbl</cnxn> in different <cnxn target="row">rows</cnxn>.
	</para>
      </section>

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

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

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

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

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

      <section id="using">
	<name>Using CALS Tables</name>
	<para id="tablep3">
	  It might sound a little confusing but I think that the best
	  way to understand a table is to look at <cnxn target="tableexam"/>.  For more information, consult the
	  <link src="http://www.oasis-open.org/specs/a502.htm">CALS
	  Table Spec</link> or the <link src="http://cnx.rice.edu/technology/cnxml/0.5/spec">CNXML
	  Spec</link>.
	</para>
	<example id="tableexam">
	  <figure id="element-905"><media type="application/postscript" src="flower-table.eps">
  <media type="image/png" src="flower-table.png"/>
</media></figure><code type="block"><![CDATA[<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>June</entry>
    <entry>Honeysuckle</entry>
  </row>
  <row>
    <entry>July</entry>
    <entry>Larkspur</entry>
  </row>
  <row>
    <entry>August</entry>
    <entry>Lily</entry>
  </row>
  <row>
    <entry>September</entry>
    <entry>Forget-Me-Not</entry>
  </row>
  <row>
    <entry>October</entry>
    <entry>Marigold</entry>
  </row>
  <row>
    <entry>November</entry>
    <entry>Chrysanthemum</entry>
  </row>
  <row>
    <entry>December</entry>
    <entry>Narcissus</entry>
  </row>
</tbody>]]></code>
	  <para id="element-96">This code will end up looking like <cnxn target="birthflowers">this</cnxn>:</para><table id="birthflowers" frame="all">
<name>Birth Flowers</name>
<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>
