Summary: A guide to the changes made in the 0.6 version of the Connexions Markup Language (CNXML 0.6). Written with experienced authors in mind, this document features a list of new elements, new attributes, and changes made to existing elements. It also includes code examples and links to other CNXML resources.
Connexions Markup Language 0.6 (CNXML 0.6) was unveiled on January 29, 2009. Several changes have been made to the language, including new elements, new attributes, and new behavior. The site itself has added features to make the transition to CNXML 0.6 as easy as possible.
Connexions has compiled a list of important changes in CNXML 0.6 for the convenience of its experienced authors. There are several resources in the Connexions Documentation lens to help less familiar users get started writing their own modules in CNXML. A full list of technical changes to the CNXML language can be found on Rhaptos, Connexions' development documentation site.
A Complete List of CNXML Tags can be found here.
If you have published content on Connexions before, you may be wondering if the new language has affected your modules. Existing modules will continue to function normally without any sort of upgrade or intervention. You do not need to change anything in your module or collection if it has already been published. Your readers will still be able to build collections with your modules, download PDF copies of your content, and enjoy all of the other features that Connexions offers.
However, you must upgrade your module to CNXML 0.6 before you can re-publish any existing content. Connexions has developed an easy-to-use conversion tool that takes care of this task for you without changing the look, feel, or presentation of the module.
When you checkout or import a module written in CNXML 0.5, the first thing you will notice is a notification on the Edit Text page urging you to upgrade your module. This process is safe and completely automatic. The upgrade tool creates a backup copy of your original module, saves the backup CNXML file in your module's file folder, and transforms the module from CNXML 0.5 to 0.6. The module is then ready to be edited.
You can find more information about this process on the upgrade help page.
The structure of media tags has been changed dramatically from previous versions of the CNXML language. There are now elements to handle each specific media type, from images and videos to Java applets and Labview demonstrations. This has cut down on the number of param tags necessary to display a media element. It also gives authors a straightforward way to specify alternate media in print, i.e. displaying a Flash video online and an image in the PDF. For more information on the new media tags, check out the media element in Edit-In-Place's help.
<media id="foto_de_perro"
alt="Un perro sentado en una cama">
<image mime-type="image/jpeg"
src="image1.jpg" />
</media><media id="flash-example" alt="Dancing Connexions">
<flash mime-type="application/x-shockwave-flash"
src="flash2.swf"
width="282"
height="108"/>
</media>
The name tag has been replaced by the title tag. The name tag is no longer applied to the document element; the title element has been added for that purpose.
<para id="cnxml">
<title>An Introduction to CNXML</title>
This paragraph presents a brief introduction
to a customized version of XML called CNXML.
</para> The cnxn tag has been assimilated into the link tag-- after all, who needs two tags that basically do the same thing? Links to outside resources are called using the url attribute while links to internal modules use the document attribute. You can read all about these changes below, or click here for a more technical explanation of the new link tag.
<para id="linkexample">
There are many ways to grill <link document="m10275" version="2.1">
a good steak</link>.
</para>The exercise tag now includes a third child element, commentary. This new tag allows you to add commentary to the end of your exercise.
<exercise id="gravity-exercise">
<problem id="gravity-problem">
<para id="prob_1">
If a golf ball and a feather were dropped at
the same time from 10 feet, which would
strike the ground first?
</para>
</problem>
<solution id="gravity-solution">
<para id="sol_1">
The golf ball would hit the ground first.
</para>
</solution>
<commentary id="gravity-commentary"
type="follow-up">
How would this problem have been different
if the experiment was conducted in a vacuum?
</commentary>
</exercise>The space element gives users the ability to add blank, white space to their document. Users can now add blanks lines to their exercises without simply placing several non-breaking spaces in succession.
<exercise id="chem-exercise">
<problem id="chem-problem-1">
<para id="chem-para1">
Fill in the blanks:
</para>
<para id="chem-para2">
A water molecule is made up of two
<space count="10" effect="underline"/>
atoms and one
<space count="10" effect="underline"/>
atom.
</para>
</problem>
<solution id="chem-solution-1">
<para id="solution1"> Hydrogen; Oxygen </para>
</solution>
</exercise>Footnotes are now specified with the footnote element, rather than being notes of type="footnote".
<para id="footnote-example">
Many people may not know that cheesecake
is tart, not a cake.
<footnote id="eip-id4632830">
Alan Davidson, Oxford Companion to Food,
s.v. cheesecake: "Cheesecake, not a
cake in the ordinary sense, is really a
kind of tart."
</footnote>
</para>Superscripts and subscripts can now be defined with the sup and sub elements, respectively. Connexions still encourages users to use MathML for mathematical expressions with superscripts and subscripts.
<para id="sup-example">
We called him Rowdy Rodney, or R<sup>2</sup> for short.
</para>
<para id="sub-example">
The second length value is sometimes noted as L<sub>2</sub>
</para>
If you use Connexions' full-source editor, you'll love the new preformat tag. Text contained in the preformat tag will display with the same word spacing and indentation as in full-source.
<para id="preformatexample">
This text will be displayed like normal paragraph text.
<preformat id="examplepfmt" display="block">
This will be the next line.
This line will be two spaces ahead of the first.
And this line will be four!
And this line will have no spaces in front of it.
</preformat>
</para>Figures, examples, sections, and any elements that use labels can now take the label element as a child. For instance, if you want to override the label "Figure 2.1" automatically applied by Connexions, you can specify one using this tag.
<figure id="fig1">
<label>Figura</label>
<media id="dogpic" alt="Perro sentado en la cama">
<image mime-type="image/jpeg" src="image1.jpg" />
</media>
<caption>Este es mi perro Benny
haciendo lo que hace mejor.</caption>
</figure>In order to give Connexions authors more control over the presentation of their content in print and online, CNXML 0.6 features the ability to insert a specific number of blank lines using the newline element.
<para id="lyricsexample">
<quote id="all-we-are">"All we
are is dust in the wind."</quote>
<newline />
<cite>- Kansas</cite>
</para>Citing your work can be painful when you draw from several sources, especially when every type of publication cites its articles differently. Luckily, Connexions has added the cite-title element which can be used in conjunction with cite to make this process easier than ever. Simply use the cite-title element to markup the title and fill in the pubtype attribute with the type of publication, and Connexions take care of the rest!
<cite>
<cite-title pubtype="book">A Tale of Two Cities</cite-title>
by Charles Dickens
</cite>
is a classic novel.There have been several changes to the CNXML language besides the addition of new elements. Many attributes that were present in CNXML 0.5 have now been removed, replaced, or assimilated into different tags altogether. In order to make this list of changes useful for Connexions authors, we have compiled a list of all tags that have been changed. Attributes are listed as either required or optional. Important changes are emphasized and all changes are listed. Also, do not forget that you can edit use Edit-In-Place's help page as a reference for all available tags while you're editing your module.
Connexions has added and modified several common attributes in CNXML 0.6.
CNXML 0.6 introduces the ability to add the ID and class attributes to any element. This gives users the power to add more semantics to their document using the CNXML markup. Additionally, Connexions has introduced an automatic feature which adds IDs to items that require them.
For most images and online media, the alt attribute provides enough space to facilitate a good text alternative. However alt text is alternate text, not a full description of the object and what it conveys. In order to be truly accessible, media like charts, graphs, and interactive demonstrations require more in-depth descriptions of their content.
The longdesc attribute has been added to all media elements to facilitate this accessibility feature. The longdesc attribute contains a URL pointing to a text file, either hosted alongside your module or elsewhere on the web. That text file should contain a textual description of the media's content. The longdesc attribute is then used by accessibility utilities to provide visually impaired users with a meaningful representation of the media. You can find out more about the use of long descriptions here.
Several tags can now take the display attribute, which controls how an element is presented on the page. This attribute has three specific values.
There has been a major paradigm shift in the way hyperlinks work in CNXML 0.6. Rather than simply specifying a URL or a module ID for links, elements that use hyperlinks now have a variety of different attributes which control their behavior. This applies to both link and cite. Note that the cnxn tag has been assimilated into the link tag. For both link and cite, one of the following attributes must be specified to create a hyperlink.
You can learn more about the use of hyperlinks on the Edit-In-Place help page.
Hyperlinks inside your modules are no longer limited to the same window or tab. Elements that use hyperlinks can now take advantage of the window attribute, which has two supported values of window.
Check out the Edit-In-Place Tag List for a comprehensive guide to each tag and how it works. You may also refer to the Connexions Documentation Lens for more tutorials to help you get started building your own modules!