Sort Set Element (Data)

From HLKitWiki
Revision as of 18:37, 30 November 2008 by Rob (Talk | contribs) (New page: {{context|Kit Reference|Structural File Reference}} ==The "sortset" Element== The mechanism used for controlling the sorting sequences of things and picks within the Kit is referred to a...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Context: HL KitKit Reference … Structural File Reference 

The "sortset" Element

The mechanism used for controlling the sorting sequences of things and picks within the Kit is referred to as "sort sets". Each sort set is defined through the use of a "sortset" element. The complete list of attributes for this element is below.

id Id – Specifies the unique id of the sort set. This id is used in all references to the sort set.
name Text – Specifies the public name to be used for the sort set.

The "sortset" element also possesses child elements that pertain to its handling. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.

sortkey One or more "sortkey" elements must appear as defined by the given link. This element specifies each of the sort criteria to used, and the order in which the sort key are defined dictates the sequence in which they will be applied. Consequently, the first sort key represents the primary comparison test used, the second sort key is the secondary comparison, etc. The comparisons are applied in order until the objects are differentiated.

The "sortkey" Element

The "sortkey" element defines the particulars for an individual comparison test that will be employed when sorting. The complete list of attributes for this element is below.

id Id – Specifies the unique id of the field or tag group to be used for sorting.
isfield (Optional) Boolean – Indicates whether this sort key will compare objects based on a field value or the presence of tags. It also identifies the nature of the "id" attribute, which will be the unique id of either a field or tag group, as appropriate. Default: "no".
isascend (Optional) Boolean – Indicates whether the sort key will sequence objects in ascending or descending order. Default: "yes".

Example

The following example demonstrates what a "sortset" element might look like. All default values are assumed for optional attributes.

<sortset id="Armory" name="Weapons and Armor">
  <sortkey isfield="no" id="Equipped"/>
  <sortkey isfield="no" id="Armory"/>
  <sortkey isfield="no" id="_Name_"/>
  </sortset>