
enter the URI of remote templates in the input area below the list. Use the buttons on the right side of the
list to remove a template or to change the order of templates in the list.
Registering templates in this list is not mandatory. When you create a new document instance, you can
also choose a template that is not in that list.
9.5. Creating an instance document
To create a new document instance from a template, use entry New/New document in the File menu. It
displays a dialogue where you can select:
• The template, either by selecting in the list of registered templates or by typing the URI or file
name of a template that is not in the list.
• The URI or file name of the document instance you want to create.
• Where to open the new document (Replace current, In new tab, In new window).
• The Title of the new document that will be displayed by browsers (a default title is generated
when the user doesn't specify it).
9.6. Editing an instance document
Editing is allowed only inside the repeat, use, and bag elements, i.e. within the colored dashed boxes.
The rest of the document is the fixed part of the template and can not be modified.
9.6.1. Editing in a repeat element
In a repeat box, you can create new instances of the repeated structure or you can delete one. This is
controlled by the template, which may impose a minimum and/or a maximum number of occurrences of
the repeated structure.
When creating new occurrences of the repeated structure is allowed, + icons are displayed at locations
where you are allowed to create new occurrences. When you click on these icons, you get a pop-up menu
that tells you what can be inserted at that position. By clicking in that pop-up menu, you create a new
occurrence of the corresponding type. In some cases the template offers only one type of occurrence. The
pop-up menu then contains a single entry, to clearly state what will be created. If you click outside the
menu, nothing is created.
Another way to create new occurrences of the repeated structure is to select an existing occurrence, or to
put the caret at the end of an occurrence, and to press the Enter key. A new occurrence of the repeated
structure is then created, provided the maximum number of occurrences is not reached yet. The type of
the new occurrence is then the same as the one that was selected when pressing the Enter key.
When an existing occurrence is empty or fully selected and the Backspace or Delete key is pressed, the
element is deleted, provided the minimum number of occurrences is not reached yet.
9.6.2. Editing in a use element
Most use elements (blue) allow you just to enter free text or to freely replace/edit existing text. Other
use elements offer a choice between different types of elements that can be inserted at that position. In
that case, a blue triangle icon is displayed in the top left corner of the box. By clicking this icon, you can
select one of the allowed types through a pop-up menu. When you have chosen a type, the corresponding
structure is generated and you can freely edit its content.
9.6.3. Editing in a bag element
In a bag box (green), you can insert any number of elements of the types specified by the template.
When you want to insert a XHTML element, do it the usual way provided this type is allowed by the
template. It may happen that some elements are not allowed by the template. The allowed elements are
9. Editing with templates
27
Komentáře k této Příručce