<< Chapter < Page
  Cnxml tutorial   Page 1 / 1
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.


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&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

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 .


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 .

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


This concludes the CNXML tutorial.

Questions & Answers

what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
sciencedirect big data base
Introduction about quantum dots in nanotechnology
Praveena Reply
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
Damian Reply
absolutely yes
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Cnxml tutorial. OpenStax CNX. Jul 08, 2009 Download for free at http://cnx.org/content/col10121/1.10
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

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