Skip to content Skip to navigation Skip to collection information

OpenStax_CNX

You are here: Home » Content » Connexions Tutorial and Reference » CALS Table

Navigation

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • CNX Documentation display tagshide tags

    This collection is included inLens: Connexions Documentation
    By: Connexions

    Comments:

    "The canonical how-to guide to using Connexions."

    Click the "CNX Documentation" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • OER/LOR Connexions T display tagshide tags

    This collection is included inLens: OER/LOR Connexions Training
    By: Connexions

    Comments:

    "This collection has the basic training for authoring modules (chapters/sections) and collections (textbooks/courses etc)."

    Click the "OER/LOR Connexions T" link to see all content selected in this lens.

    Click the tag icon tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

CALS Table

Module by: Elizabeth Gregory. E-mail the author

Based on: The Advanced CNXML by Ricardo Radaelli-Sanchez

Summary: A thorough explanation of inserting tables into your Connexions content using Edit-in-Place.

CNXML uses the industry standard CALS Table Model 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 Figure 1.

Figure 1
Adding a Table using Edit-in-Place
Adding a Table using Edit-in-Place (/content/m19610/latest/eip-edit-new-table.png)

Using the Edit-in-Place interface, you can add a name and change how many rows or columns your table needs.

Important:

Be sure to set the correct dimensions before you start editing the entries of the table, as the Resize table button will reset the entries to their default values.

Once your table is correctly sized, you can start editing the entries of your table, as shown in Figure 2.

Figure 2
Editing Entries of a CALS Table
Editing Entries of a CALS Table (/content/m19610/latest/eip-edit-table-entries.png)

Provided below is a brief description of the CALS tags, their attributes, and children (along with a helpful example). For a more complete description of the CALS Table consult the CALS Table Spec.

table

The table tag marks the beginning of a table. It has an optional first child of name (as you can see in the Edit-in-Place interface) and must contain one or more tgroup tags. The Edit-in-Place interface, however, only supports the utilization of one tgroup. The table tag also has many attributes, to find out more information consult the CALS Table Spec.

tgroup

The tgroup tag marks the beginning of a new portion of a table. It has a required attribute cols which is the number of columns in the tgroup; as mentioned previously, this attribute can be set using the Edit-in-Place interface. Its children tags are zero, one, or more colspec or spanspec, zero or one thead or tfoot, and one tbody tag.

colspec

The colspec tag is an empty tag that specificies the column of a table or entrytbl. The names and numbers specified as attributes are used for referencing by other tags.

spanspec

The spanspec 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 entry or entrytbl in different rows.

thead

The thead tag identifies the heading row of a tgroup or entrytbl. The thead tag can have zero, one, or more colspec tags and one or more row.

tfoot

The tfoot tag identifies the rows of footer information that are displayed after the tbody. The tfoot tag can have zero, one, or more colspec tags and one or more row.

tbody

The tbody tag identifies the body of a tgroup or entrytbl. The tbody tag must have one or more row tags.

row

The row tag identifies the row of information in a thead, tbody, or tfoot. The row tag must have one or more entry or entrytbl.

entrytbl

The entrytbl tag takes the place of an entry, but fits into a single row of tbody in a tgroup. The content model is the same as that of a tgroup except that tfoot is ommitted and entrytbl is self-excluding. Its children tags are zero, one, or more colspec or spanspec, zero or one thead or tfoot, and one tbody tag.

entry

The entry tag identifies an entry in a row. The entry tag contains ASCII text and zero, one, or many cite, term, cnxn, link, code, emphasis, or media.

Using CALS Tables

It might sound a little confusing but I think that the best way to understand a table is to look at Example 1. For more information, consult the CALS Table Spec.

Example 1

Figure 3
Figure 3 (/content/m19610/latest/eip-edit-table-flowers-example.png)
<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>

This code will end up looking like this:

Table 1: Birth Flowers
Month Flower
January Carnation
February Violet
March Daffodil
April Sweet Pea
May Sunflower
June Honeysuckle
July Larkspur
August Lily
September Forget-Me-Not
October Marigold
November Chrysanthemum
December Narcissus

Collection Navigation

Content actions

Download module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks