Getting the Most Out of XML
On October 23, 2000, Peachpit Press published my latest book: XML for the World Wide Web: Visual QuickStart Guide. XML is an exciting new technology that lets you precisely label information so that you can reuse and access that information in other situations. It's a bit like a universal database format--like with HTML, any text editor on any platform can read an XML file. XML reminds me of a high-level strategy game, like chess or go: it has very simple rules that can be combined in an almost unlimited number of ways in order to solve very complicated problems. XML is not very useful on its own, however. To take full advantage of its power, you have to combine it with its core partner technologies: XML Schema, DTDs, XSLT and XPath, CSS, XLink, and XPointer, all of which are described in detail in my book.
The Beauty of XML
HTML describes the content of a Web page by enclosing pieces and sections of it in tags like <p> or <b>. There is a predefined list of these tags and browsers treat them in a particular way. (For more information, check out my best-selling book on HTML.) While the basic look of XML is very similar to HTML--with parts of a page enclosed in tags--XML actually has no predefined tags. Instead, it defines a set of syntax and grammar rules and then lets you create your own tags that can better identify the information the page contains. So if you're creating a document about endangered species, you might have tags like <animal> and <population>.
By labeling your data with such specific names, you make it possible for a person (or more likely a computer) to extract information from the XML page and then reuse it someplace else. (Imagine trying to get anything out of an HTML page just by looking at or <table> tags.) And that's the beauty of XML.
XML and its Core Helpers
XML for the World Wide Web: Visual QuickStart Guide has six separate sections: XML, DTDs, XML Schema and Namespaces, XSLT and XPath, CSS, and XLink and XPointer.
The XML section describes how to write XML itself, including the syntax and grammar. The section on DTDs explains how to limit and define the tags you've created.
The third section, XML Schema and Namespaces, describes the recently updated (as of September 22, 2000) and much more powerful schema system for defining XML elements, developed by the W3C. The section on XSLT is perhaps the most interesting, as it explains how to massage and transform the data in an XML document into practically any form you need. The CSS section explains how to format your XML data, once it's in the form you like.
Finally, the information in the last section, on XLink and XPointer, give an idea of how links and images will be supported in XML, once browsers recognize them.
Two Companion Web Sites
XML for the World Wide Web: Visual QuickStart Guide has two companion Web sites. The first is Peachpit Press' companion site, which is forthcoming. It contains the Table of Contents, all the Source code and Examples, an excerpt of one of the chapters, and more.
And you've already found the second companion Web site. It's right here at Cookwood Press. Once it's fully functional, you'll find all of the example files, as well as the Table of Contents and link to Index , an Errata page (forthcoming, and hopefully short), and much more.
Clear, Concise Instructions
Each XML topic is explained with short, clear, step-by-step instructions accompanied by two-color illustrations so you can see exactly what to do and what it will look like when you've done it. You'll never have to wade through pages and pages of filler.
Can't remember how to use an XSLT function or XML Schema command? Just look it up in the complete index, jump to the page and you're done. XML for the World Wide Web: Visual QuickStart Guide makes a great reference book even after you're familiar with the basic concepts. And if you ever have any questions that I can help you with, just drop me a line.