Theme file format

Themes are defined in XML files using specific tags.

Theme file format

The format for the theme XML file is outlined below. The <theme> root tag can optionally extend a global theme for a specific application. The optional header describes the theme. The resource tag lists any additional formatting resources, such as a CSS style sheet, that should be included in the theme. Property tags define any changes to the default properties, while control tags define any changes to the base control elements. Setting override="true" in a control tag will use only the supplied definition for the element, while setting override="false" will merge the supplied definition with the default properties. Examples of how those settings might be used include using override="true" for a button control to specify a different color scheme from the default color scheme, while override="false" is used for a button to specify a new cursor icon style, which is not specified in the default button definition.

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
	Theme root tag.
		extends: defines the theme this theme is inheriting from. Optional.
-->
<theme extends="theme" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="theme.xsd">
	<!-- 
		Theme header.
		<description>: describe this theme. Optional.
	-->
	<description>[Theme runtimeDescription]</description>
	<!-- 
		Define the list of resources that are automatically inserted in the XPage.
		<resource>: defines a resource that should be inserted into each XPage
			target: attribute that define the target technology. Optional.
			<href>: URI pointing to the resource
			<content-type>: MIME content type of the resource. 
					    Used to generate the correct HTML tag. Optional (uses the
                           file extension if not provided)
			<description>: Description of the resource. Optional.
	-->
	<resource target="xsp">
		<description>[Resource Description]</description>
		<content-type>[Mime Type]</content-type>
		<href>[Url Reference]</href>
	</resource>
	<!-- 
		Define some properties that will be available at runtime to XPages. These
       properties are available through the ApplicationEx object, as soon as the Theme
       is loaded. For example, it can define how dojo controls are rendered for this 
       theme.
		<property>: defines a new property entry
			target: attribute that define the target technology. Optional.
			<name>: name of the property to set
			<value>: value of the property
			<description>: Description of the resource. Optional.
	-->
	<property target="xsp">
		<description>[Property Description]</description>
		<name>[Property Name]</name>
		<href>[Property Value]</href>
	</property>
	<!-- 
		One entry per control. 
		<control>: defines an entry for a control
			target: attribute that define the target technology. Optional.
			override: attribute used to ignore the properties defined in the parent 
             theme. Optional.
			<name>: name of the control
			<label>: label displayed by Designer. Optional.
			<description>: description displayed by Designer. Optional.
			<property>: definition of a property content - As many nodes as necessary
				target: attribute that define the target technology. Optional.
				type: attribute that define the property type. Optional, default to
                  'string'.
				<name>: name of the property to set
				<value>: value of the property
				<description>: description displayed by Designer. Optional.
	-->
	<control target="runtime" override="true">
		<description>[Control Description]</description>
		<name>[Control Name]</name>
		<property target="xsp" type="string">
			<description>[Property Description]</description>
			<name>[Property Name]</name>
			<value>[Property Value]</value>
		</property>
	</control>
</theme>