To bring more power and flexibility to bear on the task of rendering the XML documents, we
decided to write program code in the Java language. The most obvious tools to support rendering
using Java would be either the Document Object Model (DOM) or Simple API for XML (SAX)
interface. The trouble with these tools is that they present the tree structure based solely upon the
XML document being read, instead of on the DTD. Because the DTD defines the general form of
the XML document, a tree based upon the DTD will present a clearer picture for traversing the
complex structures required for a Z schema.
Sun Microsystems’ Java Architecture for XML Binding (JAXB) seemed to offer an ideal
interface for our purposes. It generates Java program code, with a Java class for each XML
element. The developer then writes code to invoke these classes, giving the developer a view of the
entire XML file as an internal tree structure. See the section Overview of JAXB, below.
The other significant tool used is IBM’s Xeena, still in prerelease test. Xeena is an XML editor
and validator. Given a DTD while editing an XML file, it can point to where the XML file is
invalid, relative to the DTD, as well as when the XML file is not well formed. A well-formed XML
file is one that adheres to all of the general rules of XML tags and documents. A valid XML file is
well formed and also adheres to all of the rules defined in a given DTD.
Replaced/Superseded by document(s)
Many of the problems that are identified through vigorous software testing stem from incorrect
and/or ambiguous software requirement specifications. This has led to the introduction of formal
methods; mathematically based models of requirement and design specifications of software
systems. These are used to ensure system correctness for safety-critical systems, security-critical
systems and others. Z (Spivey, 2001), pronounced z G, a mathematically based formal
specification language, has been a very popular formal language for writing formal specifications
for software systems. Specifications written in Z can be formally proven consistent and correct. Z
is only one of several formal specification languages that has been used successfully one several
software development projects.