<?xml version="1.0" encoding="utf-8"?>
<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">

  <title>Using Basic CNXML in Edit-In-Place</title>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4">
  <!-- WARNING! The 'metadata' section is read only. Do not edit below.
       Changes to the metadata section in the source will not be saved. -->
  <md:content-id>m14394</md:content-id>
  <md:title>Using Basic CNXML in Edit-In-Place</md:title>
  <md:version>1.4</md:version>
  <md:created>2006/12/05 12:17:59 US/Central</md:created>
  <md:revised>2009/02/02 08:35:16.745 US/Central</md:revised>
  <md:authorlist>
    <md:author id="lizzardg">
        <md:firstname>Elizabeth</md:firstname>
        <md:surname>Gregory</md:surname>
        <md:fullname>Elizabeth Gregory</md:fullname>
        <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:author>
    <md:author id="cnxorg">
        <md:firstname/>
        <md:surname>Connexions</md:surname>
        <md:fullname>Connexions</md:fullname>
        <md:email>cnx@cnx.org</md:email>
    </md:author>
  </md:authorlist>
  <md:maintainerlist>
    <md:maintainer id="lizzardg">
        <md:firstname>Elizabeth</md:firstname>
        <md:surname>Gregory</md:surname>
        <md:fullname>Elizabeth Gregory</md:fullname>
        <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:maintainer>
    <md:maintainer id="cnxorg">
        <md:firstname/>
        <md:surname>Connexions</md:surname>
        <md:fullname>Connexions</md:fullname>
        <md:email>cnx@cnx.org</md:email>
    </md:maintainer>
  </md:maintainerlist>
  <md:license href="http://creativecommons.org/licenses/by/2.0/"/>
  <md:licensorlist>
    <md:licensor id="lizzardg">
        <md:firstname>Elizabeth</md:firstname>
        <md:surname>Gregory</md:surname>
        <md:fullname>Elizabeth Gregory</md:fullname>
        <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:licensor>
  </md:licensorlist>
  <md:parent-module href="http://cnx.org/content/m9000/2.34/">
    <md:content-id>m9000</md:content-id>
    <md:title>The Basic CNXML</md:title>
    <md:authorlist>
      <md:author id="rars">
        <md:firstname>Ricardo</md:firstname>
        <md:othername>Anthony</md:othername>
        <md:surname>Radaelli-Sanchez</md:surname>
        <md:fullname>Ricardo Radaelli-Sanchez</md:fullname>
        <md:email>ricky@alumni.rice.edu</md:email>
      </md:author>
      <md:author id="brentmh">
        <md:firstname>Brent</md:firstname>
        <md:othername>Michael</md:othername>
        <md:surname>Hendricks</md:surname>
        <md:fullname>Brent Hendricks</md:fullname>
        <md:email>brentmh@rice.edu</md:email>
      </md:author>
    </md:authorlist>
    <md:license href="http://creativecommons.org/licenses/by/1.0"/>
    <md:licensorlist>
      <md:licensor id="rars">
        <md:firstname>Ricardo</md:firstname>
        <md:othername>Anthony</md:othername>
        <md:surname>Radaelli-Sanchez</md:surname>
        <md:fullname>Ricardo Radaelli-Sanchez</md:fullname>
        <md:email>ricky@alumni.rice.edu</md:email>
      </md:licensor>
    </md:licensorlist>
  </md:parent-module>
  <md:keywordlist>
    <md:keyword>CNXML</md:keyword>
    <md:keyword>Connexions</md:keyword>
    <md:keyword>content</md:keyword>
    <md:keyword>document</md:keyword>
    <md:keyword>markup</md:keyword>
    <md:keyword>namespace</md:keyword>
    <md:keyword>tag</md:keyword>
    <md:keyword>XML</md:keyword>
  </md:keywordlist>
  <md:subjectlist>
    <md:subject>Science and Technology</md:subject>
  </md:subjectlist>
  <md:abstract>This document introduces simple CNXML tags that are easy to use in Edit-in-Place.</md:abstract>
  <md:language>en-us</md:language>
  <!-- WARNING! The 'metadata' section is read only. Do not edit above.
       Changes to the metadata section in the source will not be saved. -->
