Please enable JavaScript to view this site.

Altova StyleVision 2021 Professional Edition

The Conditional Presence feature enables you to create certain design components if a specified condition is fulfilled. The design components that can be created conditionally are:




New Documents

User-Defined Elements

TOC Levels


Specifying conditional presence

To specify that one of these design components be created conditionally and to set the required condition, do the following:


1.Select the design component.

2.In the Common group of properties in the Properties sidebar of that design component (screenshot below), click the Edit XPath icon BtnEdit of the Conditional Presence property.




3.In the Edit XPath Expression dialog that pops up, enter the XPath expression that is required as the condition to be fulfilled in order for the design component to be implemented in the output.

4.Click OK to finish.


Note:When the condition is fulfilled, the design component is implemented. Otherwise it is not, but all content of the design component is outputwithout the presence of that design component. For example, in the screenshot above, a hyperlink is created to be conditionally present. The condition tests whether the current node is not empty. If the node is not empty, then the condition test evaluates to true and the hyperlink is created. The text of the hyperlink text is derived from the content of the Hyperlink design component. (The URL of the hyperlink is specified elsewhere, in the Hyperlink group of properties.) If the condition test evaluates to false, then the Hyperlink text (derived from the Hyperlink design component) is output, but as plain text and not as a hyperlink.
In the same way, in the case of the other design components that can be conditionally created, it is the design component itself that is conditionally created or not. The content of the design component is created in either event (whether the condition test evaluates to true or false).




© 2015-2021 Altova GmbH