To my wife Hope, for loving me anyway.
To my three pups: big quiet Kafka, little rascal Marlowe, and for regal Vladimir, who passed away the day after I finished .
Preface
Off and on, I run a workshop called XML for Mere Mortals. The title attracts an audience thats much wider than your typical Web developer needing to bone up on the subject. I train technical writers, project managers, database geekseven the occasional business owner whos trying to get a handle on the exciting possibilities of XML.
If I had to give this book a subtitle, it would be, XML for Mere Mortals, because every time I sat down to write a chapter, I tried to picture the kind of folks who show up at my workshopsintelligent and curious, with a wide range of technical proficiency, but all of them feeling a little overwhelmed by the terminology, processes, and technologies surrounding XML. With any luck, this approach will serve you well.
This book has two goals: to introduce readers to a large part of the XML world, and to walk them, step by step, through the creation of an XML-powered Website. Lets talk about each of those goals in more detail.
If we were to take the time to introduce you to the entire spectrum of XML technologies, it would take a book twice (or thrice) as big as the one youre currently holding. Theres a lot to talk about when you start looking at XML, so I had to pick my battles. For instance, youll notice that we discuss DTDs, but not XML Schemas. We talk a lot about XPath, but we dont cover XQuery or XLink. The idea of this title is to get your feet (and perhaps your ankles, shins, and knees) wet in the topic of XML, and to make you feel comfortable to go out and learn even more.
The second goal involves building your own XML-powered Website. I build both XML- and database-powered dynamic Websites for a living, and I tried to pour as much as I know about the process into the limited space available. As we work to build the project thats developed through the course of this book, Ill take you through the requirements gathering and analysis phases, then show you how to convert that information into real XML documents and working code. Yes, we are building a content management system, but a simplified one without the heavy workflow or other capabilities you see in other systems. Nevertheless, what youll end up with is a simple, powerful system that can get a Website up and running quickly.
Every time I teach a class or workshop, I feel that I learn as much from my students as they learn from methat, in fact, I learn more as I continue to teach. Writing this book was very much like that, because it forced me to organize my thoughts and approaches into a more coherent fashion.
I hope you find the book a useful introduction to the incredibly fascinating topic of XML. I know that many experts wont agree with the approaches I took here, and Id like to say that I can understand all your disagreements, but writing a book for the novice requires that the concepts be presented from a slightly different perspective. If you wish to provide me with feedback, or you have any questions, feel free to drop me a line: .
Who Should Read this Book?
This book is intended for the XML beginner. You should have some working knowledge of the Web, including HTML and some JavaScript skills, and experience with a server-side programming language.
In this book, we use PHP 5 on the server side, and Ill assume that you have had some exposure to PHP. However, I always try to explain whats going on, particularly as I work with XML concepts with which you may have little or no past experience.