Summary: The Authentic XML editor from Altova allows you to quickly and easily edit CNXML files.
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:
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).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.
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.To associate the cnxml.sps stylesheet with Authentic, use the following steps:
File -> New... from the menu bar. The "Create new document" dialog box appears.
![]() |
Browse... button. The "Open" dialog box appears.
![]() |
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.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.
![]() |
![]() |
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 tag buttons 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.
|
<emphasis> or <term>. The labeled tags appear with the block elements, such as <section> or <para>.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 Figure 6 for an example of a CNXML file with the large markup tags displaying.
![]() |
The Authentic view is the view in which you edit the CNXML file. Please note the following things about this view:
(id: ) 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 not display in the final output. add type 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. To add new content, use the following steps:
To edit existing content, use the following steps:
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:
Apply->*element* where *element* is the name of the desired tag.![]() |
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:
section you are required to give it a name, an ID, and at least one child element. You can click the add... link below the section name to display a list of the elements that are valid children inside of the section.para 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. example 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 add... link below the example name to add a child element to the example. exercise 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 add... link next to the word 'Problem'. You may add a Solution, but this is optional. list the first thing to do is add an ID. Next, add a type by clicking the add type link beside the list ID. Move the cursor down next to the bullet to add content to the item. To add another item press Enter. For a complete list of all the CNXML tags and a description of how to use them, see the CNXML Language Specification.
To add a glossary entry, use the following steps:
add glossary link at the bottom of the document. A glossary entry box displays. add seealso link to add a reference to related material. add example link to add an example.![]() |
To add a bibliography entry, use the following steps:
add bib:file link at the bottom of the document. A bibliography entry box displays. add... link. A pop-up list of the valid types of bibliography entries appears. ![]() |
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.
CTRL+Z to undo the last editing action you did. You can repeat this action to undo several changes.
"The canonical how-to guide to using Connexions."