Skip to content Skip to navigation Skip to collection information

OpenStax_CNX

You are here: Home » Content » 2008-'09 Open Education Cup: High Performance Computing » Advanced CNXML

Navigation

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? tag icon

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

This content is ...

Endorsed by Endorsed (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 display tagshide tags

    This collection is included inLens: High Performance Computing Open Education Cup 2008-2009
    By: Ken Kennedy Institute for Information Technology

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

    Click the tag icon 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 display tagshide tags

    This module is included inLens: Connexions Documentation
    By: Connexions

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

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

  • JVLA Affiliated display tagshide tags

    This module is included inLens: Jesuit Virtual Learning Academy Affiliated Material
    By: Jesuit Virtual Learning AcademyAs a part of collection: "Connexions Tutorial and Reference"

    Click the "JVLA Affiliated" link to see all content affiliated with them.

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

Also in these lenses

  • eScience, eResearch and Computational Problem Solving

    This collection is included inLens: eScience, eResearch and Computational Problem Solving
    By: Jan E. Odegard

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

  • OER/LOR Connexions T display tagshide tags

    This module is included inLens: OER/LOR Connexions Training
    By: ConnexionsAs a part of collection: "Connexions Tutorial and Reference"

    Comments:

    "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 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.
 

Advanced CNXML

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

Based on: The Advanced CNXML by Ricardo Radaelli-Sanchez

Summary: This document explains and elaborates on CNXML tags that you can insert into a Connexions document using Edit-in-Place.

Para

When working in Edit-in-Place, notice that the first item of the "Add Here" drop-down menu is "Paragraph". When you select this item and click Add Here, a text box will appear. You can now insert text in the white box, including inline tags. Note the id="element-143" in the upper left hand part of the blue box in Figure 1. element-143 is the paragraph's unique ID, which you can use to refer to the paragraph directly using a link tag. Also, you can find some helpful tips in the upper right-hand corner of the blue box: "Help editing <para>".

Figure 1: When you click "insert and choose paragraph", a box like this should appear.
A Paragraph Box
A Paragraph Box (para box.jpeg)

Example 1: Submitted by J. Cameron Cooper


<para id='intro'>
  Working on trees or bushes can generate a lot of limbs and 
branches to haul away. If you just carry them, it'll take 
all day. Instead, make a sledge. 
</para>
<para id="intro2">
  Find a large, complex branch to make the base of your 
sledge. It should be relatively flat, and broad and long 
enough to make a decent pile; that is, as big or bigger than 
anything else you need to haul away. Green branches from 
hardwoods are best. Place it with the cut end pointing the 
way you want to go. If no single branch is good enough, two
can be used. Just place their cut ends a couple feet apart.
</para>
<para id="intro3">
  Then pile on the remaining branches. Most will naturally 
weave together; if not, give 'em a little help. Once the 
pile it a few layers deep, smaller waste, like weeds or 
maybe even leaves can be added to the pile. If it gets 
unstable, another big branch will help.
</para>
<para id="intro4">
  When you're done, grab the cut end of the bottom branch, 
and maybe the base of one of the other big branches in the 
pile, and drag the thing where you want to go. You'll be 
surprised how much one person can drag!
</para>
<para id="intro5">
  If you have a lot of leaves or similar small stuff to move,
you can use a similar technique. Get a tarp, toss the leaves 
and weeds and whatnot in the middle, and then drag the whole 
thing away.
</para>	      

which displays as the following:

Working on trees or bushes can generate a lot of limbs and branches to haul away. If you just carry them, it'll take all day. Instead, make a sledge.

Find a large, complex branch to make the base of your sledge. It should be relatively flat, and broad and long enough to make a decent pile; that is, as big or bigger than anything else you need to haul away. Green branches from hardwoods are best. Place it with the cut end pointing the way you want to go. If no single branch is good enough, two can be used. Just place their cut ends a couple feet apart.

Then pile on the remaining branches. Most will naturally weave together; if not, give 'em a little help. Once the pile it a few layers deep, smaller waste, like weeds or maybe even leaves can be added to the pile. If it gets unstable, another big branch will help.

When you're done, grab the cut end of the bottom branch, and maybe the base of one of the other big branches in the pile, and drag the thing where you want to go. You'll be surprised how much one person can drag!

If you have a lot of leaves or similar small stuff to move, you can use a similar technique. Get a tarp, toss the leaves and weeds and whatnot in the middle, and then drag the whole thing away.

List

To insert a new list, select "list" from the "insert" drop-down menu. As with adding a paragraph, adding a list will insert a blue box, with the list's unique ID in the upper left-hand corner and a helpful link in the upper right-hand corner.

Figure 2
Lists Available in Edit-in-Place
Enumerated List
(a) After you add a list, you will see this blue box. You can then select the type of list you wish to use. Here an enumerated list has been selected
Enumerated List (enumerated list.jpeg)
Bulleted List
(b) Here a bulleted list has been selected.
Bulleted List (bulleted list.jpeg)

Example 2: Enumerated List


<list id='sledge' list-type='enumerated'>
  <title>Making a Sledge</title>
  <item>
    Find a large, complex branch to make the base of your
sledge. It should be relatively flat, and broad and long 
enough to make a decent pile; that is, as big or bigger than 
anything else you need to haul away. Green branches from 
hardwoods are best. Place it with the cut end pointing the way
you want to go. If no single branch is good enough, two can be 
used. Just place their cut ends a couple feet apart.
  </item>
  <item>
    Then pile on the remaining branches. Most will naturally 
weave together; if not, give 'em a little help. Once the pile 
it a few layers deep, smaller waste, like weeds or maybe even 
leaves can be added to the pile. If it gets unstable, another 
big branch will help.
  </item>
  <item>
    When you're done, grab the cut end of the bottom branch, 
and maybe the base of one of the other big branches in the 
pile, and drag the thing where you want to go. You'll be 
surprised how much one person can drag!
  </item>
</list>
The resulting list will look like:

Making a Sledge

  1. Find a large, complex branch to make the base of your sledge. It should be relatively flat, and broad and long enough to make a decent pile; that is, as big or bigger than anything else you need to haul away. Green branches from hardwoods are best. Place it with the cut end pointing the way you want to go. If no single branch is good enough, two can be used. Just place their cut ends a couple feet apart.
  2. Then pile on the remaining branches. Most will naturally weave together; if not, give 'em a little help. Once the pile it a few layers deep, smaller waste, like weeds or maybe even leaves can be added to the pile. If it gets unstable, another big branch will help.
  3. When you're done, grab the cut end of the bottom branch, and maybe the base of one of the other big branches in the pile, and drag the thing where you want to go. You'll be surprised how much one person can drag!

Example 3: Bulleted List


<list id="ex-bulleted-list" list-type="bulleted">
  <item>branches</item>
  <item>leaves</item>
  <item>sweat</item>
  <item>lemonade</item>
</list>
  • branches
  • leaves
  • sweat
  • lemonade

Equation

The equation tag is used to set off and number equations in CNXML documents. If you have MathML enabled for your document, you will only be able to place MathML equations within the equation tags. Otherwise, to write the actual equations, you can use ASCII or images.

Note:

Connexions strongly encourages the use equation with MathML tags when displaying math.
If you look at Figure 3, you will find the equation's unique ID in the upper left-hand corner and a helpful link in the upper right-hand corner.

Figure 3
Adding an Equation
Adding an Equation (equation.jpeg)

As with lists, you can add an optional title at the beginning of each equation.

Example 4: Using Images as Equations

<equation id="eqn14">
  <media id="img12" display="block" alt="1+2=3"
 <image mime-type='image/gif' src='euler.gif' />
</equation>

displays as:

euler.gif
(1)

Example 5: ASCII equations

<equation id='eqn15'>
  <title>Simple Arithmetic</title>
    11+27=38
</equation>

This equation will display as:

Simple Arithmetic

11+27=38
(2)

Exercise

The exercise tag allows authors to add practice problems into their documents. When you initially add an exercise, you will see the familiar blue box, with the unique ID and the helpful link in the top corners. However, also notice that new tags have been premade in your text box: problem and solution.

Figure 4
Adding an Exercise
Adding an Exercise (exercise.jpeg)

To continue utilizing edit-in-place to edit your exercise, press the Save button (see Figure 5). You can now add various block tags to your problem and solution, including paragraphs and lists!

Figure 5: If you save immediately after creating a new exercise, you can continue to edit the exercise using the familiar edit-in-place interface.
A New Exercise after Saving
A New Exercise after Saving (exercise-eip.png)

To create more complex exercises, such as multiple-choice, multiple-response, ordered-response, and free-response questions, QML (Questions Markup Language) may used in place of the problem and solution tags. For more information, please see the information about QML.

Example 6

<exercise id='hyd_test'>
  <problem id="id9">
    <para id='hyd_testp1'>
      The color of a hydrangea changes with the pH of the 
      soil. What color would the hydrangea be if the soil 
      were highly acidic?  Highly basic?  Neutral?
    </para>
  </problem>
  <solution id="id10">
    <para id='hyd_sol1p1'>
      Highly acidic soil produces blue flowers.  Highly 
      basic soil produces pink flowers. Neutral soil produces 
      very pale cream flowers.
    </para>
  </solution>
</exercise>

This code will display as:

Problem 1

The color of a hydrangea changes with the pH of the soil. What color would the hydrangea be if the soil were highly acidic? Highly basic? Neutral?

Solution

Highly acidic soil produces blue flowers. Highly basic soil produces pink flowers. Neutral soil produces very pale cream flowers.

Figure

The figure tag provides the structure for creating a figure within a document. They can contain either two or more subfigure tags, or a single media, table, or code tag.

Figure 6: Adding a figure will create this familiar blue box, with a helpful link in the upper right corner and the figure's unique ID in quotes in the upper left corner.
Adding a Figure
Adding a Figure (figure.jpeg)

The optional first tag of the figure tag is title which is used to title a figure.

The title tag is followed by any of the tags listed above; however, the most commonly used tag is media, which is used to include any sort of media such as images, video, music, or java applets. For more information on what media you can add to your content, and how to add it, see Adding Multimedia to Your Connexions Content.

The final tag is the optional caption which is used to add a small caption to the figure.

Example 7: Example of a Figure



<figure id='blossom'>
   <title>Momosa Blossom</title>
   <media id="image-example" display="block" alt="A Momosa Blossom.">
      <image id="flower" mime-type="image/jpeg" src="alb_jul_flo_1.jpg">
   </media>
   <caption>
      Picture taken by Jenn Drummond (CC Attribution).
   </caption>
</figure>

This code will display as:

Figure 7: Picture taken by Jenn Drummond (CC Attribution).
Momosa Blossom
Momosa Blossom (alb_jul_flo_1.jpg)

Code

As seen in Using Basic CNXML in Edit-in-Place, you can add inline code to your document; edit-in-place also allows you in insert a block of code, separate from text.

Figure 8: Note that code has a required unique ID if and only if the display attribute is block.
Adding a Block of Code
Adding a Block of Code (code.jpeg)

If you need to use the > and < symbols in your block of code, you must either use the unicode for these characters (&gt; and &lt;, if you have MathML enabled), or use the CDATA method. To utilize the CDATA method, insert <![CDATA[ before your code and ]]> after it, as seen in Example 8.

Example 8: A Block of Code, Using CDATA

Figure 9
Using CDATA in a Code Block
Using CDATA in a Code Block (code CDATA.jpeg)

When saved, Figure 9 will display as:


<para id='copy'>
  In a unix terminal the command to copy a file is 
  <code display='inline'>cp original copy</code>.
</para>

Note

As mentioned in Using Basic CNXML in Edit-in-Place, the note tag creates an "out of line" note to the reader. You can also insert a note using the drop-down box in Edit-in-Place; however, unless you edit the full source, the type of note will be set to the default.

Figure 10: As with code, notes require a unique ID when the display attribute is "block".
Adding a Note using Edit-in-Place
Adding a Note using Edit-in-Place (note.jpeg)

Example 9


<note>
  Gardening requires a lot of intense physical exertion.  
  Please drink plenty of water to avoid dehydration!
</note>     

The above markup will display as:

Note:

Gardening requires a lot of intense physical exertion. Please drink plenty of water to avoid dehydration!

Example

As is often the case in textbooks, authors will include examples in the middle of a chapter or section. For this reason CNXML provides the example tag that allows an author to include examples in a document.

Figure 11
Adding an Example Using Edit-in-Place
Adding an Example Using Edit-in-Place (example.jpeg)

Example 10

Here is the code for Example 9:


<example id="notexamp">  
  <code id="codeseg1" display="block">
    <note>
      Gardening requires a lot of intense physical exertion.  
      Please drink plenty of water to avoid dehydration!
    </note>   
  </code>
  <para id="notep2">
    The above markup will display as: 
  </para>
  <note>
    Gardening requires a lot of intense physical exertion.  
    Please drink plenty of water to avoid dehydration!
  </note>
</example>

CALS Table

The final element you can add using Edit-in-Place is table. To learn more about adding and editting tables using Edit-in-Place, see CALS Table. For a more complete description of the CALS Table consult the CALS Table Spec.

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

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

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | EPUB (?)

What is an EPUB file?

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

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

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? tag icon

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? tag icon

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