Using Table Row and Column Conditions in StyleVision 2013


The ability to conditionally hide table rows or columns has been a popular feature request from StyleVision users. StyleVision 2013 adds the capability in the form of conditional expressions on table rows and columns. Conditional processing can be set on individual columns and rows of static and dynamic tables, as well as on column and row headers, to display or hide the column, row, or header depending on the truth of the condition. The conditions are specified using StyleVision’s XPath Expression editor. If a condition evaluates to true, the column, row, or header is displayed; otherwise it is not (i.e., is hidden).

StyleVision 2013 Edit XPath Expression dialog

Let’s take a look at some scenarios for which this new feature is exceptionally useful.

Here are some scenarios in which this type of condition could be used:

  • On a column, row, or table, enter the XPath expression false() to hide the column, true() to display it
  • A column is output only if the sum of all the values in that column exceeds a certain integer value
  • A column or row is output only if no cell in that column or row, respectively, is empty
  • A column or row is output only if a certain cell-value exists in that column or row, respectively

To specify a row or column condition, simply select the target row or column and, from the right-click menu, select “Edit Conditional Processing.”

As a quick introduction to another valuable and time-saving new feature in StyleVision 2013, note the new “Evaluator” button in the Edit XPath Expression dialog. Clicking on it presents StyleVision’s new XPath Evaluator extension, which makes it possible to easily and contextually check the results of XPath expressions while you’re editing.
StyleVision 2013 XPath expression evaluator

The XPath expression in the XPath 2 Expression text box can be edited, and the expression can be immediately evaluated, with the results displayed in the Results pane. Evaluation options include:

  • Evaluate on typing: If this check box is selected, the XPath expression is evaluated: (i) with every keystroke used to edit the expression, and (ii) when the mode is switched from Builder mode to Evaluator mode.
  • Evaluate now: This button is enabled when the Evaluate on Typing option is not checked. Click it to evaluate the expression.

For information about other productivity-enhancing new features in StyleVision 2013 and other MissionKit 2013 tools, please see What’s New in the Altova Product Line?. To further explore the many new StyleVision 2013 features, you can also download a free 30-day trial version today!

Tags: , ,