Professional XML (Programmer to Programmer)

XMLSpy from Altova GmbH is not just one tool, but an entire suite of products for working with XML in many of its forms. In addition, you can extend the capabilities of XMLSpy by adding on one or more of Altova's other products, such as Authentic (graphical XML editor for non-technical people), SchemaAgent (XML Schema repository), MapForce (data and Web services integration), and StyleVision (graphical form/report designer). These tools integrate into XMLSpy, providing additional capabilities beyond its already long list of features.

Basic Editing in Altova XMLSpy 2006

As you would expect from a tool designed for XML editing, XMLSpy has great support for editing new or existing XML documents. As with many other tools described here, you can edit XML documents in either text or a graphical view. You can access these views either via the View menu, or by selecting the appropriate item at the bottom of the editor window.

Schema Development in XMLSpy

Schema development in XMLSpy is done with either DTDs or W3C XML schema. It does not directly support Relax NG or Schematron schemas. You can, however, create these schemas using either a text editor (see Figure 2-13) or their graphical editor (see Figure 2-14). You can navigate between the two editors by selecting either the Text or Schema/WSD buttons at the bottom of the editor window, or via the View menu. A number of entry helpers are available when you are working with either mode to ensure that you generate a valid schema, including statement completion. These entry helpers change to show the valid options at each point in the document.

Figure 2-13

Figure 2-14

XSLT Development in XMLSpy

XMLSpy has strong XSLT support, including support for XSLT 2.0. In addition to the capability to create basic XSLT files, XMLSpy also has support for mapping between two XML schemas using MapForce or generating documents via XSL:FO using StyleVision. However, these features require you to have those products installed.

When generating XSLT documents, XMLSpy has an integrated debugger (see Figure 2-15), accessed by selecting Start Debugger Go from the XSL/XQuery menu. This debugger enables you to step through your XSLT file, watch for specific variables or XPath statements, and set breakpoints. These can be invaluable assists when you are trying to interpret the sometimes-Byzantine interplay between XPath, individual XSLT templates, and XML.

Figure 2-15

Other Features in XMLSpy

One potentially useful feature of XMLSpy is the inclusion of a script editor, accessed via the Switch to Scripting Environment from the Tools menu. This script editor allows you to edit and run macros to extend the environment using either VB Script or JavaScript. You can also create forms that run within XMLSpy, enabling you to add new dialogs. (See Figure 2-16.)

Figure 2-16

The following table summarizes the XML editing features in XMLSpy.

Open table as spreadsheet

Benefit

Disadvantage

Incredibly full-featured toolset for working with XML, schemas, XSLT and more.

Because of the scope, can be difficult to learn all the features.

Includes macro engine for extending the environment.

Some features require purchasing additional software.

Can be used as a code generator (C#, Java, or C++)

Does not directly support Relax NG or Schematron schemas.

Includes XSLT, XQuery and SOAP debugging.

 

Категории