- metadata info removed and put in separate spec
- Info on tag groupings put in.
- Info on tag nesting put in.
- Children and attributes put in named paras rather than sections (to conserve space).
This specification defines version 0.5 of the Connexions Markup Language
(CNXML), an XML application for marking
up educational texts. It is designed for use in the
Connexions Project, but
we are making it generally available in the hopes that others
may find it useful. CNXML marks up the structure and semantic
content of a document and encourages the separation of content
from presentation. It contains few (if any) elements that
deal with style or presentation. Decisions about how to
display CNXML documents should be made elsewhere (in a Style Sheet, for
example.)
To aid in testing conformance with this specification, we
provide implementations in various schema formats below. In
some cases, however, the schema language is not expressive
enough to capture the full specification. In these cases we
have chosen to allow the schema implementation to be more
lax. In other words, any document conforming to the
specification will validate according to the schema, but not
necessarily vice versa. In all cases,
consider this specification to be the definitive reference
for CNXML, taking precedence over any provided schema. In
other words, by definition the spec is always
right.
CNXML does not encompass all possible markup that someone
might wish to include in a document. Rather, it is intended
to serve as a general-purpose framework for marking the
structure and semantics of the material. For more specific
markup in a particular area, you can can combine CNXML with
other XML markup languages. A common example is the use of
MathML to mark up
mathematical equations (see below).
Since the same tag may be used to mean different things in
different XML languages, each language defines a URI to
act as a namespace, distinguishing it from
other languages. The combination of namespace URI and tag
name is globally unique. The CNXML namespace is:
http://cnx.rice.edu/cnxml. For more
information on how to use namespaces, see the W3C's Namespaces in
XML specification.
Usually, there are no restrictions on which namespace
(if any) should be the default or on what the namespace
prefix should be. However, if you are using the DTD
provided
above, CNXML
must be used as the default namespace with no prefix.
The combination of CNXML and MathML occurs commonly since
much educational material has mathematical content. To
aid in this, we have included a special DTD in the DTD archive above that allows
you to validate combined CNXML/MathML files. To take
advantage of this, do the following three things:
- Add the following Document Type Definition to the
top of your file before
<document>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN"
"http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
- Declare the MathML namespace,
xmlns:m="http://www.w3.org/1998/Math/MathML"
on <document>
- Prepend the MathML prefix
m: to every MathML tag in your document
Formal equations and relations should be wrapped in the
CNXML equation tag. These
may be given names and are easy to search for.
Additionally, some presentations of CNXML may provide
automatic numbering for equations. In addition to formal
equations, you may include math in any CNXML tag that
allows inline tags.
You must enclose all mathematics
in the <m:math> tag.
A short CNXML/MathML is listed below.
Note the DOCTYPE declaration at the top, the
xmlns and xmlns:m attributes on
the document tag, and the use of the m:
prefix on MathML tags.
<?xml version="1.0" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN"
"http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml"
xmlns:m="http://www.w3.org/1998/Math/MathML"
id='mathml'>
<name>Combining MathML and CNXML</name>
<content>
<para id="p1">
This is a small piece of math written using MathML:
<m:math>
<m:apply>
<m:plus/>
<m:cn>2</m:cn>
<m:cn>3</m:cn>
</m:apply>
</m:math>
</para>
</content>
</document>
For more information on combining CNXML and MathML (including many examples), see the Connexions module Content MathML.