Group rule validation requirements

Add & manage content

Platform_KC
Cloud

Use Group Rules in topics to build a sub structure around several rules. The attributes for determining whether the sub structure is optional or mandatory, or whether the sequence is fixed or flexible, are applied against the Group Rule. In addition, a Group Rule can be created as a child of another Group Rule, enabling even more control over your content.

The following example describes the validation requirements for two structures - one using a group rule and the other without the group rule.

Expected result: create a structure with a group rule that gives the option of adding a screen shot to a topic. If the screen shot is added then there must be the option to add a table to contain the "call out" text. However if the screen shot is not added to the topic then the rule must prohibit a table from being added. The rule must also prohibit the table from being added before the screen shot.

Structure with a group rule

Rules With Group Rule

The group rule creates a sub structure around the screen shot and table rules. Let's look at how this sub structure controls the rules in the topic.

Using the Group Rule

  • The Group Rule is set to 0 to 2 instances - it is the group rule that controls the number of times this combination can be used in the topic, and its location within the topic (in relation to other rules or group rules).
  • The Additional Paragraphs rule and the Group Rule are both set to Flexible - this means that the Additional Paragraph rule can be used before or after the combination of screen shots and tables from the Group Rule.
  • The occurrence settings for the screen shot's paragraph and file rule are set to 1 to 1, that is, a maximum of one screen shot within the paragraph. The occurrence settings of 0 to 1 applied to the table make its use optional within the combination. As a result, this group rule allows you to include a screen shot with or without a table. However, it does not allow you to add a table to the topic without a screen shot.
  • When used, the location of the screen shot and table are fixed within the group - the order cannot be swapped in the topic. That is, when the screen shot and table are used they must be used in that order - a screen shot followed by a table. The topic will not validate if a table is added before the screen shot.

Structure without a group rule

Let's look at the structure, but this time the rules are not controlled by a Group Rule. By excluding the Group Rule the structure now contains four individual rules which have different validation requirements.

Using the Group Rule - No Group Rule Added

There are several consequences when using these rules without a group rule.

  • The Additional Paragraphs Rule cannot be added after the screen shot and table as these rules have a Fixed sequence.
  • The topic must contain one screen shot - this is no longer optional, and you no longer have the choice of adding two screen shots.
  • The table is still optional, and if used it must be added after the screen shot. A maximum of one table can be used in the topic.