<< Chapter < Page | Chapter >> Page > |
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
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° 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
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 .
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 .
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.
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.
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 .
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 .
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 .
The
tbody
tag identifies the body of a
tgroup or
entrytbl . The
tbody
tag must have one or more
row tags.
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 .
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.
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 .
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 (°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>
Temperature (°F) | Description |
---|---|
140 | Rare |
150 | Medium Rare |
160 | Medium |
165 | Medium Well |
170 | Well |
This concludes the CNXML tutorial.
Notification Switch
Would you like to follow the 'Connexions tutorial and reference' conversation and receive update notifications?