BYU Home page BRIGHAM YOUNG UNIVERSITY  
Search BYU 
Tables

Learn how to create tables to organize content on your ECEn web page.

Basic Tables
Let's have a look at some ECEn XML "code" to generate a small table:

<section>
<has-column>Class</has-column>
<has-column>Title</has-column>
<has-row>ECEn-CS 124</has-row>
<has-row>ECEn 191</has-row>
<style>visible border</style>
<style>visible column headings</style>
<section>
<in-row>ECEn 191</in-row>
<section>
<in-column>Class</in-column>
<text>ECEn 191</text>
</section>
<section>
<in-column>Title</in-column>
<text>Freshman Seminar</text>
</section>
</section>
<section>
<in-row>ECEn-CS 124</in-row>
<section>
<in-column>Class</in-column>
<text>ECEn-CS 124</text>
</section>
<section>
<in-column>Title</in-column>
<text>Introduction to Computer Organization</text>
</section>
</section>
</section>

Here is what this table would look like on ECEn XML web page:

ClassTitle
ECEn-CS 124
Introduction to Computer Organization
ECEn 191
Freshman Seminar

That seems like a lot of code just generate a table with two columns and two rows. Relax! It is easy code to understand and once you have a row or two the rest is copy and paste.

We'll take the source code apart and you'll find that it isn't so complicated after all.

To create a basic table:
1
We use <section> tags to create tables. We use these sections in two ways:
1.1
The "main" section defines the columns and rows of the table and the table's basic look and feel (borders, headings etc.)
1.2
The "child" sections, or sections within the main section, make up the table cells. Each cell section contains table cell content and where the content belongs.
2
Create a "main" <section> containing <has-row> and <has-column> tags, which define the columns and rows for the table. If you'd like, add <style> tags to give your table a border or specify whether you'd like column and/or row headings to appear. For all the possible table styles check out, The ECEn XML Templates Reference.
3
Create "child" <section>'s containing <in-row> and <in-column> tags, which define where this cell belongs in the table, along with the cell content.
The sample table uses a trick to save typing:
3.1
Create a "child" section with an <in-row> tag, but no <in-column> tag.
3.2
Within this section, create other sections, we'll call them "grandchild" sections, with an <in-column> tag, but no <in-row> tag.
3.3
Within these "grandchild sections," create all the content you'd like in that particular row and column.

What if I still don't get it... Have look at the Tables Example and if you're still stuck, send an email to the ECEn Web Team and we'll be happy to help you.

Common Task Downloads


Maintained by The ECEn Web Team (other formats). Based on this XML and ver. 3.7 of the ECEn web templates.
Copyright © 1994-2005. Brigham Young University. All Rights Reserved.