Before transforming the current edited XML document in <oXygen/> you must define a transformation scenario to apply to that document. A scenario is a set of values for various parameters defining a transformation. It is not related to any particular document but to a document type:
Such a scenario contains the location of an XSLT stylesheet that is applied on the edited XML document and other transform parameters.
Such a scenario contains the location of an XML document that the edited XSL file is applied on and other transform parameters.
In order to apply a transformation scenario one has to press the Apply transformation scenario button from the toolbar. Alternatively, transform actions can be applied from the Project view's contextual menu without having to open the files:
Configure transformation scenario - allows the configuration of file's associated transformation scenario. If no transformation scenario is associated with the file, then the menu action is disabled.
Apply transformation scenario - applies the associated transformation scenario on the selected files. If the currently processed file does not have an associated transformation scenario then the Configure transformation scenario dialog is opened.
Transform with... - allows the user to select a transformation scenario to be applied on the currently selected files.
If the Apply Transformation Scenario toolbar button is pressed, currently there is no scenario associated with the edited document and the edited document contains a "xml-stylesheet" processing instruction referring to a XSLT stylesheet (commonly used for display in Internet browsers), then <oXygen/> will prompt the user and offer the option to associate the document with a default scenario containing in the XSL URL field the URL from the href attribute of the processing instruction. This scenario will have the "Use xml-stylesheet declaration" checkbox set by default, will use Saxon as transformation engine, will perform no FO processing and will store the result in a file with the same URL as the edited document except the extension which will be changed to html. The name and path will be preserved because the output file name is specified with the help of two macros: ${cfd} and ${cfn}.
<oXygen/> comes with preconfigured built-in scenarios for usual transformations that enable the user to obtain quickly the desired output: associate one of the built-in scenarios with the current edited document and then apply the scenario with just one click.
The Configure Scenario dialog is used to associate a scenario from the list of all scenarios with the edited document by selecting an entry from the list. The dialog is opened by pressing the Configure Transformation Scenario button on the toolbar of the document view. Once selected the scenario will be applied with only one click on the Apply Transformation button on the same toolbar. Pressing the Apply Transformation button before associating a scenario with the edited document will invoke first the Configure Scenario dialog and then apply the selected scenario.
Open the Configure Transformation dialog by selecting Ctrl+Shift+C) Complete the dialog as follows:
-> (Specifies an input XSL file to be used for the transformation.
Opens a dialog allowing to introduce special <oXygen/> macros in the XSL URL field.
Opens a file browser dialog allowing to select a local file name for the XSL URL field.
Opens a file browser dialog allowing to select a remote file name for the XSL URL field.
Opens the file with the path specified in the XSL URL path in a new editor panel.
Use the stylesheet declared with an "xml-stylesheet" declaration instead of the stylesheet specified in the XSL URL field.
This combo box contains all the transformer engines available for applying the stylesheet. If you want to change the default selected engine just select other engine from the drop down list of the combo box.
Opens a dialog for specifying a URL for a header HTML file added at the beginning of the result of an HTML transformation and a URL for a footer HTML file added at the end of the HTML result.
Opens the dialog for adding XSLT stylesheets which are applied on the result of the main stylesheet specified in the XSL URL field.
Opens the dialog for configuring the XSLT/XQuery extension jars or classes which define extension functions called from the XSLT/XQuery transformation.
Enable or disable the use of FOP during the transformation.
The FO processor is applied to the result of applying the XSLT stylesheet.
The FO processor is applied directly to the current edited document.
The output format of the FO processing: PDF, PostScript or plain text.
The FO processor, which can be the built-in Apache FOP processor or an external processor.
At the end of the transformation it will be displayed a file browser dialog for specifying the path and name of the file which will store the transformation result.
The path of the file where it will be stored the transformation result. The path can include special <oXygen/> macros.
If this is checked <oXygen/> will open automatically the transformation result in a browser application specific for the type of that result (HTML/XHTML, PDF, text).
When Open in browser is selected this button can be selected to specify that <oXygen/> should open the file specified in the Save As text field.
When Open in browser is selected this button can be used to specify that <oXygen/> should not open the file specified in the Save As text field, it should open the file specified in the text field of the Other location radio button. The file path can include special <oXygen/> macros.
It is enabled only when Open in browser is disabled and if this is checked <oXygen/> will display the transformation result in a built-in XHTML browser panel of the <oXygen/> window.
When transforming very large documents you should be aware that enabling this feature will result in a very long transformation time. This drawback appears due to the Java XHTML browser implementation. In this situations if you wish to see the result of the transformation you should use an external browser.
If this is checked <oXygen/> will display the transformation result in an XML viewer panel with syntax highlight specific for XML documents.
If this is checked <oXygen/> will display the transformation result in a SVG viewer panel by rendering the result as a SVG image.
If Show As XHTML is checked this text field specifies the path for resolving image paths contained in the transformation result.
The parameters of the XSLT stylesheet used in the transformation scenario are configured from the dialog available from the Parameters button:
The table presents all the parameters of the XSLT stylesheet and all imported and included stylesheets with their current values. If a parameter value was not edited then the table presents its default value. The bottom panel presents the default value of the parameter selected in the table and the system ID of the stylesheet that declares it.
For setting the value of a parameter declared in the stylesheet in a namespace, for example:
<xsl:param name="p:param" xmlns:p="namespace">default</xsl:param>
use the following expression in the Name column of the Parameters dialog:
{namespace}param
The list of additional XSLT stylesheets can be edited in the dialog opened by the button "Additional XSLT Stylesheets".
Adds a stylesheet in the "Additional XSLT stylesheets" list using a file browser dialog , also you can type a macro in the file name field of the browser dialog. The name of the stylesheet will be added in the list after the current selection.
Opens a dialog in which you can type the name of a stylesheet. The name is considered relative to the URL of the current edited XML document. You can use macros in the name of the stylesheet. The name of the stylesheet will be added in the list after the current selection.
Deletes the selected stylesheet from the "Additional XSLT stylesheets" list.
Move the selected stylesheet up in the list.
Move the selected stylesheet down in the list.
The path specified in the URL text field can include special <oXygen/> macros.
In the fields reserved for: input URL (XSL URL or XML URL, depending on scenario type), header URL, footer URL, the URLs in the list of additional XSLT stylesheets, image base URL, the user can use the following macros:
the path of the frameworks
subdirectory
of the <oXygen/> install directory
the path of the user home directory
current file directory url - the path of the current edited document up to the name of the parent directory as URL
current file name - the name of the current edited document without extension and parent directory
In the Save As field from the Output tab, the user can use the following macros:
the path of the frameworks
subdirectory
of the <oXygen/> install directory
the path of the user home directory
current file directory - the path of the current edited document up to the name of the parent directory
current file name - the name of the current edited document without extension and parent directory
The macros defined here can also be used in the values set for the parameters of the transformation (e.g. base.dir).
The edit extensions dialog is used to specify the jars and classes containing extension functions called from the XSLT/XQuery file of the current transformation scenario.
An extension function called from the XSLT or XQuery file of the current transformation scenario will be searched in the specified extensions in the order of the list displayed in the dialog. For changing the order of the items the user must select the item that must be moved to other position in the list and press the
up and down buttons.Use the following procedure to create a scenario.
The option to Export Transformation Scenarios is used to store all the scenarios in a separate file , a properties file. In this file will also be saved the associations between document URLs and scenarios. The saved URLs are absolute . You can load the saved scenarios using Import Transformation Scenarios option. All the imported scenarios will have added to the name the word 'import'.
The action oXygen / Scenarios Management+ loads a properties file with scenarios.
-> +The action oXygen / Scenarios Management+ stores all the scenarios in a separate file , a properties file.
-> +