Mixing USoft application data into an XSLT transformation
When calling USXSL.APPLY or USXSL.APPLY2FILE, you can mix USoft application data into the transformation:
•By including one or more INVOKE statements into the input XML.
•By including one or more INVOKE statements into the XSLT stylesheet.
INVOKE statements in the input XML
You can get USoft application data into the input XML document at the time when you pass this XML document to be processed by USXSL.APPLY or USXSL.APPLY2FILE.
This example outputs a combination of customer data and employee data to a single output file. The effect of the XSLT transformation in this case is void: it simply copies the input XML to the output tree and writes that output to the file system.
INVOKE statements in the XSLT stylesheet
You can get USoft application data into the XSLT stylesheet document at the time when you pass this XML document to be processed by USXSL.APPLY or USXSL.APPLY2FILE.
This example transforms an input file with TOUR data for tours to Australia destinations. The transformation compares this data against older TOUR data in the current repository. Imagine that the input XML is a list of TOUR data from a NEWER version of the tour catalogue, and that the transformation is run against a repository containing an OLDER version of the tour catalogue.
The output XML is a list of destinations with, for each destination, a STATUS attribute that is
•"New" if the TOUR data exists in the input XML but not in the repository.
•"Existing" if the TOUR data exists in both the input XML and the repository.
The transformation call is:
The XSLT stylesheet is: