Topic structure rules are based on three types of paragraph-level rules - paragraph, table, and group. In addition, a paragraph rule can also use six inline or child-level rules. (Note: There is no validation for inline content within a table. As a result, no restrictions are placed on the inline content used in tables).
Paragraph rules define the paragraph-level style applied to a content block. The rules also define how many paragraphs can be created in the topic using the rule attributes, and the location within the topic.
Paragraphs can be created as text only, or they can contain a mixture of text and any combination of the following content or extra formatting:
- character styles
- file objects (images)
- embedded topics
There are two ways to add child-level content to a paragraph:
- Create a paragraph rule without child rules. When there are no child rules there are no restrictions on the content that can be used in the content block.
- Create a paragraph rule with child rules. When there are child rules only child-level content defined in the child rules will validate. (You can have a paragraph with some child rules, any content type without a rule remains unrestricted.)
Child rules are used to enforce restrictions on additional content within a paragraph or group rule. Until a rule is created there are no restrictions on the character styles or objects used in the content block. When you create child rules you define how the content can be used.
- Character styles - define the character styles that can be assigned to the content block.
- File objects - define the images that can be used within the text or at a paragraph marker (where the image is the content block). Defining a template enables new images based on the template to be created.
- Embedded topics - define the embedded topic that can be used. Allow a specific topic or allow a template (enables any topic based on the template to be added). The topic object or template is validated, not the content within the embedded topic.
- Hyperlinks - define the hyperlink objects that can be used. Defining a template enables new hyperlinks based on the template to be created.
- Variables - define the variables that can be used within the content block.
- Text Required - enforces the use of text at a specific point within a content block. By default, you can add text to any paragraph in your structure - you do not have to create a text rule to include text. The Text Required rule is a special case rule and only needs to be used when you want to ensure that text has been added to a paragraph at a particular point. For example, when text must follow an image.
The topic rules must contain a table rule for content of the table to be validated. If there is no table rule(s) in the topic rules, then the content of the table is NOT validated.
Table and table cell rules are used when you add a table in the topic. Attributes for using the table are assigned to the Table rule (which acts as a parent node). Table cell rules are used to assign paragraph style formatting to specified rows or columns. Validation is restricted to paragraph styles, other content can be included in the table but is not validated. Table rules are not used to restrict the number of rows or columns used in the table.
Group rules are used to create a sub structure around several rules. By grouping the rules you can define how the sub structure is used in the topic. Attributes for using the structure are assigned to the Group rule (which acts as a parent node). Group rules can include paragraph, child, table, and other instances of group rules.