<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/technology/cnxml/schema/dtd/0.5/cnxml_plain.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m11160">
	<name>Editing CNXML with Altova's Authentic</name>
	<metadata>
  <md:version>2.16</md:version>
  <md:created>2003/05/13</md:created>
  <md:revised>2006/03/29 16:38:18.516 US/Central</md:revised>
  <md:authorlist>
      <md:author id="jago">
      <md:firstname>Adan</md:firstname>
      
      <md:surname>Galvan</md:surname>
      <md:email>jago@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:email>brentmh@rice.edu</md:email>
    </md:author>
      <md:author id="mhusband">
      <md:firstname>Mark</md:firstname>
      <md:othername>S.</md:othername>
      <md:surname>Husband</md:surname>
      <md:email>mhusband@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="brentmh">
      <md:firstname>Brent</md:firstname>
      <md:othername>Michael</md:othername>
      <md:surname>Hendricks</md:surname>
      <md:email>brentmh@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="mhusband">
      <md:firstname>Mark</md:firstname>
      <md:othername>S.</md:othername>
      <md:surname>Husband</md:surname>
      <md:email>mhusband@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Altova</md:keyword>
    <md:keyword>Authentic</md:keyword>
    <md:keyword>CNXML</md:keyword>
    <md:keyword>cnxml.sps</md:keyword>
    <md:keyword>edit</md:keyword>
    <md:keyword>editing</md:keyword>
    <md:keyword>XMLSpy</md:keyword>
  </md:keywordlist>

  <md:abstract>The Authentic XML editor from Altova allows you to quickly and easily edit CNXML files.</md:abstract>
</metadata>
	<content>

<para id="element-316">Every <link src="http://cnx.org">Connexions</link> module contains a CNXML file. It is generated by Connexions when you first create a module. This file is named index.cnxml and you can see it under the "Files" tab when you are editing a module. The file contains both metadata and content. The metadata is information about the file, for example, the document type, the author's name, creation date, revision date, and so on. The Connexions system inserts the metadata into the file based on the information you enter when you create or update a module. The content part of the file is the headings, text, links to images, and so on that you put into the file. If you want to change the metadata, you must make your changes on the "Metadata" tab when you are editing a module in Connexions. </para>
<para id="element-742">
The procedure for editing a CNXML file with Authentic consists of the following tasks:
<list id="overviewlist"><item>Visit the Altova Web site and follow their instructions to install the <link src="http://www.altova.com/products_doc.html">Authentic</link> XML editor on your computer.</item>
<item>Obtain a copy of the CNXML stylefile and associate it with the Authentic editor on your computer.</item>
<item>For new content, create a module in a Connexions workspace or workgroup. For existing, published content, check out the module to a Connexions workspace or workgroup.</item>
<item>Export the CNXML file from the module as an "XMLSpy/Authentic" file.</item>
<item>Launch Authentic, open the CNXML file, and make your edits.</item>
<item>Import the CNXML file back into the Connexions module as an "XMLSpy/Authentic" file.</item>
</list>
</para>
<note>This module provides a basic description of using the Authentic XML editor to edit Connexions CNXML files. For a more comprehensive description of all the features of Authentic, see the <link src="http://www.altova.com/manual2005/AuthenticDesktop/">documentation</link> on the Altova Web site.</note><section id="authenticpara">
	<name>The Authentic XML Editor</name>
<para id="element-179">Editing a CNXML file can be a complicated task if you are not familiar with XML and the <link src="http://cnx.org/technology/cnxml/0.5/spec/">CNXML markup language</link>. CNXML contains many markup tags and some of the tags have different rules for applying them to your content. However, it is the CNXML markup tags that help to make Connexions a feature-rich resource for sharing knowledge. Among the many <link src="http://cnx.org/technology/EditingTools">editing tools</link> that are available to you, the author, is a third-party XML editor named Authentic®. Authentic is available free, on the Internet, from Altova®. Using Authentic, you can quickly and easily edit your CNXML files without being an expert in CNXML. Authentic is a "light" version of XMLSpy, which is a powerful, commercially-available XML editor from Altova.
</para><para id="element-446">To view the Altova Web site, click the following link:
	  <list type="bulleted" id="altovalink"><item><link src="http://www.altova.com">Altova</link></item>
	</list>
        Display the Authentic product Web page and follow the instructions for downloading the Authentic XML editor (Desktop edition).
 </para><note>Authentic has a Desktop edition and a Browser edition you can download. It is very important that you download the <emphasis>Desktop edition</emphasis>. You cannot perform the editing tasks mentioned in this document if you do not have the Desktop edition.  </note>
