<< Chapter < Page Chapter >> Page >
This is the final installment of my three part tutorial on the CNXML language. It is currently valid for the most recent release of the language, CNXML 0.6. The keywords contain a list of the tags described in this tutorial. Along with the example code in this module there is also an example module that has been growing throughout the tutorial.

Code

The code tag is used to insert example computer output/input as either inline text within a paragraph or as ablock of text. To see which tags it may contain or be inside, consult the CNXML Spec . The code tag has a display attribute with two possible values.

  • inline (default) - used to specify code that is inline.
  • block - used to specify code that should be in a separate block of text.

<para id='copy'>In a unix terminal the command to copy a file is<code display='inline'>cp original copy</code>.</para>

In a unix terminal the command to copy a file is cp original copy

Got questions? Get instant answers now!

Exercise

The exercise tag provides a tag for authors to add practice problems into their documents. The exercise tag has a required id attribute and has two child tags, problem and solution .

To create more complex answers, such as multiple-choice, multiple-response, ordered-response, and text-responsequestions, QML (Questions Markup Language) may used in place of the problem and solution tags. For more information,please see the information about QML .

<exercise id='grilltest'><problem><para id='grilltestp1'>For food safety, a steak should be cooked to a minimum temperature of what?</para></problem><solution><para id='sol1p1'>160&deg; F or until the juices run clear and the meat is no longer pink.</para></solution></exercise>

For food safety, a steak should be cooked to a minimum temperature of what?

160° F or until the juices run clear and the meat is no longer pink

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Cals table

CNXML uses the industry standard CALS Table Model for including tables into CNXML documents. 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 title and must contain one or more tgroup tags. 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 . 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 othertags.

Spanspec

The spanspec tag is an empty tag that identifies a horizontal span of columns and associatedattributes 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 [link] . For more information, consult the CALS Table Spec or the CNXML Spec .

<table id='grilltemp' frame='all'><title>Steak Cooking Temperatures</title><tgroup cols='2' colsep='1' rowsep='1'><thead><row><entry>Temperature (&deg;F)</entry><entry>Description</entry></row></thead><tbody><row><entry align='center'>140</entry><entry align='center'>Rare</entry></row><row><entry align='center'>150</entry><entry align='center'>Medium Rare</entry></row><row><entry align='center'>160</entry><entry align='center'>Medium</entry></row><row><entry align='center'>165</entry><entry align='center'>Medium Well</entry></row><row><entry align='center'>170</entry><entry align='center'>Well</entry></row></tbody></tgroup></table>
Steak cooking temperatures
Temperature (°F) Description
140 Rare
150 Medium Rare
160 Medium
165 Medium Well
170 Well
Got questions? Get instant answers now!

Conclusions

This concludes the CNXML tutorial.

Questions & Answers

profit maximize for monopolistically?
Usman Reply
what kind of demand curve under monopoly?
Mik Reply
what is the difference between inflation and scarcity ?
Abdu Reply
What stops oligopolists from acting together as a monopolist and earning the highest possible level of profits?
Mik
why economics is difficult for 2nd school students.
Siraj Reply
what does mean opportunity cost?
Aster Reply
what is poetive effect of population growth
Solomon Reply
what is inflation
Nasir Reply
what is demand
Eleni
what is economics
IMLAN Reply
economics theory describes individual behavior as the result of a process of optimization under constraints the objective to be reached being determined by
Kalkidan
Economics is a branch of social science that deal with How to wise use of resource ,s
Kassie
need
WARKISA
Economic Needs: In economics, needs are goods or services that are necessary for maintaining a certain standard of living. This includes things like healthcare, education, and transportation.
Kalkidan
What is demand and supply
EMPEROR Reply
deman means?
Alex
what is supply?
Alex
ex play supply?
Alex
Money market is a branch or segment of financial market where short-term debt instruments are traded upon. The instruments in this market includes Treasury bills, Bonds, Commercial Papers, Call money among other.
murana Reply
good
Kayode
what is money market
umar Reply
Examine the distinction between theory of comparative cost Advantage and theory of factor proportion
Fatima Reply
What is inflation
Bright Reply
a general and ongoing rise in the level of prices in an economy
AI-Robot
What are the factors that affect demand for a commodity
Florence Reply
price
Kenu
differentiate between demand and supply giving examples
Lambiv Reply
differentiated between demand and supply using examples
Lambiv
what is labour ?
Lambiv
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Connexions tutorial and reference. OpenStax CNX. Feb 23, 2012 Download for free at http://cnx.org/content/col10151/1.27
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Connexions tutorial and reference' conversation and receive update notifications?

Ask