Download presentation
Presentation is loading. Please wait.
Published byLoren Norton Modified over 9 years ago
1
How XSL Formatter works Operation System Requirements How to format GUI for operating on Windows screen Application Integration Interface
2
Operation We explain how to operate XSL Formatter for formatting XML. As a example here, we show the way to output PDF by using XSL Formatter GUI interface. 1.Prepare XML contents. (Click the image to show the source.)
3
2.Prepare XSLT stylesheet. (Click the image to show the source.)
4
3.In the XSL Formatter GUI, click File-Open menu. Then specify two files in the Document/Stylesheet dialog. 4.Run formatter and the result will be shown in a screen. (Click the image to show entire.)
5
5.On the print menu, set printer name to Acrobat Distiller and click the print button. 6.PDF file will be created
6
System Requirements ItemRequirements Operating system Windows NT4.0/2000/XP/95/98/Me NT4.0/2000/XP is recommended. IE5.5 or later (both can be obtained free of charge) Printing function depends on Windows printer driver. Acrobat may be used to print PDF file. Direct PDF creating engine is also available as option from Antenna House, Inc. XSLT processor MSXML3.DLL
7
How to format In the previous example, XSL Formatter processed XML file and XSLT stylesheet, output the formatted result on the screen by clicking Run Formatter. This process is divided into two steps inside. First step XSL Formatter generates XSL Formatting Objects from XML file and XSLT styleheet by launching XSLT processor. Second step XSL Formatter formats the file of XSL Formatting Object.
8
Formatting Objects The contents of the file of XSL Formatting Objects generated in the first step is shown below.(Click image to show the source.) Formatting Objects is created by adding layout/ format specification to XML contents. XSL Formatter formats as it is specified.
9
Changing stylesheet We can get another formatted result from the same XML data by using another stylesheet. Let's take an example of using another stylesheet.
10
1.Prepare new XSLT stylesheet. Click the image to show the source.)
11
2.In this case, specify the same XML file and change only the file of stylesheet. Click Run Formatter.(Here, the explanation of the Open dialog is omitted.) 3.Then the formatted results appear as follows. (Click the sales slip to show entire) We can get a quite different formatted result from the same source by changing XSLT stylesheet.
12
Formatting engine and Interface Formatting engine is at the core of Antenna House XSL Formatter V2. We prepare three types of Interface program to drive this formatting engine. Graphic User Interface (GUI) for using formatting engine on standalone Windows PC. Interface for integrating user applications.
13
GUI for operating on Windows screen. You can drive formatting engine interactively on the desktop by using GUI. In other words, you can specify XML file and XSLT stylesheet file on PC Windows, run formatter, browse the formatted result on your screen. If you are satisfied with the result, you can output to printer, convert to PDF by specifying Acrobat driver. In GUI, you can browse the formatted result by specifying URL of XML file and XSLT stylesheet, downloading files from the Internet, formatting in your PC. The URL of the source file explained in the beginning of this page is as follows. If XSL Formatter is installed in your PC, you can format and display the formatted result in your PC by clicking the Open button on the File menu, by specifying URL of the source, by running formatter. Source XML file http://www.antennahouse.com/axf20/spec-img/order.xml The first XSLT stylesheet http://www.antennahouse.com/axf20/spec-img/salesnote.xsl Attention: This sample is only effective for XSL Formatter V2. If you use XSL Formatter V1.1E, this XSLT stylesheet causes error. As XSL Formatter V1.1 conforms to XSL V1.0 Candidate Recommendation 21 November, 2000, some errors may occur by using the stylesheet based on XSL V1.0 W3C Recommendation.
14
The second XSLT stylesheet http://www.antennahouse.com/axf20/spec- img/shipping.xsl Enter in the following way. Try at once. Press the Run Formatter button.
15
Application Integration Interface We provide COM Interface, Command-line Interface and JAVA Interface in order to integrate the core formatting engine of XSL Formatter V2 into your system easily. By using COM Interface, you can easily make use of the function of XSL Formatter from the languages that supports COM.
16
Example of using VBScript sample.xml is formatted using sample.xsl. Then with Acrobat PDFWriter, the formatted result will be saved to sample.pdf. dim objAXF set objAXF=CreateObject("AXFOSVR.XFOObj") objAXF.Source="C:\My Documents\XML\data\sample.xml" objAXF.Stylesheet="C:\My Documents\XML\data\sample.xsl" objAXF.Option="C:\My Documents\XML\data\option.ini " objAXF.PrinterName="Acrobat PDFWriter" objAXF.OutputFile=" C:\My Documents\XML\data\sample.pdf " objAXF.Execute() if Err.Number then MsgBox("Format Failed!", mbOKOnly) set objAXF=nothing Command-line is provided as an executable file. You can use formatting function by calling command-line from batch file or Windows API ShellExecute. Example of calling Command-line sample.xml is formatted using sample.xsl. Then with PDF Writer, the formatted result will be saved to sample.pdf. AXFOCMD -d "c:\My Documents\xml\sample.xml" -s "c:\My Documents\xml\sample.xsl" -i "c:\My Documents\xml\option.ini" -p "Acrobat PDFWriter" -o "c:\My Documents\xml\sample.pdf" Java Interface is newly added in V 2. The operating environment conforms to that of XSL Formatter. Available in the following Java environment: java version "1.4.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92) Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
17
You can use the property, method equivalent of that shown in Integration Interface and COM Interface in XSL Formatter Online Manual. Please refer to Help for more details. COM Interface, Command-line Interface and JAVA Interface are supposed to output the formatted results to printers, and cannot display the formatted results on screen. If you need a function to integrate it into applications which enable to display the formatted results on screen, contact us by e-mail. Antenna House Computer Software, Inc. Email: info@antennahouse.com info@antennahouse.com Copyright © 1996-2003 Antenna House, Inc. All rights reserved.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.