</section>
<section id="s_create">
	<name>The Connexions Stylesheet (cnxml.sps)</name>
	<para id="assosps">Before you can edit a CNXML file with Authentic, you must first associate the stylesheet (cnxml.sps), which was specifically created for editing CNXML files with Authentic. This stylesheet enables Authentic to recognize CNXML tags and to insert them for you while you are editing. It also enables Authentic to validate, or check, that the CNXML markup tags are being applied correctly.</para>

<section id="before">
	<name>Downloading the Stylesheet</name>
	<para id="nece">To obtain a copy of the <term>cnxml.sps</term> stylesheet, right-click the following link:
	  <list type="bulleted" id="spslink">
	<item><link src="http://cnx.org/technology/cnxml/misc/cnxml.sps">CNXML Style File</link></item>
	</list>
        Select the option to save the file to your desktop or any location where you can easily find it.
         </para>
</section>

<section id="creatingnew">
	<name>Associating the Stylesheet to Authentic</name>
	<para id="p3">To associate the cnxml.sps stylesheet with Authentic, use the following steps:
	<list id="l_creating" type="enumerated">
<item>Launch the Authentic editor.</item>
	<item>Select <code type="inline">File -&gt; New...</code> from the menu bar. The "Create new document" dialog box appears.
        <figure id="fig1">
	<media type="image/png" src="altovasps.png"/>
	<caption>The "Create new document" dialog box.</caption>
	</figure>
	</item>
	<item>Click the <code>Browse...</code> button. The "Open" dialog box appears. 
        <figure id="fig2"><media type="image/png" src="altovaopen.png"/>
	<caption>The "Open" dialog box.</caption>
	</figure>
	</item>
	<item>Select the cnxml.sps file from the list of items on your desktop.    
        </item>
        <item>Click <code>Open</code> and Authentic accesses the cnxml.sps file and opens a new CNXML file. Now the stylesheet is associated with Authentic. Close the new file and do not save it.</item>
        </list>
	</para>
        <note>Disregard the new file that was created when you associated the stylefile to Authentic. That file does not contain any Connexions <cnxn document="m10887" target="editmetadata">metadata</cnxn>, which is required for the Connexions system. When you create a new module on Connexions, the system creates a CNXML file (index.cnxml) with the necessary metadata. The CNXML file exported from the module is the file you edit with Authentic. </note>
	</section>
	</section>

	<section id="s_editing">
	<name>Editing CNXML Files with Authentic</name>
	<section id="sviews">
	<name>Different Views</name>
	<para id="p_views">Authentic provides two ways of looking at your CNXML file: the Authentic view and the Browser view. The Authentic view displays
your file in an editing interface where you can add, change, or remove content. The Browser view displays your file as it would appear in an Internet browser. To change views, click one of the buttons on the bottom of the editing panel. 
An example of a CNXML file displayed in Authentic view is in <cnxn target="element-324"/>. An example of the same CNXML file displayed in Browser view is in <cnxn target="element-791"/>.     </para>
      <figure id="element-324"><media type="image/png" src="authenticview.png"/>
	<caption>The Authentic view of a CNXML file.</caption></figure>

      <figure id="element-791"><media type="image/png" src="browserview.png"/>
	<caption>The Browser view of a CNXML file.</caption></figure>
	
	</section>

			<section id="viewingtags">
				<name>Displaying Tags</name>
				<para id="paratags">Displaying the markup tags while you edit shows the actual element boundaries in the flow of text. This enables you to correctly place your cursor and insert content where you want to place it. You can use one of the four <cnxn target="tag_buttons">tag buttons</cnxn> in the Authentic toolbar to show or hide the tags. Examples of the buttons are shown in the following figure and a brief description of each button appears after the figure.

<figure id="tag_buttons" orient="horizontal"><subfigure id="hidebutton">
<name>Hide Markup</name>
<media type="image/src" src="hidemarkup.png"/>
<caption> </caption>
</subfigure>
<subfigure id="smallbutton">
<name>Small Markup</name>
<media type="image/src" src="smallmarkup.png"/>
</subfigure>
<subfigure id="largebutton">
<name>Large markup</name>
<media type="image/src" src="largemarkup.png"/>
</subfigure>
<subfigure id="mixedbutton">
<name>Mixed markup</name>
<media type="image/src" src="mixedmarkup.png"/>
</subfigure>
<caption>The four Markup buttons in the toolbar.</caption></figure>

