Every
Connexions 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.
The procedure for editing a CNXML file with Authentic consists of the following tasks:
- Visit the Altova Web site and follow their instructions to install the Authentic XML editor on your computer.
- Obtain a copy of the CNXML stylefile and associate it with the Authentic editor on your computer.
- 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.
- Export the CNXML file from the module as an "XMLSpy/Authentic" file.
- Launch Authentic, open the CNXML file, and make your edits.
- Import the CNXML file back into the Connexions module as an "XMLSpy/Authentic" file.
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
documentation on the Altova Web site.
The Authentic XML Editor
Editing a CNXML file can be a complicated task if you are not familiar with XML and the
CNXML markup language. 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
editing tools 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.
To view the Altova Web site, click the following link:
Display the Authentic product Web page and follow the instructions for downloading the Authentic XML editor (Desktop edition).
Note:
Authentic has a Desktop edition and a Browser edition you can download. It is very important that you download the Desktop edition. You cannot perform the editing tasks mentioned in this document if you do not have the Desktop edition.
The Connexions Stylesheet (cnxml.sps)
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.
Downloading the Stylesheet
To obtain a copy of the
cnxml.sps stylesheet, right-click the following link:
Select the option to save the file to your desktop or any location where you can easily find it.
Associating the Stylesheet to Authentic
To associate the cnxml.sps stylesheet with Authentic, use the following steps:
- Launch the Authentic editor.
- Select
File -> New... from the menu bar. The "Create new document" dialog box appears.
- Click the
Browse... button. The "Open" dialog box appears.
- Select the cnxml.sps file from the list of items on your desktop.
- Click
Open 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.
Note:
Disregard the new file that was created when you associated the stylefile to Authentic. That file does not contain any Connexions
metadata, 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.
Editing CNXML Files with Authentic
Different 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
Figure 3. An example of the same CNXML file displayed in Browser view is in
Figure 4.
Adding Content
Adding New Content
To add new content, use the following steps:
- Display the CNXML file in the Authentic view.
- 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.
- Select the type of element you want to add, either from the Elements box or right-click to display the pop-up menu of elements you can add.
- Enter the content for the element within the opening and closing tags for the element.
Editing Existing Content
To edit existing content, use the following steps:
- Display the CNXML file in the Authentic view.
- 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.
Applying Inline Tags
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:
- Select the text to be marked.
- Specify the desired element type. Either click the element name in the Elements box, or right-click and select
Apply->*element* where *element* is the name of the desired tag.
Working with Element Markup Tags
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:
Adding a Glossary
To add a glossary entry, use the following steps:
- Click the
add glossary link at the bottom of the document. A glossary entry box displays. - Insert an ID for the definition entry.
- Insert the term you want in the glossary.
- Insert the text of the meaning for the term.
- Optional. Click the
add seealso link to add a reference to related material. - Optional. Click the
add example link to add an example.
Adding a Bibliography
To add a bibliography entry, use the following steps:
- Click the
add bib:file link at the bottom of the document. A bibliography entry box displays. - Insert an ID for the bibliography.
- Click the
add... link. A pop-up list of the valid types of bibliography entries appears. - Select the desired type of entry from the list. Entry fields appropriate for that type of entry appear.
- Enter the necessary information.
Validating and Previewing Your Work
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
F8 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.
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
(Reference)). This is what your finished document will look like. Note that IDs, labels, and paragraph boxes do not appear in the finished text.
Helpful Hints
- Save your work often!
- 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.
- Preview often to make certain you are getting the output you want to have.
- Do not forget to add IDs where they are required.
- Do not be afraid to make a mistake. If you do something and you change your mind, press
CTRL+Z to undo the last editing action you did. You can repeat this action to undo several changes.