|
Home > Online Product Documentation > Table of Contents > XSLT Scenarios XSLT Scenarios
This topic is part of a sequence. If
To apply a stylesheet to an XML document in Stylus Studio, you use a scenario. A scenario is a group of customizable settings that allows you to experiment with different source XML documents (that is, the XML document to which you will apply the XSLT), processors, parameter values, post-processors, and profiling settings. You can also use scenarios to perform validation on the XML document that results from the XSLT processing. (Validation is always performed before any post-processing you specify.)
You can define multiple scenarios using different settings to see how each affects document processing. Stylus Studio also supports scenarios for Web service calls, DB-to-XML Data Sources, and XQuery. An XSLT scenario is defined by a single stylesheet-XML document pair. You can associate any number of scenarios with a stylesheet, though only one scenario can be in effect at the time the XSLT is processed. Similarly, you can associate any number of scenarios with an XML source document.
A scenario has already been created for the
To run a scenario, click Preview Result
|
|
Tip
|
|
If it is not already open, you can open the source XML document specified in a scenario by clicking
Open XML From Scenario
|
Working with Scenarios
To define additional scenarios, click the down arrow next to the scenario field in the XSLT Editor tool bar, and click Create Scenario. After you have more than one scenario, click the same down arrow to select the scenario you want to use to preview a result.
To change the properties of a scenario, or to delete a scenario, select the scenario you want to change or delete, and then click
Browse
to the right of the scenario name field. Stylus Studio displays the
Scenario Properties dialog box.
About Preview
When you preview a result, Stylus Studio automatically saves the changes you have made to the document. If you want to revert to the document's previous state, you can use the undo function ( Edit > Undo).
Working with a Sample Result Document
This topic is part of a sequence. If
your-quotes.xsl is not open, see
Opening a Sample Stylesheet. The sequence starts with
Exploring the XSLT Source Tab.
To work with a sample result document, follow these steps:
Using its back-mapping functionality, Stylus Studio displays the template in the XSLT Editor's status bar and flags the line that generated the line you clicked with a blue pointer.
This works in reverse as well. If you click a line in a template (full source mode or template mode), Stylus Studio uses a gray background to display the HTML generated by that template.
MySQL XML Tools
The MySQL tools in Stylus Studio simplify XML related development tasks for working with MySQL and XML.
EDI Mapping
To transform EDI to XML, whether for X12 or EDIFACT, Stylus Studio provides the design tools and run-time support. EDIFACT, X12 and custom EDI formats can be translated, validated and mapped using the EDI Mapping adapter technology described here.
Validating EDIFACT Documents with XML Schemas
Either before or after transforming EDIFACT content, generated XML Schemas will make sure that we have all of the necessary components, our codes are all according to the standard codelists, and every little delimiter is in the right place.
XML Publisher - XSLT Generator and XSL:FO Generator
The XML Publisher lets you easily design beautiful documents in HTML or PDF format from relational, XML and other data sources using XSL:FO or XSLT, using an intuitive visual interface.