SPS File: Advanced Features

www.altova.com Expand/Collapse All Print this Topic Previous Page Up One Level Next page

Home > 

SPS File: Advanced Features

How to create the basic content and structure of the SPS design is described in the sections, SPS File Content and SPS File Structure. Very often, however, you will also need to modify or manipulate the content and/or structure of source data in particular ways. For example, you might wish to sort a group of nodes, say nodes containing personnel information, on a particular criterion, say the alphabetical order of employee last names. Or you might wish to group all customers in a database by city. Or add up a product's sales turnover in a particular city. Such functionality is provided in StyleVision's advanced features, and these are described in this section.

 

Given below is a list of StyleVision's SPS file advanced features:

 

Auto-Calculations. Auto-Calculations are a powerful XPath-based mechanism to manipulate data and (i) present the manipulated data in the output as well as (ii) update nodes in the XML document with the result of the Auto-Calculation.
Conditions. Processing of templates and the content of templates can be conditional upon data structures or values in the XML, or upon the result of an XPath expression
Grouping. Processing can be defined for a group of elements that are selected with an XPath expression.
Sorting. A set of XML elements can be sorted on multiple sort-keys.
Parameters and Variables. Parameters are declared at the global SPS level with a default value. These values can then be overridden at runtime by values passed to the stylesheet from the command line. Variables can be defined in the SPS and these variables can be referenced for use in the SPS.
Table of Contents (TOC) and Referencing. Tables of Contents (TOCs) can be constructed at various locations in the document output, for all output formats. The TOC mechanism works by first selecting the items to be referenced in the TOC and then referencing these marked items in the TOC. Other features which use referencing are: (i) Auto-Numbering (repeating nodes in the document can be numbered automatically and the numbers formatted); (ii) Text References (text in the document can be marked for referencing and then referenced from elsewhere in the document); and (iii) Bookmarks and Hyperlinks (bookmarks mark key points in the output document, which can then be targeted by hyperlinks. Hyperlinks can also link to external resources using a variety of methods to determine the target URI (static, dynamic, a combination of both, and unparsed entity URIs).) All these referencing mechanisms are described in this section.

 

 

 


© 2019 Altova GmbH