A description of the action performed by each button appears in the following list:
<list id="markuplist1" type="bulleted"><item>Hide Markup - click this button to hide all the tags.</item>
<item>Small Markup - click this button to display small tags, which are triangle-shaped graphics without labels.</item>
<item>Large Markup - click this button to display large tags that have labels identifying them.</item>
<item>Mixed Markup - click this button to display a combination of the small and large tags. The small tags appear with inline elements, such as <code>&lt;emphasis&gt;</code> or <code>&lt;term&gt;</code>. The labeled tags appear with the block elements, such as <code>&lt;section&gt;</code> or <code>&lt;para&gt;</code>.</item>
</list>
</para><para id="element-566">Experiment with these different markup buttons to determine which level of tag display you prefer. You may find it helpful to switch between levels of tag display while you edit. See <cnxn target="element-667"/> for an example of a CNXML file with the large markup tags displaying.</para><figure id="element-667"><media type="image/src" src="module-authentic.png"/>
	<caption>A CNXML file displaying in Authentic mode with large markup tags.</caption>
	</figure><para id="element-234">The Authentic view is the view in which you edit the CNXML file. Please note the following things about this view: 
<list id="list2a"><item>Some CNXML tags require an <term>ID</term>. For these, Authentic shows <code>(id: )</code> after the tag name. You must enter a unique identifier for each such tag in your document. The ID is displayed in red in this view to indicate that this is required, but tag name and the ID do <emphasis>not</emphasis> display in the final output.</item>
<item>There are links within some tags that when clicked prompt you to choose a child tag to insert in the tag. These links only appear when there are child tags or other attributes that can be included within the given tag. For example, an <code>add type</code> link appears when you insert a list. Click the link and a drop-down menu appears that contains the options for the type of list you may enter at this point.</item>
<item>Authentic makes a distinction between inserting and appending  elements. <term>Insert</term> means to add an element <emphasis>before</emphasis> the current element. <term>Append</term> means to add an element <emphasis>after</emphasis> the current element.</item>
</list></para>
			</section>

			<section id="sectioninserting">
				<name>Adding Content</name>
				<para id="parainsert"><name>Adding New Content</name>
To add new content, use the following steps:
<list id="addcontlist1" type="enumerated"><item>Display the CNXML file in the Authentic view.</item>
<item>Place the cursor in the file at the point where you want to add the new content and click. Be careful to place the cursor correctly relative to the opening and closing tags for existing elements.</item>
<item>Select the type of element you want to add, either from the <cnxn target="element-976">Elements box</cnxn> or right-click to display the pop-up menu of elements you can add.</item>
<item>Enter the content for the element within the opening and closing tags for the element.</item>
</list>
		</para>
				<para id="element-326"><name>Editing Existing Content</name>
To edit existing content, use the following steps:
<list id="editcontlist1" type="enumerated"><item>Display the CNXML file in the Authentic view.</item>
<item>Insert or delete content as necessary. When deleting an entire element, be certain to select opening and closing tags for that element along with the content. </item>
</list></para><para id="p_textmarkup"><name>Applying Inline Tags</name>
Once you have written some text, you may want to mark up a word or phrase with an inline CNXML tag. Inline tags are used on content within an element marked up by block tags to identify content with special characteristics. To do this:
	  <list id="inlinelist" type="enumerated"><item>Select the text to be marked.</item>
<item>Specify the desired element type. Either click the element name in the <cnxn target="element-976">Elements box</cnxn>, or right-click and select <code>Apply-&gt;*element*</code> where *element* is the name of the desired tag.</item>
					</list>
				</para>
