The first two lines of the template are initial XML definitions. The third line contains the root element of the template called apt:template, which encloses the whole definition of the policy made in a template file.
The next four lines contain the main template structure elements. By nesting apt:category elements, you create the nodes of the configuration policy tree. The configuration policy tree represents the visual hierarchy of the policies in the GUI of the Configuration Manager (see Trees). If you specify an apt:name attribute, the attribute is used to uniquely designate that element. The apt:label attribute specifies the displayed text as a category in the GUI. If you do not specify the apt:label attribute, the displayed text is defined by the apt:name attribute. Therefore, always specify an apt:label element, because this element is used for localization. See Localization.
Every apt:category element must contain one or more apt:category elements or an apt:page element. The apt:page element represents a leaf in the configuration policy tree. The “Proxy” page that was shown previously is an example of a leaf. The Configuration Manager renders a page as a single HTML page that has to be divided in at least one apt:section. An apt:section element renders all its child elements in a table with a table heading. Using more than one section enables you to group settings on one page.
The apt:section element contains apt:property elements, which represent the configuration settings. The "Hello, world!" template contains six properties: ProxyServer, HTTPProxy, HTTPPort, FTPProxy, FTPPort, and NoProxyFor. Every property contains an apt:dataPath attribute. This attribute is required and specifies the data location in the configuration tree. The configuration tree in turn represents the hierarchy of the configuration settings as it is stored in the configuration repository. See Trees for more information.
The oor:type attribute defines the data type of the configuration setting in the configuration repository. ProxyServer, HTTPPort, and FTPPort are of type xs:int, the other properties are of type xs:string. Integer and string types are displayed as edit fields by default.
The visual element is used to instruct the Configuration Manager how to display the property. Without specifying this element, the property ProxyServer would have been rendered using an edit field instead of a radio button group.
The GUI of the Configuration Manager deviates from the original
StarOffice GUI by rendering the two possible integer values as a radio
button group instead of using a drop-down list. For visualizing a dual value, improved
usability is achieved using radio buttons instead of a drop-down list. An example,
for instance, is one click compared with two clicks for changing a value.
The constraints element, in combination with the enumeration sub-element, is used to specify the number of radio buttons rendered and the integer values stored in the back end, depending on which radio button is selected. The apt:label attribute specifies the string rendered on the GUI for every radio button.