|A P P E N D I X D|
The XML Export File
You can save your design as XML (the extensible markup language) by choosing this format from the Save As dialog. If you wish to know more about XML, try the following URL:
The X-Designer XML file is a description of the design and the widget hierarchy. The following information can be included in the XML description:
XML files provide a basic description which can be converted into other formats using an XML-based tool and an XSLT (extensible stylesheet transformation) stylesheet. You might wish to turn your design description into a presentation or extract help documentation from it.
Another possibility is to convert the XML into HTML capable of being displayed in a web browser. As an example of the possibilities of the XML save file format, a sample XSLT stylesheet is provided to demonstrate how to convert the exported XML into HTML. The resulting HTML file neatly formats a list of all the widgets in the design. You are given an overview of the contents of your design and any resources that you have set. You are also able to move quickly between the widgets by using the hyperlinks provided.
This section describes how to take the XML file saved from your design, convert it to HTML and display it in a web browser.
To convert the exported XML file into an HTML file ready to be displayed in a web browser, you need the following files. These are supplied with X-Designer so that you can try this for yourself and as an example of how the XML can be used:
In addition, you will need the following software:
Before you can do the conversion from XML to HTML, you need to set some path variables. The following instructions tell you how:
1. Edit transform.sh and set the CLASSPATH environment variable to include your XML and XSLT toolkits.
This will be either JAR files or package names. Documentation provided with the XML parser and XSLT engine should give you the names to use.
2. Make sure that the Java Virtual Machine is in your PATH.
To convert your exported XML file into HTML, run the following command on the command line (assuming that your file is in the current directory):
1. Run the following command from the command line (assuming that your file is in the current directory):
sh transform.sh YourXMLFile.xml
Running this command results in two new HTML files:
2. View the new HTML files by loading the general purpose index.html into your browser.
Note that only a single widgethier.html file is generated. If you started with a large X-Designer design, a very large HTML file would be produced. This may take your browser some time to load.
You can extend and modify the sample XSLT stylesheets and HTML to suit your presentation needs.