B.56 SortList

Sort a delimited list of items in their natural string order. Note that the value and refid attributes are mutually exclusive, and the value attribute takes precedence if both are specified.

Table B.58: Attributes

NameTypeDescriptionDefaultRequired
property String The name of the property to set.n/aYes
overwrite Boolean If the property is already set, should we change it's value.falseNo
value String The list of values to process, with the delimiter character, indicated by the "delimiter" attribute, separating each value. n/aYes, unless "refid" is specified.
refid String The id of where the list of values to sort is stored.n/aYes, unless "value" is specified.
delimiter String The delimiter string that separates the values in the "list" attribute. ,No
flags String Sort flags depending on the php version and one of: SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_LOCALE_STRING, SORT_NATURAL, SORT_FLAG_CASE n/aNo

B.56.1 Example

<property id="test" name="my.list" value="z;y;X;w;v;U;t" />
<sortlist property="my.sorted.list" refid="test"
    delimiter=";"
    flags="SORT_NATURAL|SORT_FLAG_CASE" />