The Content Author role

A content author edits the content of XML documents in tagless mode disregarding the XML tags as they are not visible in the editor. If he edits documents conforming to one of the predefined types he does not need to configure anything as the predefined document types are already configured when the application is installed. Otherwise he must plug the configuration of the document type into the application. This is as easy as unzipping an archive directly in the frameworks subfolder of the application's install folder.

In case the edited XML document does not belong to one of the document types set up in Preferences you can specify the CSS files to be used by inserting an xml-stylesheet processing instructions. You can insert the processing instruction by editing the document or by using the Associate XSLT/CSS stylesheet action.

The syntax of such a processing instruction is:

<?xml-stylesheet type="text/css" media="media type" title="title" 
href="URL" alternate="yes|no"?>

You can read more about associating a CSS to a document, the syntax and the use of the xml-stylesheet processing instruction in the section Author CSS Settings.

When the document has no CSS association or the referred stylesheet files cannot be loaded a default one will be used. A warning message will also be displayed at the beginning of the document presenting the reason why the CSS cannot be loaded.

Note

In general it is recommended to associate a CSS while in Text mode so that the whitespace normalization rules specified in the stylesheets will be properly applied when switching to Author mode.

Figure 5.2. Document with no CSS association default rendering

Document with no CSS association default rendering

Author views

The content author is supported by special views which are automatically synchronized with the current editing context of the editor panel and which present additional information about this context thus helping the author to see quickly the current location in the overall document structure and the available editing options.

Outline view

The Outline view has the following available functions:

Figure 5.3. The Outline View

The Outline View

XML Document Overview

The Outline view displays a general tag overview of the current edited XML Document. It also shows the correct hierarchical dependencies between the tag elements, making it easier for the user to be aware of the document's structure and the way tags are nested. It also allows the user to insert or delete nodes using pop-up menu actions.

Modification Follow-up

When editing, the Outline view dynamically follows the modifications introduced by the user, showing in the middle of the panel the node which is currently being modified. This gives the user a better insight on location inside the document and how the structure of the document is affected by one's modifications.

Document Structure Change

Entire XML elements can be moved or copied in the edited document using only the mouse in the Outline view in drag-and-drop operations. If you drag an XML element in the Outline view and drop it on another one in the same panel then the dragged element will be moved after the drop target element. If you hold the mouse pointer over the drop target for a short time before the drop then the drop target element will be expanded first and the dragged element will be moved inside the drop target element after its opening tag. You can also drop an element before or after another element if you hold the mouse pointer towards the upper or lower part of the targeted element. A marker will indicate whether the drop will be performed before or after the target element. If you hold down the CTRL key after dragging, there will be performed a copy operation instead of a move one.

The drag and drop action in the Outline view can be disabled and enabled from the Preferences dialog.

Tip

You can select and drag multiple nodes in the Author Outliner tree.

The popup menu of the Outline tree

Figure 5.4. Popup menu of the Outline tree

Popup menu of the Outline tree

Edit attributes for the selected node. A dialog is presented allowing the user to see and edit the attributes of the selected node. See here for more details about editing attributes.

The Append child, Insert before and Insert after submenus of the outline tree popup menu allow to quickly insert new tags in the document at the place of the element correctly selected in the Outline tree. The Append child submenu lists the names of all the elements which are allowed by the schema associated with the current document as child of the current element. The effect is the same as typing the '<' character and selecting an element name from the popup menu offered by the content completion assistant. The Insert before and Insert after submenus of the Outline tree popup menu list the elements which are allowed by the schema associated with the current document as siblings of the current element inserted immediately before respectively after the current element.

The Cut, Copy and Delete items of the popup menu execute the same actions as the Edit menu items with the same name on the elements currently selected in the outline tree (Cut, Copy, Paste). You can insert a well-formed element before, after or as a child of the currently selected element by accessing the Paste before, Paste after or Paste as Child actions.

The Toggle Comment item of the outline tree popup menu encloses the currently selected element of the outline tree in an XML comment, if the element is not commented, or removes the comment if it is commented.

Using the Rename Element action the element from the caret position and the elements that have the same name as the current element can be renamed according with the options from the Rename dialog.

The Expand All/Collapse All actions expand/collapse the selection and all its children.

Tip

You can Copy/Cut or Delete multiple nodes in the Outliner by using the contextual menu after selecting all the nodes in the tree.

Elements view

Figure 5.5. The Elements View

The Elements View

Presents a list of all defined elements that you can insert in your document. The upper part of the view features a combo box that contains the current element's ordered ancestors. Selecting a new element in this combo box will update the list of the allowed elements in Before and After tabs.

Three tabs present information relative to the caret location:

  • Caret shows a list of all the elements allowed at the current caret location. Double-clicking any of the listed elements will insert that element at the caret position.

  • Before shows a list of all elements that can be inserted before the element selected in the combo box. Double-clicking any of the listed elements will insert that element before the element at the caret position.

  • After shows a list of all elements that can be inserted after the element selected in the combo box. Double-clicking any of the listed elements will insert that element after the element at the caret position.

Double clicking an element name in the list surrounds the current selection in the editor panel with the start tags and end tags of the element. If there is no selection just an empty element is inserted in the editor panel at the cursor position.

Attributes view

The Attributes panel presents all the possible attributes of the current element allowed by the schema of the document and allows to insert attributes in the current element or change the value of the attributes already used in the element. The attributes already present in the document are painted with a bold font. Default values are painted with an italic font. Clicking on the Value column of a table row will start editing the value of the attribute from the selected row. If the possible values of the attribute are specified as list in the schema associated with the edited document the Value column works as a combo box where you can select one of the possible values to be inserted in the document. The attributes table is sortable by clicking on the column names. Thus the table's contents can be sorted in ascending order, in descending order or in a custom order, where the used attributes are placed at the beginning of the table as they appear in the element followed by the rest of the allowed elements as they are declared in the associated schema.

Figure 5.6. The Attributes View

The Attributes View

A combo box located in the upper part of the view allows you to edit the attributes of the ancestors of the current element.

The contextual menu of the view allows you to insert a new element (Add action) or delete an existing one (Delete action). Delete action can be invoked on a selected table entry by pressing DEL or BACKSPACE.

The attributes of an element can be edited also in place in the editor panel by pressing the shortcut Alt + Enter which pops up a small window with the same content of the Attributes view. In the initial form of the popup only the two text fields Name and Value are displayed, the list of all the possible attributes is collapsed.

Figure 5.7. Edit attributes in place

Edit attributes in place

The small arrow button next to the Cancel button expands the list of possible attributes allowed by the schema of the document as in the Attributes panel.

Figure 5.8. Edit attributes in place - full version

Edit attributes in place - full version

The Name field auto-completes the name of the attribute: the complete name of the attribute is suggested based on the prefix already typed in the field as the user types in the field.

Entities view

This view displays a list with all entities declared in the current document as well as built-in ones. Double clicking one of the entities will insert it at the current cursor position.

Figure 5.9. The Entities View

The Entities View