<< Chapter < Page Chapter >> Page >
This is a basic introduction to the CNXML language. It includes a description on how to begin a CNXML module and also examples of the basic tags needed to start writing in CNXML.

Starting with cnxml

CNXML is a lightweight XML markup language for marking up educational content. The goal of CNXML is to conveythe content of the material and not a particular presentation. Connexions uses the Connexions Markup Language (CNXML) as its primary language for storing documents. Now let's get started!

Cnxml tags


All CNXML documents have as their root the document tag. Everything about the document including it's metadata and content are containedwithin the document tag. It is important that you understand the basic structure for a CNXML document. The structure isas follows:

    Document (root tag)

  • Title
  • Metadata Section
  • Content Section

The document tag has one required attribute:

  • id - a unique ID given to the document.
This is automatically assigned.

Id requirements

One major difference between CNXML and other markup languages is the id attribute requirement. Certain tags require that you include the id attribute, but all can possess an id . The tags requiring an id are listed below:

  • document
  • para
  • equation
  • list
  • rule
  • definition
  • exercise
  • table
  • div
  • section
  • subfigure
  • example
  • footnote
  • problem
  • solution
  • block quotes
  • media
  • meaning
  • proof
  • list
  • preformat
  • block code
  • figure
  • block notes
So, if you are going to use any of the above tags, be sure to add the id attribute and give it a unique 'id'. Be aware that in CNXML 0.6 ids will be generated automatically, but you are still permitted to specify you own ids if you wish.

Here is an example of a couple of paras containing a user generated ids.

<para id='uniqueid1'>This is an example to illustrate the use of the<code>id</code>attribute.</para><para id='uniqueid2'>This paragraph has a different id than the last.</para>
Any tag can contain an id attribute. This is useful if you want to link to the information contained in a particular tag.


The document tag should also contain any namespace declarations. Namespaces allow us to easily use other mark-up languages within CNXML without having toworry about whether tag name collision will occur. For simple documents using only CNXML, you need to include theCNXML namespace attribute . Any additional languages need to be declared as well andshould be given their own prefixes. For example, to associate the MathML namespace with the prefix "m",include the following attribute: xmlns:m='http://www.w3.org/1998/Math/MathML' . This states that any tag with a prepended "m" will beinterpreted as a MathML tag while any tag without a prefix will be interpreted as CNXML. The document tag should also contain the metadata namespace xmlns:md="http://cnx.rice.edu/mdml/0.4" , the bibtex namspace xmlns:bib="http://bibtexml.sf.net/" , and the question markup language xmlns:q="http://cnx.rice.edu/qml/1.0" .

This what the document tag should look like.

<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML"xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"xmlns:q="http://cnx.rice.edu/qml/1.0" id="m9000" module-id="" cnxml-version="0.6">
Be aware that the you document id can not be the same as this example. Each module will have its own unique id.

Questions & Answers

find the 15th term of the geometric sequince whose first is 18 and last term of 387
Jerwin Reply
I know this work
The given of f(x=x-2. then what is the value of this f(3) 5f(x+1)
virgelyn Reply
hmm well what is the answer
how do they get the third part x = (32)5/4
kinnecy Reply
can someone help me with some logarithmic and exponential equations.
Jeffrey Reply
sure. what is your question?
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
I'm not sure why it wrote it the other way
I got X =-6
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
is it a question of log
I rally confuse this number And equations too I need exactly help
But this is not salma it's Faiza live in lousvile Ky I garbage this so I am going collage with JCTC that the of the collage thank you my friends
Commplementary angles
Idrissa Reply
im all ears I need to learn
right! what he said ⤴⤴⤴
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
Kevin Reply
a perfect square v²+2v+_
Dearan Reply
kkk nice
Abdirahman Reply
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
Kim Reply
or infinite solutions?
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Embra Reply
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
Nancy Reply
rolling four fair dice and getting an even number an all four dice
ramon Reply
Kristine 2*2*2=8
Bridget Reply
Differences Between Laspeyres and Paasche Indices
Emedobi Reply
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
Mary Reply
how do you translate this in Algebraic Expressions
linda Reply
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
Got questions? Join the online conversation and get instant answers!
QuizOver.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?