Connexions

You are here: Home » Content » Connexions Tutorial and Reference » Using Basic CNXML in Edit-In-Place

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

Endorsed by (What does "Endorsed by" mean?)

This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization.
• HPC Open Edu Cup

This module is included inLens: High Performance Computing Open Education Cup 2008-2009
By: Ken Kennedy Institute for Information TechnologyAs a part of collection: "2008-'09 Open Education Cup: High Performance Computing"

Click the "HPC Open Edu Cup" link to see all content they endorse.

Click the tag icon to display tags associated with this content.

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
• CNX Documentation

This module and collection are included inLens: Connexions Documentation
By: Connexions

"The canonical how-to guide to using Connexions."

Click the "CNX Documentation" link to see all content affiliated with them.

Click the tag icon to display tags associated with this content.

Also in these lenses

• eScience, eResearch and Computational Problem Solving

This module is included inLens: eScience, eResearch and Computational Problem Solving
By: Jan E. OdegardAs a part of collection: "2008-'09 Open Education Cup: High Performance Computing"

Click the "eScience, eResearch and Computational Problem Solving" link to see all content selected in this lens.

• OER/LOR Connexions T

This collection is included inLens: OER/LOR Connexions Training
By: Connexions

"This collection has the basic training for authoring modules (chapters/sections) and collections (textbooks/courses etc)."

Click the "OER/LOR Connexions T" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Inside Collection (Course):

Using Basic CNXML in Edit-In-Place

Module by: Elizabeth Gregory, Connexions. E-mail the authors

Summary: This document introduces simple CNXML tags that are easy to use in Edit-in-Place.

This module also contains information derived from The Advanced CNXML by Ricardo Radaelli-Sanchez.

Starting with CNXML

To create the bare bones of content in Connexions, the author interface provides a variety of creation tools: the Document Importer, Edit-In-Place, and even a full-source editor. However, a basic knowledge of our markup language can help make small edits into tremendous enhancements to your material!

Connexions uses the Connexions Markup Language (CNXML) as its primary language for marking up and storing documents. CNXML is lightweight XML for marking up educational content. Unlike the well-known HTML, the goal of CNXML is to convey the content of the material and not a particular presentation. For example, say you have the following sentence: I like cupcakes very much. However, you feel that you enthusiasm for cupcakes has not been fully expressed. In HTML, you would use bold, underline, italic, etc.; in CNXML, you would use the emphasis tag.

Inline Tags

Inline tags, such as emphasis, are used to embed content and functionality inside the structural tags, such as paragraphs. Some of the more commonly used tags are discussed below.

Emphasis

As mentioned previously, the emphasis tag is used to accent certain text. Note that this refers to semantic emphasis and not a typeface. Different stylesheets can render emphasis with different typefaces.

Example 1


<para id='intro'>
Gardenias are my absolute <emphasis>favorite</emphasis>
flower. Their petals are soft, and their bloom has an
absolutely <emphasis>heavenly</emphasis> scent.
</para>


The above markup will display as:

Gardenias are my absolute favorite flower. Their petals are soft, and their bloom has an absolutely heavenly scent.

Term

The term tag is used to mark words or phrases which are being defined. However, its use is confined to either a para or definition tag. The term tag has one optional attribute: URL - a URL specifying the source or definition of the term.

Example 2


<para id='gardenia'>
<term url="http://en.wikipedia.org/wiki/Gardenia">Gardenias
</term> can be tricky to maintain.  The soil around the
roots of a <term>gardenia</term> must remain moist always,
but too much water can damage the plant.  Also,
<term>gardenias</term> enjoy the sun, but if the
<emphasis>foliage</emphasis> gets wet to bring the gardenia
</para>      

The above markup will display as:

Gardenias can be tricky to maintain. The soil around the roots of a gardenia must remain moist always, but too much water can damage the plant. Also, gardenias enjoy the sun, but if the foliage gets wet to bring the gardenia into the shade.

Note

The note tag creates an "out of line" note to the reader. The type of note is specified by an optional type attribute. If a type is not specified, the default is Note. The type attribute can contain any of the following values:

• note
• aside
• warning
• tip
• important

Example 3


<para id='pollen'>
Receiving flowers is, on the whole, a wonderful thing.
However, sometimes pollen from the flowers can cause
problems.  In particular, the clean up of a bit of
pollen can be tricky.  <note type="Important">Do not
use water when cleaning up pollen!  This can lead to
counter-top and clothing stains!</note>  Your best bet
is to use a dry method of cleaning with a paper-towel.
</para>      

The above markup will display as:

Receiving flowers is, on the whole, a wonderful thing. However, sometimes pollen from the flowers can cause problems. In particular, the clean up of a bit of pollen can be tricky.

Important:
Do not use water when cleaning up pollen! This can lead to counter-top and clothing stains!
Your best bet is to use a dry method of cleaning, with a paper-towel, for example.

The link tag is the tag in CNXML used for linking to other Connexions modules or collections as well as external links.

• strength: The Strength attribute can contain the value 1, 2, or 3 specifying the relevance of the link.
• window: The Window attribute determines the manner in which the link location will be opened. It can contain the values "Replace" or "New". "Replace" will result in the link location opening in the current window replacing the page with the link. "New" will result in the link location opening in a new browser window.
• url: The URL attribute can contain the web address of the link you wish to reference.
• document: The Document attribute is used to reference the ids of other Connexions modules or Collections.
• target-id: The Target-id attribute is used to reference the ids of specific elements within Connexions modules.
• resource:
• version: The Version attribute is used to reference a specific version of a Connexions module or collection.

The target and document attributes can be used together or alone. If both are used then you will link to a particular tag in another document. If only document is used, you will link to another document. If only target is used, you will link to a particular tag within the current document.

Cite

The cite tag is used to refer to non-electronic materials within a document, and primarily contains the title, the author, and/or a page number of a work.

Example 4: Cite Example


Finally, a good resource is the <cite>Garden Lover's
Cookbook -- William M. Rice; Paperback</cite>.


The above markup will display as:

Finally, a good resource is the Garden Lover's Cookbook -- William M. Rice; Paperback.

Quote

The quote tag is used to denote that some text directly quotes another source. The quote tag has a display attribute which denotes whether the quote is inline or block.

Example 5: Quote Example


<para id='plantquote'>
Every plant needs a different amount of water in order to
grow well. <quote display="inline">"If you water each plant the same, you
will always water too much and too little."</quote>  Also,
remember the words of Lou Erickson:
<quote id="quote_example" display='block'>"Gardening requires lots of water -
most of it in the form of perspiration."</quote>
</para>
Every plant needs a different amount of water in order to grow well. “"If you water each plant the same, you will always water too much and too little."” Also, remember the words of Lou Erickson:
"Gardening requires lots of water - most of it in the form of perspiration."

Foreign

The foreign tag is used to denote that a word or phrase foreign to the language of the document is being used.

Example 6: Foreign Example


<para id='plantquote2'>
All flowers have a scientific name, often derived from
Latin.  <foreign>Gardenia augusta</foreign> is the name
of a type of gardenia found in Japan.
</para>
All flowers have a scientific name, often derived from latin. Gardenia augusta is the name of a type of gardenia found in Japan.

Code

The code tag is used to insert example computer output/input as either inline text within a paragraph or as a block of text. 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.

Example 7: Inline Code Example

For now, take a look at what the inline code looks like:


<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

You will see more about code blocks in Advanced CNXML using Edit-In-Place.

Content actions

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks