Welcome...

xml spy
Welcome...

XMLSPY 5 is a comprehensive and easy-to-use product family that facilitates all aspects of XML Application Development.

Stylesheet Designer is a new approach to automate the writing of complex XSLT Stylesheets using an intuitive drag-and-drop user interface. Stylesheet Designer creates advanced electronic forms for use with Authentic Document view.

AUTHENTIC 5 Desktop Edition is a word processor type editor, supporting electronic form-based data input, graphical elements, tables, as well as real-time validation using XML Schema.

XMLSPY 5 is the industry-leading solution for XML-based application development, allowing easy creation and management of XML documents, XML schemas, as well as XSLT Stylesheets.

XMLSPY 5 includes a Tutorial that shows you how to use XMLSPY 5 for the major aspects of XML:

· XML editing & validation
· Schema/DTD editing & validation
· XSL editing & transformation

The Reference section explains each window and menu command in detail and can easily be accessed through the Contents, and Index tabs of the help file.

You may also want to periodically check our Altova web-server for news, updates, and new examples. Please note that the complete XMLSPY 5 documentation is available in printed form, and can be purchased from http://www.altova.com/bookstore in the USA or Canada. To order from other coutries please go to the Resources page and select the specific link for your region.

If you encounter an occasional error or, perhaps, some incomplete information in this online help or the printed documentation and you need help with XMLSPY 5, please don't hesitate to visit our Support Center on the Internet, where you'll find additional links to the FAQ pages as well as our online Support Form. Also, please feel free to send us any feedback regarding the new documentation.

We will also be providing periodic free updates to the online help system and the printable documentation on the Download page on our web server.

Top Next

© 2002 Altova


Introduction to XML

Introduction to XML

