<oXygen/> User Guide |
XML is designed to store, carry, and exchange data, not to display data. When we want to view the data we must either have an XML compliant user agent or transform it to a format that can be read by other user agents. This process is known as transformation.
Within the current version of Oxygen you can transform your XML documents to the following formats without having to exit from the application. For transformation to formats not listed simply install the tool chain required to perform the transformation and process the xml files created with Oxygen in accordance with the processor instructions.
Adobe Portable Document Format (PDF) is a compact binary file format that can be viewed and printed by anyone, anywhere across a broad range of hardware and software using the free PDF Viewer from Adobe.
PostScript is the leading printing technology from Adobe for high-quality, best-in-class printing solutions ranging from desktop devices to the most advanced digital presses, platemakers, and large format image setters in the world. Postscript files can be viewed using viewers such as GhostScript, but are more commonly created as a prepress format.
Text files are Plain ASCII Text and can be opened in any text editor or word processor.
XML stands for EXtensible Markup Language and is a W3C standard. markup language, much like HTML, which was designed to describe data. XML tags are not predefined in XML. You must define your own tags. XML uses a Document Type Definition (DTD), an XML Schema or a Relax NG schema to describe the data. XML with a DTD, XML Schema or Relax NG schema is designed to be self-descriptive. XML is not a replacement for HTML. XML and HTML were designed with different goals:
XML was designed to describe data and to focus on what data is.
HTML was designed to display data and to focus on how data looks.
HTML is about displaying information, XML is about describing information.
XHTML stands for EXtensible HyperText Markup Language, a W3C standard. XHTML is aimed to replace HTML. While almost identical to HTML 4.01, XHTML is a stricter and cleaner version of HTML. XHTML is HTML defined as an XML application.
All formatting during a transformation is provided under the control of an Extensible Stylesheet (XSLT). Specifying the appropriate XSLT enables transformation to the above formats and preparation of output files for specific user agent viewing applications, including:
HTML stands for Hyper Text Markup Language and is a W3C Standard for the World Wide Web. HTML is a text file containing small markup tags. The markup tags tell the Web browser how to display the page. An HTML file must have an htm or html file extension. An HTML file can be created using a simple text editor.
Microsoft HTML Help is the standard help system for the Windows platform. Authors can use HTML Help to create online help for a software application or to create content for a multimedia title or Web site. Developers can use the HTML Help API to program a host application or hook up context-sensitive help to an application.
JavaHelp software is a full-featured, platform-independent, extensible help system from Sun Microsystems that enables developers and authors to incorporate online help in applets, components, applications, operating systems, and devices. JavaHelp is a free product and the binaries for JavaHelp are re distributable.
Many other target formats are possible, these are the most popular. The basic condition for transformation to any format is that your document is valid against a given DTD and that the XSLT (XSL), used for transformation is compatible with the DTD.
An XSL stylesheet specifies the presentation of a class of XML documents by describing how an instance of the class are transformed into an XML document that uses the formatting vocabulary.
XSL consists of three parts:
XSLT is a language for transforming XML documents.
XPath is an expression language used by XSLT to access or refer to parts of an XML document. (XPath is also used by the XML Linking specification).
XSL-FO is an XML vocabulary for specifying formatting semantics.
The Oxygen installation package is distributed with the ApacheFOP (Formatting Objects Processor) for rendering your XML documents to PDF. FOP is a print and output independent formatter driven by XSL Formatting Objects. FOP is implemented as a Java application that reads a formatting object tree and renders the resulting pages to a specified output.
![]() | Tip |
---|---|
To include PNG images in the final PDF document you need the JIMI or JAI libraries. For TIFF images you need the JAI library. The JIMI and JAI libraries are not bundled with Oxygen due to Sun's licensing. Using them is as easy as downloading them and copying the necessary jar files (required by the library documentation) in the lib subdirectory of the Oxygen installation directory. This means JimiProClasses.zip for JIMI and jai_core.jar, jai_codec.jar and mlibwrapper_jai.jar for JAI. For the JAI package you also need to include the directory containing the native libraries (mlib_jai.dll and mlib_jai_mmx.dll on Windows) in the PATH system variable. |
Other FO processors can be configured in the Preferences -> FO Processors option for use in document transformation.
Before transforming the current edited XML document in Oxygen one 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 tied 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.
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:
Use the XSLT tab to specify an input XSL file to be used for the transformation. You can also add XSLT parameters and append header and footer URL's for inclusion in the transformation. To apply a cascade of stylesheets the user can set the list of stylesheets applied after the stylesheet from the XSL URL fild from the "Cascade Stylesheets" button.The user can choose between Xalan and Saxon when configuring the transformation. Saxon is faster on Docbook stylesheets.
Use the FOP tab to enable/disable use of FOP during a transformation. FOP input may be provided from the XSLT output or the edited document source. Oxygen is supplied with the Apache FOP, but supports definition and use of any third party processor. Default output method is set to use PDF, but PS and TXT are also configured. You may add and define any method supported by your FOP.
Use the Output Tab to specify the output path where target output files will be saved. When performing an XHTML transformation the relative path for image locations must be provided in order to ensure that image paths will be correctly resolved in order to be displayed in the output files. When using FOP this is not required as images will be embedded within the output PDF or PS. This option will therefore be disabled during FOP transformations.
The list of cascade stylesheets can be edited in the dialog opened by the button "Cascade Stylesheets".
Adds a stylesheet in the "Cascade stylesheets" list using a file browser dialog , also you can type a macro in the file name filed 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 considerd 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 "Cascade stylesheets" list.
Opens the selected stylesheet in a separate view .
Move the selected stylesheet up in the list.
Move the selected stylesheet down in the list.
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 cascade stylesheets, output file URL (the field Save As on the Output tab), image base URL, the user can use the following macros:
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 path of the user home
Use the following procedure to create a scenario.
SelectCtrl+Shift+C) to open the Configure Transformation dialog.
-> (Click the
icon to the right of the top combo box to create a copy of the current "Scenario".Double-click in the "Name" field to select the exiting text.
Type a new name.
Click
or to save the "Scenario".If one presses the Apply Transformation Scenario toolbar button, 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 him the option to associate the document with a built-in 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 in terms of two macros: ${cfd} and ${cfn}.
The option to Export Transformation Scenarios is used to store all the scenarios in a separate file , a properties file. In this file will be saved also 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'.