Menu Document

Change DTD

It changes the DTD of the current document. One can choose between all DTDs, that have already been compiled into the system. When a new DTD is selected, it is assigned to the current document. Now the document is validated with respect to this new DTD and its layout is updated according to the DTD's layout. If the document contains default attributes, whose default values are unchanged, i.e. still obey the old DTD, then these attributes are removed.

Change DOCTYPE

It changes the DOCTYPE (root element) of the current document. One can choose between all elements from the current document's DTD. The document is validated after the change.


Validate

An icon on the toolbar

An XML document is valid if it has an associated document type declaration and if the document compiles with the constraints expressed in it.

The DTD consists of

For more information see http://www.w3.org/TR/REC-xml

Validation Error Messages

These are various messages, which appear after applying the validation procedure to a document. All of them mean that the document is not valid and at the same time each of them gives a prompt about the error source.

Apply All Children

This option applies all active Value constraints of type All Children on the current document in the system editor. For more details about the definition and usage of the Value Constraints see the following link.

Having selected this option, the user is shown information about the number of nodes in the current document which do not satisfy the constraints. The user is given the possibility to navigate through all invalid nodes one by one, by using the Next/Previous buttons on the toolbar in the same way as if an XPath search is performed.

Because of the arbitrary complexity of the constraints the information about the invalid nodes is not updated dynamically, which means that some of the nodes might have changed their validity status. Therefore, the Apply operation must be performed manually in order the node information to be updated.


New View

It opens a new view for the current document. This new view is presented in a new window with the text layout. The new view is synchronized with the other views of the same document. For example, when a node is selected in one view, it is automatically selected in the others. All changes made in one of the views are immediately updated in the others. The only thing which remains independent for each view is the layout. When a view is opened, it takes its initial text layout from the DTD and color Scheme - if there is a selected one. This layout can be modified later. For more details about editing view's layout see Edit Current Text Layout.

Edit Current Text Layout

An icon on the toolbar

Edit current text layout item allows for editing of the layout for each element in a DTD. For each tag (opening or closing) additional new lines can be attached before and after the tag. In this way the text view gets improved. The tag and its children can be visible or invisible. It means that the user can hide the information he/she is not interested in. The layout is set only for the current view of the document. After closing the view, all the information about the layout is lost. If the user wants to save the layout, this can be done in two ways :

For more information about the layout table, see Edit Text Layout in menu DTD.

Save Current Layout for DTD

Sets the text layout of the current document view as a Text Layout for the current document's DTD.

Reload DTD Text Layout

Restores the text layout of the current document view according to the Text Layout for the corresponding DTD.


Add Default Attributes

This item adds default attributes(if defined) to every element in the current document. The default attributes of each element in the document, which were defined in the DTD, are stored in a list. If the element has an attribute, which is not a member of this list, then this attribute is added to the list together with its default value. After applying this operation, the system shows how many new attributes have been added to the current document.

Remove Default Attributes

This item removes all default attributes, which possess unchanged default values in the current document. The procedure is as follows: First, all default attributes, which have been defined for the element, are taken from the DTD. Then, it is checked for the element in the document whether it has each of the attributes or not. If the answer is positive, then the attribute's value is compared with the default value for this attribute in the DTD. And if they are the same, the attribute is removed from the element in the document.
After applying this operation, the system shows how many attributes have been removed from the current document.


Switch to Document

This option becomes relevant when more than one documents are opened in the system. There appears a window with the list of all the documents, that are currently opened.

By selecting an item from this list, the user can change the active document in the system. If the opened document in the system is exactly one, this operation is not applicable.