Project: XML Tools
Author: Keith Wood (kbwood@iprimus\.com\.au)
Company:
Description:
A collection of JBuilder extensions (through the OpenTools API)
that provide useful functionality related to XML files.
Currently included are:
- An 'XSLT' tab in the browser for XML file types. Here you can select
an XSLT stylesheet to apply to the current XML document (defaults to the first
stylesheet specified in the document). Apply it and see the resulting HTML,
in both view and source modes, along with the source of the XSLT template.
Different engines can be used with the basic framework by implementing the
XSLTransformer interface and updating the XML Tools properties to include
the full name of the implementing class. By default the Xalan
engine from Apache is used (
http://xml.apache.org/xalan-j/index.html).
- A 'Validate XML' menu entry in the project pane and browser popup menus.
These allow you to validate the current XML document
(based on its DOCTYPE declaration). Different parsers can be used with
the basic framework by implementing the XMLValidator interface
and updating the XML Tools properties to include the full name of the
implementing class. By default the Xerces SAX parser from Apache is used
(
http://xml.apache.org/xerces-j/index.html).
- Two 'Open' menu items, one for the DTD and the other for the stylesheet.
The files to open are extracted from the XML document.
To use these tools, just compile the project and place the classes in a
jar file, along with the classes.opentools manifest file. Copy the main
jar file (XMLTools.jar) to the JBuilder\lib\ext directory and restart JBuilder.
The tools automatically register themselves and appear when an XML file
is selected. Copy the documentation jar file (XMLToolsDoc.jar)
to the JBuilder\doc directory to have help available on request.
You also need to have the jar files for your chosen validator and
transformer on your classpath. Put these in JBuilder\lib for automatic
loading.
The XML Tools properties are accessed by right-clicking on an XML file
node in the project explorer, choosing Properties..., then selecting
the XML Tools tab. Add or delete validators and transformers, setting
one of each to be the default.
Things to do...