Personal tools
You are here: Home Projects Emoticon Skins Icon Definition File

Icon Definition File

Each icon in a skin is defined and grouped together in an XML document called the Icon Definition File. Each definition file for all skins is named "icondef.xml". There is only one such Icon Definition File per skin. Details of how the file is structured is in the Icon Definition File Schema and Icon Definition File Example.

Root

The Icon Definition File's root element is <icondef/>, and it has two child elements: <meta/>, which contains all information about the Icon Skin in general, and <icon/>, which contains information about specific icons.

<meta/>

The meta elements contain information about the Icon Skin itself, rather that the individual icons. They are contained in the <meta/> element, which lies directly under the document's root element of <icondef/>. The individual root elements are detailed below. Please see the Icon Definition File Schema for specifics of what kind of and how many characters are allowed as values for each, as well as how many times each element can appear in the document.

<name/>
This is the full name of the Icon Skin.
<version/>
This is the version number of the Icon Skin. Any version format is allowed, but the major.minor or major.minor.trivial formats are recommended.
<description/>
This is the full description of the Icon Skin. It summarizes the look and types of the icons, and can be used for keywords in searching.
<author/>
This is the full name of the authors of the skin.
<creation/>
This is the date of the creation of this version of the Icon Skin.
<home/>
This is the full web address of the Icon Skin's homepage. This can be used for copyright details and download links, as well as any other information.

<icon/>

The <text/> element defines what text string(s) are recognized by the client as an icon. There may be multiple <text/> elements in an <icon/>, such as for different languages or simply for multiple text strings producing the same result (for example: :-) and :) )

Internationalization

Each may have an xml:lang attribute, as defined in Section 2.12 in the official XML 1.0 reference document. The xml:lang attribute allows for two-letter language codes, dialects, and custom "languages" that could be used to define emoticons from the many proprietary IM protocols, for example.

Whitespace

In order to be more accurate in recognizing text strings intended to be icons from those that are just coincidences in normal conversation, the client should follow the "whitespace rule" of making sure there is some form of whitespace on at least one side of the text string. This is only a guideline, individual clients can implement different rules as needed. Some pointers:

  • A newline and tabs count as whitespace in addition to spaces. This is to make sure that chunks of code and URIs are not accidentally converted into graphical pictures.
  • Also, text strings cannot include newlines or tabs. All characters must be on the same line with only spaces within the string, and extra spaces should not be ignored. This is to make it easier on text parsers looking for these text strings.

Case Sensitivity

The text strings must be case sensitive. This is a rule that compliant clients must follow. For example, "cat" can not be used in place of "Cat" or "CAT". All three are separate text strings, and therefore must have separate <text/> elements, although they may of course use the same multimedia objects.

Multimedia Objects

The <object/> element defines what multimedia file is associated with the text string(s) defined by the <text/> element. The value of this element must be a URI pointing to the multimedia file included in the Icon Skin package.

  • This URI must be relative to the base of this package and the icondef.xml file.
  • This URI may include subdirectories, to help organize the multimedia files.

Each <object/> element must have a type= attribute, which defines the MIME type of the multimedia object file. The MIME types that can be used are not defined by this specification, so that it may remain flexible and allow developers to be innovative and creative.

  • Obvious multimedia objects to be used in Icon Skins are GIF graphics and WAV audio clips, although more cutting-edge clients are encouraged to support SVG graphics and Ogg Vorbis audio clips.
  • As long as all objects are properly identified by MIME type, not setting a list of allowed MIME types will not be a problem for anyone.
  • Alternative MIME types for the client to choose from can be done by including multiple <object/> elements for that icon.

Security

Although the URI value can point to files outside of the immediate directory of the package and the icondef.xml file, use of ../ or any other reference to files that are not included in the Icon Skin package are forbidden. This is for security measures, which otherwise might have clients display sensitive files.

Document Actions
« January 2009 »
January
MoTuWeThFrSaSu
1234
567891011
12131415161718
19202122232425
262728293031