</section>
<figure id="element-976"><media type="image/src" src="elements.png"/>
<caption>The Elements box.</caption>
</figure><para id="element-505"><name>Working with Element Markup Tags</name>
CNXML contains many markup tags and some of the tags have different rules for applying them to your content. The following list highlights some general rules about applying CNXML tags: 
<list id="tagrulelist1"><item>When you add a <code>section</code> you are required to give it a name, an ID, and at least one child element. You can click the <code>add...</code> link below the section name to display a list of the elements that are valid children inside of the section.<note>Always remember to add an ID when it appears next to a tag. The document cannot validate without an ID in each required location.</note></item>
<item>When you add a <code>para</code> a box appears in which you enter the text for your paragraph. Give the paragraph an ID and then type the text in the box.  The box is merely an editing aid. It does not display in the final document.</item>
<item>When you add an <code>example</code> a box appears that is designated as an 'Example'. You can add a name if you wish. The ID (as always) is mandatory. Click the <code>add...</code> link below the example name to add a child element to the example.</item>
<item>When you add an <code>exercise</code> the word 'Exercise' followed by problem and solution. You must add an ID to the exercise.  Next, you must add some content to the problem. To see a list of valid child elements for problem click the <code>add...</code> link next to the word 'Problem'.  You may add a Solution, but this is optional.</item>
<item>When you add a <code>list</code> the first thing to do is add an ID. Next, add a type by clicking the <code>add type</code> link beside the list ID. Move the cursor down next to the bullet to add content to the item. To add another item press <code>Enter</code>.  <note type="Known Bug">In Authentic the list type does not change automatically when you select a type.  To work around this, select a type then save and re-open the document, or select a type then switch to the <cnxn target="sviews">Browser view</cnxn> and back again. </note></item>
</list></para><para id="element-327">For a complete list of all the CNXML tags and a description of how to use them, see the <link src="http://cnx.org/technology/cnxml/0.5/spec/">CNXML Language Specification</link>.</para><section id="glosssect1">
<name>Adding a Glossary</name>
<para id="glossary1"> 
To add a glossary entry, use the following steps:
<list id="glosslist1" type="enumerated"><item>Click the <code>add glossary</code> link at the bottom of the document. A <cnxn target="glossaryex1">glossary entry box</cnxn> displays.</item>
<item>Insert an ID for the definition entry.</item>
<item>Insert the term you want in the glossary.</item>
<item>Insert the text of the meaning for the term. </item>
<item>Optional. Click the <code>add seealso</code> link to add a reference to related material.</item>
<item>Optional. Click the <code>add example</code> link to add an example.</item>
</list>
      
<figure id="glossaryex1"><media type="image/png" src="glossary.png"/>
<caption>Adding a glossary entry box</caption>
</figure>
</para>
</section>
<section id="sectbiblio1">
<name>Adding a Bibliography</name>
<para id="bibtexml">
To add a bibliography entry, use the following steps:
<list id="biblist1" type="enumerated"><item>Click the <code>add bib:file</code> link at the bottom of the document.  A <cnxn target="biblioex1">bibliography entry box</cnxn> displays. </item>
<item>Insert an ID for the bibliography.</item>
<item>Click the <code>add...</code> link.  A pop-up list of the valid types of bibliography entries appears. </item>
<item>Select the desired type of entry from the list. Entry fields appropriate for that type of entry appear.</item>
<item>Enter the necessary information.</item>
</list>
  
<figure id="biblioex1"><media type="image/png" src="bibliography.png"/>
<caption>Adding a bibliography entry box.</caption>
</figure>
</para>
</section>

</section>

<section id="previewsection">
<name>Validating and Previewing Your Work</name>
<para id="previewpara">Now that you have created your document,
      you will want to see what you have created. First ensure that
      the document is valid. To do so, simply press the
      <code>F8</code> function key on your keyboard. If there are
      errors in your page they will be displayed at the bottom of the
      page. You will have to fix these errors before you will be able
      to preview your document. The cursor will automatically move to the position in the document where the error exists.</para>
			<para id="Previewingpara">To preview the document simply switch to browser view by clicking on the browser view button. (This button is on the toolbar and looks like a piece of paper with a planet on it. See the far right button in <cnxn target="fig_viewselection"/>).  This is what your finished document will look like. Note that IDs, labels, and paragraph boxes do not appear in the finished text. </para>
		</section>
		<section id="helpfulhints">
			<name>Helpful Hints</name>
			<list id="listhelpful"><item>Save your work often!</item>
<item>If you have trouble clicking in the space to add an ID, try moving the cursor slightly to the left or right. Sometimes Authentic is picky about where it allows you to click.</item>
<item>Preview often to make certain you are getting the output you want to have.</item>
<item>Do not forget to add IDs where they are required.</item>
<item>Do not be afraid to make a mistake. If you do something and you change your mind, press <code>CTRL+Z</code> to undo the last editing action you did. You can repeat this action to undo several changes.</item>
</list>
		</section>
	</content>
</document>
