arc:equals keyword to compare the value of an attribute to a reference value. Unlike arc:check, arc:equals throws an exception if the specified item does not contain the specified attribute. If the specified attribute exists and its value matches, the comparison succeeds.
arc:equals and arc:check both expect the name of the attribute whose value should be compared with a given value. To compare two values, you can use arc:select instead. For example:Parameters
- item: The item in which to compare the attribute. Specifying an item is not required. If item is not specified, the default item is used.
- attr: The name of the attribute to compare.
- case: Whether to use case-sensitive or case-insensitive comparison. The default is case-sensitive comparison; to use case-insensitive comparison, set this parameter to
ignore. - value: The value to compare the attribute with.
- action: The action to perform if equality is met. Allowed values:
breakorcontinue.
Control Attributes
NoneExample
Like other conditional keywords, the body ofarc:equals can also contain an arc:else keyword, which is executed if the values do not match. The following lists all files except .err files:
See Also
- arc:select: Choose between more than one alternative.
- arc:notequals: Create a block that is executed when equality is not met.