</metadata>
  
  <content>
    <note id="id12293046" type="Please Note"><label>Please Note</label>This module also contains information derived from <link document="m9007" class="cnxn">The Advanced CNXML</link> by <link url="http://cnx.org/member_profile/rars">Ricardo Radaelli-Sanchez</link>.</note><section id="sec1">
      <title>Starting with CNXML</title>
      <para id="element-410">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!  </para><para id="intro"><link url="http://cnx.org">Connexions</link>
	uses the <term>Connexions Markup Language</term> (<term>CNXML</term>) as its primary
	language for marking up and storing documents.  CNXML is lightweight <link url="http://en.wikipedia.org/wiki/XML">XML</link> for
	marking up educational content. Unlike the well-known HTML, the goal of CNXML is to convey
	the <emphasis>content</emphasis> 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 <link target-id="emphasis" class="cnxn">emphasis</link> <term>tag</term>.</para>
    </section>
    <section id="Inline_tags">
	  <title>Inline Tags</title>
	  <para id="inline_tags_para">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.
	  </para>

	  <section id="emphasis">
	    <title>Emphasis</title>
	    <para id="emphp1">As mentioned <link target-id="intro" class="cnxn">previously</link>, the <code display="inline">emphasis</code> tag is used to
	      accent certain text.  Note that this refers to <emphasis>semantic</emphasis>
	      emphasis and not a typeface.  Different <term>stylesheets</term>
	      can render emphasis with different typefaces.
	    </para>
	    <example id="emphexamp">
	      <code id="id12748518" display="block">
&lt;para id='intro'&gt;
  Gardenias are my absolute &lt;emphasis&gt;favorite&lt;/emphasis&gt; 
  flower. Their petals are soft, and their bloom has an 
  absolutely &lt;emphasis&gt;heavenly&lt;/emphasis&gt; scent.
&lt;/para&gt;     
</code><para id="element-877">The above markup will display as:</para><para id="element-443">Gardenias are my absolute <emphasis>favorite</emphasis> flower.  Their petals are soft, and their bloom has an absolutely <emphasis>heavenly</emphasis> scent.</para>
	    </example>
	  </section>

	  <section id="term">
	    <title>Term</title>
	    <para id="termp1">The <code display="inline">term</code> tag is used to mark
	      words or phrases which are being defined.  However, its
	      use is confined to either a <link document="m14395" target-id="para" class="cnxn">para</link> or <link document="m9006" target-id="definition" class="cnxn">definition</link> tag.  The <code display="inline">term</code> tag has one optional
	      <term>attribute</term>: <code display="inline">URL</code> - a URL
		  specifying the source or definition of the
		  term.</para>
	    <example id="termexamp">
	      <code id="id12748637" display="block">
&lt;para id='gardenia'&gt;
  &lt;term url="http://en.wikipedia.org/wiki/Gardenia"&gt;Gardenias
  &lt;/term&gt; can be tricky to maintain.  The soil around the 
  roots of a &lt;term&gt;gardenia&lt;/term&gt; must remain moist always, 
  but too much water can damage the plant.  Also, 
  &lt;term&gt;gardenias&lt;/term&gt; enjoy the sun, but if the 
  &lt;emphasis&gt;foliage&lt;/emphasis&gt; gets wet to bring the gardenia
  into the shade.
&lt;/para&gt;      </code><para id="element-424">The above markup will display as:</para><para id="element-130"><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 into the shade.</para>
	    </example>
	  </section>
	  
	  <section id="note">
	    <title>Note</title>
	    <para id="notep1">The <code display="inline">note</code> tag creates an "out
	      of line" note to the reader.  The <code>type</code> of note is specified
	      by an optional <code display="inline">type</code> attribute.  If a <code>type</code> is not specified, the default is <code>Note</code>. The <code>type</code> attribute can contain any of the following values:
<list id="list-234234243">
<item>note</item>
<item>aside</item>
<item>warning</item>
<item>tip</item>
<item>important</item>
</list>
	    </para>
	    <example id="notexamp">
	      <code id="id12744351" display="block">
&lt;para id='pollen'&gt;
  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.  &lt;note type="Important"&gt;Do not 
  use water when cleaning up pollen!  This can lead to 
  counter-top and clothing stains!&lt;/note&gt;  Your best bet 
  is to use a dry method of cleaning with a paper-towel.
&lt;/para&gt;      </code>
	      <para id="notep2">
		The above markup will display as: 
	      </para>
	      <para id="notep3">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 id="id12744386" type="Important"><label>Important</label>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, for example.</para>

	    </example>
	  </section>
	  
	  <section id="cnln"><title>Link</title>
	    
	   	    <para id="cnlnp1">
	      The <code display="inline">link</code> tag is the tag in CNXML
	      used for linking to other Connexions modules or collections as well as external links. 
	    </para>
	    
	    <list id="element-223" list-type="labeled-item"><item><label>strength</label>The Strength attribute can contain the value 1, 2, or 3 specifying the relevance of the link. </item>
