Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to output conditional content from the model
xomega
#1 Posted : Tuesday, October 8, 2013 6:05:09 PM(UTC)
xomega



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.
  1. Select the part of the document in the MS Word template that needs to be conditionally included.
  2. 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.
  3. Click the Aa button to insert a rich text content control.
  4. Click on the Properties button.
  5. 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.
  6. 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.
  1. Select the conditional content controls in the MS Word template that need to be grouped.
  2. Open the Developer tab.
  3. Click the Aa button to insert a rich text content control.
  4. Click on the Properties button.
  5. Enter group into the Tag field and click OK.
Below is a picture that illustrates this setup.
Conditional Content Properties
xomega attached the following image(s):
xomega attached the following image(s): DocConditionalContent.png
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Copyright © 2009-2022 Xomega.Net. All rights reserved.