The eXtensible Markup Language (XML) is a subset of SGML (the Structured Generalized Markup Language) that has been defined by the World Wide Web Consortium (W3C) in 1998 (see http://www.w3.org/TR/REC-xml). Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.

The XMLSPY 5 online help and printable documentation contain a Tutorial section that give you a general overview of XML and XMLSPY 5.

To learn more about XML and its associated protocols, please also visit our list of recommended links to various XML-related information resources on the Altova web server.

We will take a short tour to discuss the various aspects of XML and the other related W3C standards, before explaining the various features of XMLSPY 5 that will help you make the most of XML.

If you are already familiar with XML, you may wish to skip to the User interface section.

Previous Top Next


What is XML

What is XML

If you are new to XML, perhaps the most confusing aspect is it's similarity to HTML, which makes XML seem familiar at first, but also tends to obscure the view for the finer details of what makes XML tick.

We will, therefore, start by looking at what XML really is and why you need XML.

The XML Specification
The W3C specification defines XML as a subset of SGML, so to properly understand XML, it is useful to take a closer look at SGML first.

SGML stands for Standard Generalized Markup Language, and was developed for large scale applications, aircraft maintenance or power plant documentation, and intended to be maintained over the long term.

The reason why XML seems to be so similar to HTML lies in the fact that HTML is defined as a subset of SGML. XML is actually a lot more similar to SGML than to HTML, because HTML is only one specific subset of SGML used to describe web pages.

As XML was created to simplify SGML, it is no wonder that the W3C has now decided to redefine HTML 4.0 as an XML application, thereby creating XHTML 1.0. But this shall be of no concern for us at the moment, because we are still faced with the fundamental question "What is XML?".

To answer this, let us define what XML is not:

· It is not a programming language.
· It is not the next generation of HTML.
· It is not a database.
· It is not specific to any horizontal or vertical market.
· It is not the solution to all your problems, but it can be a very powerful tool in building such a solution.

XML is a clearly defined way to structure, describe, and interchange data.

Data in this context really means every conceivable kind of data! You can use XML for such diverse things as describing mathematical formulas, chemical compounds, astronomical information, financial derivatives, architectural blueprints, annotating Shakespearean plays, collecting Buddhist wisdoms, or voice-processing in telephone systems!

To get a feeling for XML, let us take a look at a simple XML document:

<product>
   <name>Apple</name>
   <price>0.10</price>
</product>

The < and > angle brackets are used to distinguish between the so-called "markup" (between the brackets) and the actual data of the document (outside of the brackets).

The XML document consist of individual elements that are marked by start- and end-tags (hence the term markup). Tags contain the name of the element, so that they can be distinguished from one another more easily.

The start-tag is bracketed by < > and the end-tag by </ > - both the start- and end-tag must always occur in pairs. The example XML document contains one element called "product", which consists of two elements: "name" (which contains the data "Apple") and "price" (which contains the data "0.10"). Unlike HTML, XML does not enforce a predefined set of element names (such as "body", "h1", and "p") - you can make up your own to suit the particular needs of your data.

This simple XML document also shows a very important aspect of XML - it is "self-describing". In addition to structuring the actual data, the XML element names (sometimes also called tag names) serve to describe the information provided in the document (in our case the price of an Apple). If you compare this to the way such data is traditionally exchanged between different applications (e.g. comma-separated value or CSV files), you can easily see the benefit:

"Apple";0.10

This is even more obvious, if you look at a slightly more complicated XML example document (as shown as in the Text View of XMLSPY 5):

<invoice due="2000-09-22">
   <product>
      <name>Apple</name>
      <price>0.10</price>
   </product>
   <product>
      <name>Orange</name>
      <price>0.08</price>
   </product>
   <product>
      <name>Strawberries</name>
      <price>0.20</price>
   </product>
   <product>
      <name>Banana</name>
      <price>0.14</price>
   </product>
   <total currency="US$">0.52</total>
</invoice>

You can immediately see another crucial property of XML here: the elements can be nested in any way that is useful to show the semantic structure of the data contained, and elements can be repeated, if more than one item of data of the same kind needs to be listed. Our example now describes an invoice with four products and a total.

Also note that some elements contain additional information within the start-tag: attributes always have a name and a value and are written as name="value" (E.g. currency="US$"). Attributes are used to further specify additional information that augments the data of the element (in our example, the currency of the total).

A disadvantage of XML is that the bigger an XML document is, the more markup it contains. This can make it difficult to find the data contained in the document. This slight disadvantage is typically more than compensated by the flexibility of XML, and by the fact that XML is inherently suitable for reading by both humans and machines.

XMLSPY 5 offers a concise presentation of a XML document - called the Enhanced Grid View. This view allows you to see and directly manipulate elements in your XML document, such as the actual data it contains:

invoice1

This is the same XML document as show in the Text view above. The product names and respective prices are shown as columns of a table - just as you would expect to see in a grid view.

Editing in this view is infinitely more comfortable, since you can simply:
· drag & drop elements
· insert new rows
· copy/paste your data to and from other applications (e.g. Excel, etc.) and
· manipulate data in a graphical way that is not possible in views offered by other products

You now have a first impression of an XML document and have learned about the two most important features of XML: elements and attributes. We will explain the other concepts of XML in the tutorial when we look at the specific features offered by XMLSPY 5.

Before we continue, let us first consider the ever-important "why" question...


Why XML

Why XML

The reasons for using XML typically are as diverse as the different forms of data that exist today. We will, therefore, not consider specific benefits for certain vertical markets - such as engineering, e-commerce, mathematics, or others - but will instead try to focus on several individual properties of XML that are of universal advantage to all applications.

XML is easily readable by both humans and machines
Until now, most formats for storing data were either suitable for interpretation by software programs (e.g. dBase, GIF, etc.), or human readable (text or CSV files) - but not both.

XML defines a set of rules that make interpretation by computer very simple. It thus satisfies both needs, because XML documents remain text-based and can still be easily manipulated by a human being.

XML is object-oriented
While the relational data model is very successful for processing large amounts of table-like data, manipulation of other kinds of data - such as hypertext (i.e. text plus hyperlinks), multimedia, graphics, mathematical or chemical formulas, hierarchical information - are not so straightforward.

In contrast, XML is object-oriented in the sense of being suitable for describing objects of the real world or any abstract problem domain by modeling their properties as they are, instead of enforcing a normalized decomposition into various tables linked by relations. This makes XML documents more intuitively understandable and thereby reduces both the time required to design and implement computing systems based on XML.

XML is being widely adopted by the computer industry
One key factor in the success of the Internet was the wide adoption of the TCP/IP protocol suite by many corporations. This resulted in huge sales volumes and consequently ever decreasing prices for all network components used.

XML is widely accepted and implemented by many vendors, this fact will result in higher volumes and lower prices for software components. This is why XML's predecessor, SGML, was never successful on a broad scale. SGML products were typically priced in the ten-thousand dollar range, whereas XML products are today priced in the hundreds.

XML is global
To better understand the attention that XML has received, it is useful to recall another widely-adopted data standard that everybody takes for granted today: ASCII, the American Standard Code for Information Interchange.

While ASCII was restricted to a certain alphabet and writing system, it was still crucial in allowing different computer types and operating systems to freely exchange data. With the adoption of Unicode 1.0 and its continuing evolution. The idea of ASCII was expanded to encompass all languages and writing systems of the world.

Today, it is taken for granted that computers are capable of reading and processing text documents based on ASCII or Unicode. XML takes this approach one step further, by building on Unicode and defining a universal way to describe structured data for all different purposes.

All XML documents are per definition Unicode-based, but may be stored on disk or transmitted over the network in various different "encodings", such as ISO-8859-1 or UTF-8 . This is, why some people today call XML the "ASCII of the future".

Now that we have investigated some of the reasons why XML makes sense, we will turn to the XML "Acronym Puzzle".


The XML Standards Puzzle

The XML Standards Puzzle

In addition to XML, you will also encounter one or more of the following standards or acronyms closely associated with XML:

DTD
The "Document Type Definition" is a part of the original XML 1.0 specification that allows a developer, or standards body, to specify what elements and attributes may be used in a particular type of XML document and what their structure and nesting may be. This is also called the content model or schema of an XML document.

If an XML document conforms with the content model defined by a DTD, it is said to be valid with respect to that DTD.

XSLT
The "eXtensible Stylesheet Language Transformation" is a programming language that allows XML documents to be transformed from one schema to another or into entirely different forms, such as HTML pages, WML cards, or PDF files.

XPath
The "XML Path Language" is a language for addressing and querying the content of XML documents.

XPointer
The "XML Pointer Language" is a companion standard to Xlink and describes mechanisms for addressing particular parts of a document.

XML Schema
The "XML Schema" is an ongoing effort by the W3C to supplant DTDs with a more flexible and powerful system to describe the structure of conforming XML documents, including provisions for defining datatypes.

XHTML
The "Extensible HyperText Markup Language" is the reformulation of HTML 4.0 based upon XML and will soon supplant HTML as the de-facto standard of the Internet.

WML
The "Wireless Markup Language" is used for WAP phone systems to enable a mobile Internet environment and is entirely based on XML - it is described by one particular DTD, which is part of the WML specification.

SVG
Scalable Vector Graphics. SVG is an XML application used to describe 2D vector graphics, text and raster images. This enables vector graphics to be defined solely in XML.

SMIL
The "Synchronized Media Integration Language" is a XML document type designed to describe multimedia presentations.

DOM
The "Document Object Model" describes how some XML parsers return the information contained in an XML document. The elements of the XML document are described as nodes of a tree that can be traversed by a programmer.

SAX
The "Simple API for XML" provides another programming model used by some parsers, which is based on events instead of a traversable tree.

This list does not attempt to be a complete list of all XML-based standards, as there are new proposals emerging on an almost daily basis and many standards are very specific to a certain market or problem domain. Please feel free to visit our Home Page to learn about recommended links, news, and other XML related information.


User interface

User interface

This screen shot shows the XMLSPY 5 application window.

The Enhanced Grid View [image] is enabled, and the ipo.xml file is the active document.

The Database/Table view has been activated for the Division element. This view is available wherever the Enhanced Grid view can be activated, and can be used when editing any type of XML file - XML, XSD, XSL etc.
Clicking the "Display as Table" icon, [image] activates the Database/Table view.


XML Editing

XML Editing

This screen shot shows the main window containing a XML document, and the same document in Browser view.
Click on the Browser view icon, [image] to open the Browser view of an XML Document.

For the Browser view to display/render a XML document correctly:
· The XML Document must contain a reference to a XSL stylesheet, or
· A XSL Stylesheet has to be assigned to the to the XML folder or project.


Schema Editing

Schema Editing

This screen shot shows the main window containing an XML Schema document (XSDL - XML Schema Definition Language).
Click on the Schema Design View icon [image] to open Schema Overview. The main window then displays all Global "definitions" (elements, complex types etc.) in list form.

To see the content model in graphical form:
1. Click on the [image] icon next to the definition you want to display.
The content model for that component appears in a tree view.

To return to the Schema overview:
· Click the "Show Globals" icon [image] to return to the Schema Overview.
· Select the menu option Schema design | Display All Globals to return to the Display All Globals view.


XSL Editing

XSL Editing

This screen shot shows the main window containing a XSL (eXtensible Stylesheet Language) document, in Text view.

Clicking on the Enhanced Grid View icon, [image] displays the same XSL document in grid form.


Project Management

Project Management

XMLSPY 5 uses the familiar tree view display to manage your XML projects. Please note the Project window is not available in the Home Edition.

Project folders allow you to:
· Group XML files by their extension
· Assign XSL transformation parameters to specific folders, enabling you to view XML documents with "default" stylesheets
· Validate XML files by assigning DTDs or Schemas to specific folders.

Previous Top


.topic 10001
XMLSPY 5 is a comprehensive and easy-to-use product family that facilitates all aspects of XML Application Development.

Stylesheet Designer is a new approach to automate the writing of complex XSLT Stylesheets using an intuitive drag-and-drop user interface. Stylesheet Designer creates advanced electronic forms for use with Authentic Document view.

AUTHENTIC 5 Desktop Edition is a word processor type editor, supporting electronic form-based data input, graphical elements, tables, as well as real-time validation using XML Schema.

XMLSPY 5 is the industry-leading solution for XML-based application development, allowing easy creation and management of XML documents, XML schemas, as well as XSLT Stylesheets.

XMLSPY 5 includes a Tutorial  that shows you how to use XMLSPY 5 for the major aspects of XML:

XML editing & validation
Schema/DTD editing & validation
XSL editing & transformation

The Reference section explains each window and menu command in detail and can easily be accessed through the Contents, and Index tabs of the help file.

You may also want to periodically check our Altova web-server for news, updates, and new examples. Please note that the complete XMLSPY 5 documentation is available in printed form, and can be purchased from http://www.altova.com/bookstore in the USA or Canada. To order from other coutries please go to the Resources page and select the specific link for your region.

If you encounter an occasional error or, perhaps, some incomplete information in this online help or the printed documentation and you need help with XMLSPY 5, please don't hesitate to visit our Support Center on the Internet, where you'll find additional links to the FAQ pages as well as our online Support Form. Also, please feel free to send us any feedback regarding the new documentation.

We will also be providing periodic free updates to the online help system and the printable documentation on the Download page on our web server.

.topic 10002
The eXtensible Markup Language (XML) is a subset of SGML (the Structured Generalized Markup Language) that has been defined by the World Wide Web Consortium (W3C) in 1998 (see http://www.w3.org/TR/REC-xml). Its goal is to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML. XML has been designed for ease of implementation and for interoperability with both SGML and HTML.

The XMLSPY 5 online help and printable documentation contain a Tutorial  section that give you a general overview of XML and XMLSPY 5.

To learn more about XML and its associated protocols, please also visit our list of recommended links to various XML-related information resources on the Altova web server.

We will take a short tour to discuss the various aspects of XML and the other related W3C standards, before explaining the various features of XMLSPY 5 that will help you make the most of XML.

If you are already familiar with XML, you may wish to skip to the User interface section.

.topic 20002
This screen shot shows the main window containing a XML document, and the same document in Browser view.
Click on the Browser view icon,   to open the Browser view of an XML Document.

For the Browser view to display/render a XML document correctly:
The XML Document must contain a reference to a XSL stylesheet, or
A XSL Stylesheet has to be assigned to the to the XML folder or project.

.topic 20003
This screen shot shows the main window containing an XML Schema document (XSDL - XML Schema Definition Language).
Click on the Schema Design View icon   to open Schema Overview. The main window then displays all Global "definitions" (elements, complex types etc.) in list form.

To see the content model in graphical form:
1.	Click on the   icon next to the definition you want to display.
The content model for that component appears in a tree view.

To return to the Schema overview:
Click the "Show Globals" icon   to return to the Schema Overview.
Select the menu option Schema design | Display All Globals to return to the Display All Globals view.

.topic 20004
This screen shot shows the main window containing a XSL (eXtensible Stylesheet Language) document, in Text view.

Clicking on the Enhanced Grid View icon,   displays the same XSL document in grid form.

.topic 20005
XMLSPY 5 uses the familiar tree view display to manage your XML projects. Please note the Project  window is not available in the Home Edition.

Project folders allow you to:
Group XML files by their extension
Assign XSL transformation parameters to specific folders, enabling you to view XML documents with "default" stylesheets
Validate XML files by assigning DTDs or Schemas to specific folders.