In order to output conditional content from the Xomega model in the generated document, you need to wrap it in a rich text content control in the template and specify XPath for the condition as the title and one of the conditional key words as the tag as follows.
- Select the part of the document in the MS Word template that needs to be conditionally included.
- Open the Developer tab. If you don't see it, open the Word Options dialog and check the "Show Developer tab in the Ribbon" check box.
- Click the Aa button to insert a rich text content control.
- Click on the Properties button.
- Enter one of the following conditional key words into the Tag field.
- if to output the content only if the specified conditions met.
- elseif to output the content only if the specified conditions met and none of the preceding if or elseif conditions are met.
- else to output the content only if none of the preceding if or elseif conditions are met.
- If the tag you specified above is not else, enter the XPath that evaluates the condition from the model into the Title field. Use the $ctx variable for the context node, as well as any built-in or custom functions as appropriate.
To group multiple conditional templates you need to additionally do the following.
- Select the conditional content controls in the MS Word template that need to be grouped.
- Open the Developer tab.
- Click the Aa button to insert a rich text content control.
- Click on the Properties button.
- Enter group into the Tag field and click OK.
Below is a picture that illustrates this setup.

xomega attached the following image(s):