Markup Language Definition File Editor

To access the definition file editor (called the TDF editor for short - from TagDefinition) use the TDF Definition File Editor command (the command icon is shown above), which is located in the View / General program Settings menu. You can also run it using the button located in the program Settings window under Facilitation, Dynamic Attributes, Other or in the menu. The button is shown above.

With the TDF editor, you can modify or expand the list of markup languages supported by Spider from within the dynamic help tools (hints for markup, markup and its attributes, etc.), and even (or perhaps especially) create entirely new definitions for languages not previously supported by the program. This makes Spider an incredibly flexible tool, significantly facilitating the creation of documents in virtually any markup language (even in a language unknown to the program's creators) while keeping the hints and auto-completion mechanisms working.

However, creating a definition file for a markup language from scratch is a very tedious and time-consuming activity. That is why Spider is equipped with a unique mechanism for importing a language's data from its DTD. Simply import the DTD file using the commands described below, and a TDF file is automatically created.

The TDF editor window consists of two main areas, i.e. a list of supported markup languages (with buttons for handling it) and a tabbed area where the markup settings of the selected language are defined.

Tag categories

Here, you can manage the list of markup languages that Spider supports, add and delete them, as well as select the current language.

Categories
Select a category (markup language) from the list to be able to modify the definition of its tags. Use the buttons next to it to add, delete or rename a category.

Properties
Click this button to open the Properties window of the markup category, where settings such as the path to the documentation or the language description can be edited,

Import
There are two commands under this button:

  • Import DTD file - under this button is a powerful tool that allows you to automatically import the tags of any language from its DTD. Its operation is reduced to the indication of the DTD file to be imported.
  • Import TDF file - this command allows you to import a previously created custom TDF file (e.g. from an archive or Spider versions earlier than 6)

Attention
If you created your own TDF files in Spider version earlier than 6, you must import them using the Import TDF file command mentioned above!

Tags

Tags in the selected category
Select a tag to be able to modify its definition. Using the buttons below, you can manage the tag list, i.e., add new tags, delete or rename tags, as well as set one of the tags as the document's parent tag. The document's parent tag is important when recognising the language in which the document is created (read more about this in the description of the Recognise tag category based on document parent tag switch in the help to the Tag Category Properties window).

The group of tabs on the right-hand side of the window allows you to specify parameters for the tag selected in the list. Once you have selected a tag, you can specify its parameters in the tabs:

Basic tag data

This tab allows you to specify general settings for the markup not related to its attributes and event handlers for scripting languages. You have access to the following fields here:

Tag name
You can change the name using the button next to the name field.

Without content
Specifies whether the tag can contain any content. Examples of tags in XHTML without content are ,
, which do not have a corresponding closing tag.

Closure not required
Specifies whether tag closure is required. This option does not apply to XML language tags.

Tag description
The description is displayed, for example, in the tag hints.

Tag status
Specifies the status of the markup, e.g. whether it is specific to a certain browser or perhaps already abandoned (deprecated).

Autocomplete
This is the definition of an autocomplete rule. The | character indicates the position where the cursor is to be positioned when the tag is completed.

Documentation file
The name of the documentation file for the current tag. In addition to the name of this file, it is important to correctly specify the name of the documentation directory for the current category in the Tag Category Properties window. This documentation will be displayed on the lower help panel after using the Display Help command for the current markup (e.g. in the editor's pop-up menu, the standard shortcut is Ctrl+F1).

Tags including:
Specifies the list of tags that can be placed inside the tag being modified. For example, only the LI tag can be inside the UL tag. The * symbol indicates any tag.

Preview
Specifies the preview text that is used in the tag inspector when modifying a tag.

Preview (CSS)
Specifies the preview text that is used in the CSS style inspector when modifying the style for a tag.

Compatibility
Check this switch to determine the compatibility of the current markup with browsers. Then click the button next to it to open the Browser Compatibility window. This information will be displayed, for example, in the markup hints.

To accept the changes, be sure to click on the save button marked with the floppy disk icon shown next to it. Only then will they be saved to a file. If you try to switch to another tab or switch off the TDF editor, the program will also ask you whether you want to save the changes.

Tag attributes

On this tab, you determine which attributes are available for the selected tag and which characteristics they have. New attributes are added using the button marked with a plus sign. Once added, the attribute is added to the list and its parameters can be set in the fields below:

Attribute name
To change it, click on the button next to the field.

Attribute description
The description is displayed, for example, in attribute hints.

Tag attribute status
Specifies the status of an attribute, e.g. whether it is specific to a certain browser or perhaps already abandoned (deprecated).

This attribute is required
Some tags require certain attributes. Here you can indicate that the attribute you are modifying is just such a required attribute of the tag you are modifying.

Attribute type
Specifies the attribute type that causes the property editor in the markup inspector to be used for the attribute.

Values
Specifies a list of values for the tag attribute being modified. These values are displayed in the tag inspector and in the dynamic attributes function. If an attribute can have multiple values separated by a separator, select the Allow multiple values switch and then enter a Separator (usually a semicolon, comma, or space).

Compatibility
Check this switch to specify the compatibility of the current attribute with browsers. Then click the button next to it to open the Browser Compatibility window. This information will be displayed, for example, in the markup hints.

To accept the changes, be sure to click on the save button marked with the floppy disk icon shown next to it. Only then will they be saved to the file. If you try to switch to another tab or switch off the TDF editor, the program will also ask you whether you want to save the changes.

Tag events

This tab determines which events for scripting languages are available for the selected tag (for example, onClick, or onFocus, etc.). Use the buttons next to the list to add and remove events. The following settings are available for the event:

Event name
You can change it by clicking on the button next to the field.

Event description
It will show up in the tooltip for the tag.

Event status
Indicates whether the event is described in the language specification or is an extension of some browser.

Event type
Specifies "where the event comes from" (e.g. from clicking the mouse button or pressing a key on the keyboard).

Compatibility
Check this switch to specify the compatibility of the current attribute with browsers. Then click the button next to it to open the Browser Compatibility window. This information will be displayed, for example, in the markup hints.

To accept the changes, be sure to click on the save button marked with the floppy disk icon shown next to it. Only then will they be saved to a file. If you try to switch to another tab or switch off the TDF editor, the program will also ask you whether you want to save the changes.

Related topics

To top