Contents
Index
Search

5. configuration

<configuration
  name = non empty token
  mimeType = non empty token
  icon = anyURI
  extensions = a non empty list of filename extensions
  alternate = boolean : false
>
  Content: [ attributeEditor|binding|command|css|detect|documentResources|
             dtd|elementTemplate|help|imageToolkit|include|inclusionScheme|
             documentSetFactory|linkType|menu|newElementContent|parameterGroup|
             preserveSpace|profiling|property|relaxng|saveOptions|schema|
             schematron|spellCheckOptions|template|toolBar|translation|
             validate|validateHook|windowLayout ]*
</configuration>

This root element of a XXE configuration is just a container for all the other configuration elements. See Writing a configuration file for XXE.

Attributes:

name

This attribute uniquely identifies the configuration. This attribute is required in top-level configurations (e.g. docbook.xxe). On the other hand, it must not be specified in configuration modules (e.g. common.incl).

mimeType

The value of this attribute is used to specify the content type of XML documents saved on WebDAV servers. When this attribute is not specified, the content type passed to the WebDAV server is always application/xml. This attribute allows to be more specific: application/xhtml+xml, application/docbook+xml, etc.

icon

Specifies an icon which may be used to differentiate this kind of document. The format of this icon is expected to be GIF, PNG or JPEG and its size is expected to be 16x16.

extensions

Specifies one or more filename extensions commonly used for this kind of document. Multiple filename extensions must be separated by whitespace. It is not useful to include "xml" in this list.

A filename extension must match the "[_a-zA-Z0-9]+" regular expression pattern. Notice that a filename extension cannot have a leading dot. That is, specify "foo" and not ".foo".

alternate

Set to true if the configuration corresponds to a rarely used document type (e.g. MathML) or to an old document type (e.g. XHTML Transitional). In practice, this has an effect only on the FileNew dialog. This collapses the category (e.g. XHTML > 1.0) of the document templates found in this configuration.

Example:

<configuration name="Example1"
  xmlns="http://www.xmlmind.com/xmleditor/schema/configuration">

  <detect>
    <dtdPublicId>-//XMLmind//DTD Example1//EN</dtdPublicId>
  </detect>

  <css name="Style sheet" location="example1.css" />

  <template name="Template" location="example1.xml" />

</configuration>

The structure of the configuration element is loose: you can add any number of any of its child elements in any order.

This loose structure is very convenient when you need to create a new configuration which just adds or replaces a few elements to an existing configuration.

Example: The following configuration called DocBook 4 overrides bundled configuration also called DocBook.

<configuration name="DocBook 4" mimeType="application/docbook+xml"
  icon="../common/mime_types/docbook.png" extensions="dbk"
  xmlns="http://www.xmlmind.com/xmleditor/schema/configuration">

  <include location="docbook-config:docbook.xxe" />

  <css name="DocBook" location="MyDocBook.css" />
  <css name="Big Fonts" location="MyDocBook_BigFonts.css" />

  <template name="Chapter" />
  <template name="Section" />

  <binding>
    <keyPressed code="F5" modifiers="mod shift" />
    <command name="insert" parameter="into literal" />
  </binding>

</configuration>

The configuration in previous example can be described as follows:

  • It includes the stock DocBook 4 configuration from docbook-config:docbook.xxe to reuse its detect, elementTemplate, toolBar, etc, elements. ("docbook-config:" resolves to the directory containing the "DocBook 4" configuration, by default it's XXE_install_dir/addon/config/docbook/.)

  • It replaces bundled style sheet named DocBook by another one contained in MyDocBook.css. It adds another style sheet called Big Fonts.

  • It discards document templates named "Chapter" and "Section" (template with no location attribute).

  • Its binds key stroke Shift+Ctrl+F5 command "insert into literal". (mod is the Command key on Mac and the Control key on other platforms).