<item><label>window</label>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.</item>
<item><label>url</label> The URL attribute can contain the web address of the link you wish to reference.</item>
<item><label>document</label>The Document  attribute is used to reference the ids of other Connexions modules or Collections.</item>
<item><label>target-id</label>The Target-id attribute is used to reference the ids of specific elements within Connexions modules.</item>
<item><label>resource</label></item>
<item><label>version</label>The Version attribute is used to reference a specific version of a Connexions module or collection.</item></list><para id="cnxn2">
	      The <code display="inline">target</code> and <code display="inline">document</code> attributes can be used
	      together or alone.  If both are used then you will link
	      to a particular tag in another document.  If only <code display="inline">document</code> is used, you will link to
	      another document.  If only <code display="inline">target</code> is used, you will link to a
	      particular tag within the current document.
	    </para></section>

	  <section id="cite">
	    <title>Cite</title>
	    <para id="citep1">The <code display="inline">cite</code> 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.  
	    </para><example id="element-511"><title>Cite Example</title>
<code id="id12768936" display="block">
Finally, a good resource is the &lt;cite&gt;Garden Lover's 
Cookbook -- William M. Rice; Paperback&lt;/cite&gt;.
</code>
<para id="citelike">
The above markup will display as:
</para>
<para id="finally">Finally, a good resource is the <cite><cite-title>Garden Lover's Cookbook -- William M. Rice; Paperback</cite-title></cite>.
</para></example>
	  </section>

	  <section id="quote">
	    <title>Quote</title>
	    <para id="quote_para">The <code display="inline">quote</code> tag is used to
	      denote that some text directly quotes another
	      source. The quote tag has a <code display="inline">display</code> attribute which denotes
	      whether the quote is <code display="inline">inline</code>
	      or <code display="inline">block</code>.
	    </para>
	    <example id="quote_example"><title>Quote Example</title>
	      <para id="quote_para_example"><code id="id12769042" display="block">
&lt;para id='plantquote'&gt;
  Every plant needs a different amount of water in order to 
  grow well. &lt;quote display="inline"&gt;"If you water each plant the same, you 
  will always water too much and too little."&lt;/quote&gt;  Also, 
  remember the words of Lou Erickson: 
  &lt;quote id="quote_example" display='block'&gt;"Gardening requires lots of water - 
  most of it in the form of perspiration."&lt;/quote&gt;
&lt;/para&gt;</code>
		Every plant needs a different amount of water in order to grow well.  <quote display="inline" id="id12769050">"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="id12769058" display="block">"Gardening requires lots of water - most of it in the form of perspiration."</quote></para>
	    </example>
	  </section>
	  
	  <section id="foreign">
	    <title>Foreign</title>
	    <para id="foreign_para">The <code display="inline">foreign</code> tag is used to
	      denote that a word or phrase foreign to the language of the document is being used.
	    </para>
	    <example id="foreign_example"><title>Foreign Example</title>
	      <para id="foreign_para_example"><code id="id13053700" display="block">
&lt;para id='plantquote2'&gt;
  All flowers have a scientific name, often derived from 
  Latin.  &lt;foreign&gt;Gardenia augusta&lt;/foreign&gt; is the name 
  of a type of gardenia found in Japan.
&lt;/para&gt;</code>
		 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>
	    </example>
	  </section>
<section id="code">
      <title>Code</title>
      <para id="codelp1">The <code>code</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>code</code> tag has a <code>display</code>
	attribute with two possible values:
	<list id="code_list">
	  <item>
	    <code>inline</code> (default) - used to specify code that
	    is inline.</item>
	  <item>
	    <code>block</code> - used to specify code that should be
	    in a separate block of text.</item>
	</list>
      </para>

      <example id="codelexamp"><title>Inline Code Example</title>
	<para id="element-872">For now, take a look at what the inline code looks like:</para><code id="id13053813" display="block">
&lt;para id='copy'&gt;
  In a unix terminal the command to copy a file is 
  &lt;code display='inline'&gt;cp original copy&lt;/code&gt;.
&lt;/para&gt;
	</code>
	<para id="copy">
	  In a unix terminal the command to copy a file is <code display="inline">cp original copy</code>
	</para>
      </example><para id="element-592">You will see more about code blocks in <link document="m14395" target-id="code" class="cnxn">Advanced CNXML using Edit-In-Place</link>.</para>
    </section>

	</section>
  </content>
</document>
