Editing XML is a challenge when the code becomes anything more complex than a simple five-line document. To add to the confusion, there are XML “documents” for protocol communications, XML “documents” for the Web, and XML “documents” for content querying.

Altova is hoping that its latest release of XMLSpy will make working with XML code easier and will help the product become the premiere XML editor.

As a former program manager for earlier releases of XMLSpy, I was interested to see some of the features that have been added to the new version. XMLSpy 5 offers some significant changes, both in functionality and licensing. It also marks the split of the product line into three separate products: XMLSpy, Authentic, and Stylevision. XMLSpy is the flagship product and contains the full sweep of features. Authentic is tailored for the enterprise user, and Stylevision focuses on the Web site developer.

You can use XMLSpy to edit XML and XSL, as well as data schemas and DTDs. Figure A shows the XMLSpy 5 interface.

Figure A
XMLSpy 5 interface

Changes in 5
Unlike earlier versions, XMLSpy 5 complies with different document grammars using various DTDs and XML schemas, such as OASIS catalog. The real benefit of this minor change is that you don’t have to retrieve the reference DTDs and XML schemas yourself, because they’re packaged with the product. So when you write a WSDL document, it should be correct. Other improvements involve HTML-to-XML migration support and C++ or Java code generation from a schema. But perhaps the biggest enhancements of XMLSpy 5 are its support for Web services and for XSL and XML editing, which I will touch on later in the review. I will focus here on the new features of the XMLSpy, which includes those of Authentic and Stylevision. (When I refer to Authentic or Stylevision, it will be in the context of using XMLSpy.)

Authentic is intended for the business user who wants to manipulate XML content in a structured manner without having to resort to the low-level details of a word processor. For instance, the user should be able to create structured templates to capture information without having to rely on a programming language.

Figure B shows an example of a structured document that describes the dimensions of a plane. In a typical form application, you’d have to write explicit, value-verification scripting code. But Authentic converts XML to HTML via XSL.

Figure B
Creating structured templates

Unlike traditional XML-to-HTML conversions, the original XML information is not lost. From the HTML image, some XML is converted into an HTML table. The table’s contents can be modified to another value, even though it is an HTML table. The underlying XML schema validates the modifications. The advantage of this approach over HTML forms is that it allows structured XML documents. Authentic will either extract or save the data to an XML application server. On the server side, Authentic can communicate with any XML-compliant server. Altova can recommend specific business partners.

The Stylevision product complements Authentic by creating Authentic form content or HTML content from XML content.

Stylevision employs XSL as its transformation language, much like ASP and PHP use dynamic tags. The XSL design process can be either text- or GUI-based. Stylevision provides the middle layer between the XML application server and the client. As with its Authentic product, Altova can suggest third-party partners that provide the XML content, such as Microsoft, Oracle, and Software AG.

Spying on Web services
XMLSpy focuses on supporting Web services, but it’s not intended for the creation of Web services via programmatic language. Instead, you use XMLSpy to debug and administer Web services. For example, when you deal with other partners, you may need to exchange WSDL files. XMLSpy includes a graphical WSDL editor, shown in Figure C.

Figure C
WSDL editor

Using the graphical editor, a Web services developer can ensure the quality control aspect of Web services interoperability. My initial problem with the graphical WSDL editor was how it oriented and arranged parts of the WSDL. But once I got used to the graphics, it was okay. My advice to any new XMLSpy user is to load a number of WSDL documents and see how they’re presented.

XMLSpy also enables you to debug SOAP requests. The SOAP debugging process includes checking XML syntax and validity. This type of debugging is not that critical in an intranet scenario where both the client and server parts of the SOAP conversation are controlled. However, it becomes important when dealing with third parties or Web services interoperability.

The debugger
Another big feature of XMLSpy 5 is the integrated XSLT debugger. All I can say here is that it’s about time! XMLSpy provides a good XSLT development environment, but the previous lack of debugger slowed down the development process. Figure D shows the XSLT development environment.

Figure D
XSLT development environment and debugger

What I like about XMLSpy is that it allows you to define and view all at once the base XML document, XSLT transformation, output, breakpoints, call stack, and so on. This may not be a big deal for developers writing code in a programming language. But if you write XSL documents on a daily basis, it is a boon.

If you work with XML solely at a programmatic level, XMLSpy may be overkill for you. But if you’re looking for an XML editor that offers an intuitive interface and support for Web services, XMLSpy may be the way to go.