|
An XSLT scenario is a concept used by Excelon
Stylus Studio
(http://www.exln.com/products/stylusstudio/)
to connect XML sources to an XSL
transformation. A scenario is bound to a
single XSLT file but many scenarios can be
bound to the same XSLT file. One scenario
is the active at a time and the XML source
defined in it is used in following cases: +
When executing the XSL file. + In code
completion of XPath expressions. + In other
tools which generate XSLT code from the XML
source documents structure.
From my point of view, a scenario defines an
environment for an XSLT file, not just the
source XML file. The source XML is not
necessarily a single XML file, because it
might be generated dynamically by some
framework. E.g. if one is creating an XSLT
which defines one stage in series of XML
transformations (like in Cocoon or Dimon
Server XSA), the source XML is the input
into that transformation stage, not just a
single XML file.
A scenario has following responsibilities: +
Supply XML source data to use as an input to
the XSLT. The source data may be used in
the XSLT editor, e.g. by the XPath editor
and XPath code completion. + Create user
interface panels to configure the
scenario's environment. + Execute the
XSLT in the scenario's environment,
possibly applying some pre-processing and
post-processing of the XML data. The
execution might end with some action such as
opening the result in a WebBrowser or
Emulator.
There can be different types of scenarios.
Each type has it's own user interface
to customize the scenario. Following are
examples of scenario types:
+ File based scenario: This scenario has user
interface which allows End user to select
an XML file for input and name of the
output file. The End user should also be
allowed to set values of parameters exposed
by the XSL transformation. The user
interface might be similar to the XSL
Transformation dialog in Netbeans 3.4.
+ XSA scenario: An XSA file for Dimon Server
(see http://www.dimonsoftware.com)
describes series of XML transformations and
their execution context.
A list of scenarios for a particular XSLT
file and the active scenario might be
displayed in a ComboBox on the Editor
toolbar. The editor toolbar should also
have a button to customize the scenarios
for the XSLT file, such as add, remove and
edit.
When a new scenario is added the user should
first select the type of the new scenario
(file based, XSA based, Cocoon based). A
user interface for the scenario
customization is defined by the scenarios
type.
|