## Component Definition Element

The root XML element in a component definition file is the <componentDefinition> element. This element can contain three types of items. It includes zero or more compound property declarations, zero or more enum declarations and zero or one component declaration. Displayable strings can either be included literally within the definition file or referenced in the component.properties file by prefixing the string with the percent symbol (%). Generally the initial part of the .component XML file looks like:

> <?xml version="1.0" encoding="UTF-8"?>
> <componentDefinition xmlns="http://www.nokia.com/sdt/emf/component"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

The main item within the <componentDefinition> element is the <component> element. There can be only one of these per file, and it can be omitted if the file just has type definitions. The other two items that can appear in <componentDefinition> are type declarations that are referenced from property definitions.

The <compoundPropertyDeclaration> element is used to declare a structured type used in properties. One example is a Point structure containing x and y coordinates. Another example is a Symbian image property, containing the name of a bitmap file and names of the regular image and mask images.

The <enumPropertyDeclaration> element declares an enumerated type that may be referenced from one or more enumerated property declarations in this or other component documents. Sets of enumerated values can be declared and used to define properties.

All enum property declarations are in a global namespace and must be declared as global elements.