Defining Categories for Attributes from Individual Elements
You can specify that indivdual elements in the XUI document type display their own attribute categories, which are different to those configured for the document type in general.
For example, you may want to configure three categories of attribute to be displayed as tabs in the Modify Attributes box, as a default setting for all elements in the XUI document type. You may also want the button element to override those default settings, and display a different set of tabs.
The sample markup shown below will configure the three default categories of attribute to be displayed as tabs in the Modify Attributes box for all elements in the XUI document type. The categories are Item (attributes id and resize), Font (attributes family and fontstyle) and Other (all other attributes). Note the declaration of the Event category (attributes ev:defaultAction and ev:event) and the Control category, both with default="no" set. These categories are configured but not displayed as a default.
<ModifyAttributeDialog>
<ModifyAttributeCategories>
<ModifyAttributeCategory name="all-item" sort="no"
label="Item" default="yes">
<ModifyAttributeCategoryAttribute name="id"/>
<ModifyAttributeCategoryAttribute name="resize"/>
</ModifyAttributeCategory>
<ModifyAttributeCategory name="all-font" sort="no"
label="Font" default="yes">
<ModifyAttributeCategoryAttribute name="family"/>
<ModifyAttributeCategoryAttribute name="fontstyle"/>
</ModifyAttributeCategory>
<ModifyAttributeCategory name="all-other" sort="yes"
label="Other" type="other" default="yes"/>
<ModifyAttributeCategory name="all-event" sort="yes"
label="Event" default="no">
<ModifyAttributeCategoryAttribute name="ev:defaultAction"/>
<ModifyAttributeCategoryAttribute name="ev:event"/>
</ModifyAttributeCategory>
<ModifyAttributeCategory name="all-control" sort="yes"
label="Control" type="other" default="no"/>
<ModifyAttributeCategory name="all-required" sort="yes"
label="Required" type="required" default="no"/>
</ModifyAttributeCategories>
</ModifyAttributeDialog>
In the DCF file, configure separate category information for the button element using the attributeCategories attribute of its ElementOption element. For example, to have the button element display the categories Control, Item, Font, and Event, use markup as shown below:
<ElementOptions>
...
<ElementOption element="button"
attributeCategories="all-control all-item all-font all-event"/>
...
</ElementOptions>