Guidelines for creating attribute filter rules

Guidelines for creating attribute filter rules.

When you create a filter rule, you can choose to use the Add Rule button or you can enter the rule in the Expression box manually. When you choose to save a rule, FrameMaker checks the rule syntax. You cannot save a rule with an incorrect syntax.

Case of attribute name-value

The name of an attribute in a rule is case-sensitive. However, the value of the attribute is case-insensitive.

Correct:

(audience="ADMIN" OR audience="enduser")

The above rule will filter content that is tagged with the attribute value ADMIN, Admin, or admin.

Incorrect:

(audience="admin" OR Audience="enduser")

The attribute name must be defined with the same case as defined in the Attributes panel.

Attribute value

The value of an attribute must be enclosed within double-quote and cannot be empty.

Incorrect:

(audience="")

Do not use this rule to filter elements having any value for attribute. Instead, use the ANY operator described above.

Use of parenthesis

Each attribute name-value pair must be included within parenthesis.

Include only the same attribute within the same parenthesis.

Correct:

(audience="admin" OR audience="enduser" OR audience="author")

Incorrect:

(audience="admin" AND product="framemaker")

Only the same attributes can be included in the same parenthesis.

Incorrect:

audience="admin" OR audience="enduser" OR audience="author"

The name-value pairs must be included in parenthesis. Even a single name-value pair must be included in parenthesis.

Use of AND operator

The AND operator cannot be used to filter the same attribute. It can only be used to filter different attributes.

Incorrect:

(audience="admin" AND audience="enduser")

Correct:

(audience="admin" OR audience="enduser") AND (product="framemaker")

Use of NOT operator

The NOT operator must be included before the opening parenthesis of an attribute name-value group.

Incorrect:

(audience="admin") AND (NOT product="framemaker")

Correct:

(audience="admin") AND NOT (product="framemaker")

Correct:

NOT (product="framemaker")

Use of ANY operator

To filter the content tagged with any value of an attribute.

Correct:

(audience #ANY)

The above rule includes all content tagged with the audience attribute irrespective of the value of the attribute.

Correct:

NOT (audience #ANY)

The above rule excludes all content tagged with the audience attribute irrespective of the value of the attribute.