Friday, December 6, 2024

Using XML Spy 4.1 Suite to Create XML Schemas

Share

Que’s book, “Special Edition: Using XML”, talks about why schemas are an important evolvement in the XML world:

“Even in its present form [Written before the final Recommendation – Ed.], XML Schema shows enormous promise. There is a flexible attribute grouping mechanism, analogous to but far more versatile than the XML DTD parameter entity declaration, the capability to declare new datatypes, an archetyping facility that allows you to create structures that visibly share their common components, and much more. Minimum and maximum values for data items can be declared, multiple schemas can be used in a single document, and the concept of schema-validity is developing rapidly.” (Page 149)

This is excellent news! However, the problem is that there are very few software to rapidly develop XML Schemas. I’m not saying that hard coding a schema is a bad thing. It is probably most important to do that several times so that you can a feel of what it is about and how it works. However, as time goes on, you might want to rapidly develop XML pages and applications. In that case, you would want to use a good program to do all the tedious work for you. The problem is that most of the schema software out there right now sucks.

XML Spy 4.1 Suite is one software that is good. Very Good. Two of the exciting new additions that Altova Inc., has added in this particular version of the suite is support for Schemas and XSL Formatting Objects (XSLFO).

XSLFO, by the way, is pretty new and, according to XML.com, not well understood. I know I’m jumping from schemas to XSLFO for a minute but I did want to clarify what XSLFO is about.

XML.com said: “Typical pagination navigation includes the use of headers and footers, page numbers and page number citations, floating constructs and footnotes, all of which are supported by XSLFO and go beyond the available presentation mechanisms available in a web browser.”

Ok, with that said, back to XML Schemas.

The fastest and smartest way to learn about creating schemas with XML Spy is to follow the tutorial which accompanies the software. The tutorial on schemas is easy to understand and do, yet covers a lot of needs of a developer.

The tutorial shows you how to create a simple schema with a namespace that describes a company and its employees. The fictitious company will have an address and the ability to have an unlimited number of people.

In creating this first schema, the tutorial shows you how to add elements and define the sequence that those elements should follow. Additionally, you can add child elements, define those elements and making them optional or not.

You will learn how to make global AddressType elements so that data can be re used. The XML Spy tutorial also shows you how to make simple and complex type definitions and how to extend the complex types. You will also learn how to define attributes and how to limit its contents.

Furthermore, with XML Spy suite you can create a schema based upon an external database file and still retaining the same table structure. The example deals with the popular Microsoft Access database but has support for all ADO and ODBC compatible databases.

Another neat thing you can do with XML Spy 4.1 is to generate an HTML or Microsoft Word document from the schema and have the relationships intact (child elements, complex types) so that you can use the hyperlinks to jump from element to element. Nice touch!

In conclusion, all these things dealing with the schema are just some of the things that you can do with the schema component of the XML Spy 4.1 Suite. With it you can work with XML, XSL, 3DML and, if you still insist, DTD documents. :o)

Good Job Altova, Inc. for a much needed winner!

Note: XML Spy Suite is 16.01 MB small and works with Windows 95/98/Me/NT/2000 and the new XP. The single user version costs 400 US bucks and is well worth it.

You can find the company and software here: http://www.xmlspy.com/

Murdok provides free highly informative newsletters for web developers, IT professionals and small business owners. We deliver 50 million email newsletters per month and have over 4,000,000 unique opt-in subscribers. From our extensive range of email newsletters we can provide you with a selection of newsletters that best meet your interests.

Table of contents

Read more

Local News