SourceForge Logo
About the XMLtype project
Download
Setting Up XMLtype
How to Use It
FAQ

Setting Up XMLtype

Global and Local Configuration
Keymaps
Unicode and Console
Entities Workaround

Global and Local Configuration

During the startup, XMLtype attempts to read two configuration files. Both are named config and have the same structure, but they are located in different directories. The global configuration is in the XMLtype's home directory (/usr/local/share/xmltype by default) and contains setting which is applied to all users. If XMLtype fails to find this file, it will drop a warning message, since it will use some hard-coded defaults and needn't always work properly.

User may also optionaly write a local configuration file in his home directory. After reading global config, XMLtype checks for ~/.xmltype/config file, reads its content and overrides the values in global file. User can thus customize program's features, e.g. syntax highlight colors, tab-stop indention, etc. Include in local config only those variables you want to override.

See the global config file, it's documented and self-explanatory. The key variables are case-sensitive. Errors in variable's syntax are ignored.

Keymaps

One of the most important functions of config files is enumerating and configuring keymaps you want to use for writing. See the global config file for its syntax. Since release 0.4, a keymap (to be more precise, a particular keymap filename) is registered only once, all following occurences are ignored. Therefore, if you specify the same keymap in global as well as in local config, only the global setting is used.

Unicode and Console

XMLtype requires console with UTF-8 support. On Linux, this is usually supplied by the console-tools package. If this is the case, than you probably don't need to change Unicode-related settings in the config file. (AUTO_UTF-8_MODE, UTF-8_START, UTF-8_STOP) If you need to change PSF font used by the terminal, check the UTF-8_START variable.

Entities Workaround

As noted among known bugs and limitations, XMLtype, because of its inner architecture, ignores markup embedded in document through external entity reference. For instance, let's assume you've defined entity sign in /dtd/doc.dtd, representing the following XML code:

<signature>
<name>Pierrot</name>
<family-name>Lunaire</family-name>
</signature>

Now, you want XMLtype to take this code in account while determining context position for word-completing, wherever &sign; occurs. Add following line in file named entities in local or global config directory:

/dtd/doc.dtd sign signature

The first field specifies full DTD system ID (filename), the second one entity name and the third field contains name of the last element of the embedded code.