Using the StyleVision Combo Box to Support Data Visibility Requirements


Altova is always on the lookout for ways to help software developers and architects meet the challenges presented by the increasingly complex collection, storage and retrieval requirements of end users. In fact, we recently enhanced the functionality of the combo box in StyleVision to provide developers with additional flexibility around collecting and populating data. There are three ways to define the items in a combo box and their associated XML values – automatically based on a valid schema, manually with a list of populated values and dynamically with an XPath expression. In the latter two scenarios, the value that appears to the end user can be different than the value that will populate the file or database. This feature is particularly useful in cases where the “meaning” of the underlying data isn’t obvious or intelligible to an end user (e.g., a seven digit part number). The values in a combo box can be automatically populated with enumerations from a valid schema. In this case the value that appears to the end user is identical to the XML value that will populate the file or database.Altova StyleVision The functionality is perfect in cases where the elements in the schema provide an accurate reflection of the data content as understood by multiple stakeholders (e.g., end user selects Four to indicate group assignment, which populates the file with the XML value Four). Developers can also populate the combo box manually, defining both the value that appears to the end user and the XML value that will populate the file or database. These values do not need to be the same. So, for example, an end user can select Acme Dishwasher, Stainless while a complex product code populates the file or database used to generate the purchase order. This is an especially useful for collecting standardized data using organization or department-specific taxonomies and supporting multi-lingual applications. Finally, combo boxes can be populated dynamically via XPath expression. Use the same XPath expression to define the values that the end user sees as well as their associated XML values or use different XPath expressions to identify discrete values. If you use different XPath expressions the values the end user sees and their XML values are automatically mapped to one another. In the example below, the end user is prompted to select the group to which he is currently assigned (one, two, three or four). However the group number (not the name) will populate the database. Please note that the values the end user sees could be sorted in alphabetical (or numerical) order if the Sort Values in Authentic box were to be checked. The XPath expressions above produce the output below – the end user selects “Two” but a numeric value is saved to the XML document. The combo box – particularly one that supports the differentiation of values visible to the end user and those that actually populate the database or file – is an invaluable resource in the design of electronic forms. StyleVision automatically generates the stylesheet for an electronic form along with those for HTML, PDF, Word 20007+ and RTF from your template. The Authentic eForm provides an interface for end users to enter and edit XML or database data and is viewable in Authentic View, Altova’s free graphical XML document editor. Have you used enhanced combo box functionality to solve a data entry or population issue? Share it with our active community of StyleVision users by posting to our Facebook wall, commenting here on our blog or joining a discussion in our User Forum on our Website!

Tags: , ,