SELECT.XSLT Example – Using multiple data-sources

This example shows you several of the techniques you can use to access data from multiple sources on the Actions stack of data sources and combine them freely into a completely new Xml structure.

Input Data Sources

The example assumes the following 3 data sources have been loaded onto the data-stack.

Data Source 1 – Named 'PRODUCTS'

Shown below in Xml-format, but it may as well be loaded in the Table-format (e.g. from an Excel sheet by use of the SELECT.EXCEL Command).

<root> <Product id="101"> <SKU>AudiA4</SKU> <Title>Audi A4 Limousine</Title> <Manufacturer>Audi</Manufacturer> </Product> <Product id="102"> <SKU>AudiA6</SKU> <Title>Audi A6 Avant</Title> <Manufacturer>Audi</Manufacturer> </Product> <Product id="103"> <SKU>VolvoXC70</SKU> <Title>Volvo XC70 Wagon</Title> <Manufacturer>Volvo</Manufacturer> </Product> </root>

Data Source 2 – Named 'MANUFACTURERS'

Shown below in Xml-format, but it may as well be loaded in the Table-format (e.g. from an Excel sheet by use of the SELECT.EXCEL Command).

<root> <Manufacturer> <Name>Audi</Name> <Country>Germany</Country> <Types>Cars</Types> <Founded>1909</Founded> </Manufacturer> <Manufacturer> <Name>Volvo</Name> <Country>Sweden</Country> <Types>Cars</Types> <Founded>1927</Founded> </Manufacturer> </root>

Data Source 3 – Named 'COUNTRIES'

Shown below in Xml-format, but it may as well be loaded in the Table-format (e.g. from an Excel sheet by use of the SELECT.EXCEL Command).

<Data> <Country> <Name>Germany</Name> <Continent>Europe</Continent> <Size>Large</Size> </Country> <Country> <Name>Denmark</Name> <Continent>Europe</Continent> <Size>Even Smaller</Size> </Country> <Country> <Name>Sweden</Name> <Continent>Europe</Continent> <Size>Small</Size> </Country> </Data>

The Xslt-script

An example Xslt-script is shown below. It uses all of the above 3 data sources and combines them into another Xml-structure.

The Output result

The output-result of applying the above Xslt-script to the above 3 input-sources is shown below.