McGraw-Hill - $29.99

XML Elements of Style


XML has proven to be a revolutionary innovation, though much of it remains mysterious to the average developer. Even those who have used XML for a long time often find surprises along the way, for better or worse. At its core, XML is extremely simple; in its full-blown implementation, it can be remarkably complex. XML is capable of storing a wide variety of different kinds of information, making it difficult to describe exactly what XML does and why it's useful. It has become quite apparent that XML is useful, however.

This book hopes to present a guide to good use of XML 1.0. It will be a much easier read if you already have some experience with XML - it's designed as a tutorial and reference for those who already have a basic understanding of what XML looks like. It starts with simple structures and explores their implications, so you may be able to puzzle out XML by following along, but you'll probably be happier if you find an introductory XML book (like my own XML: A Primer or one of its many fine competitors) to get you started. If you already know a lot about XML, you may be able to skip around, but you'll get the most out of the book if you can approach the material with a reasonably fresh perspective - there are surprises throughout. You don't need to understand any SGML, however, and this book is not intended to address SGML-specific issues. Occasional notes will mention SGML, but you can ignore those without losing very much.

For the most part, this book will only cover the implications of the Extensible Markup Language (XML) 1.0 and Namespaces in XML recommendations from the W3C, and not the many supporting tools and standards for XML. While these other tools and standards are important, and discussed where necessary, this book focuses on creating useful XML documents. If your XML documents are snarled to start with, the other tools will have limited usefulness. By designing XML documents that make good use of the basic tools in XML 1.0, you'll be able to layer the other tools on top of a strong foundation in your applications.

This book will describe the many tools in the XML toolkit, their interactions, and their application to the kinds of design problems that developers and designers (who are frequently the same people) using XML commonly encounter. It will address common questions like the elements vs. attributes debate, the differences between well-formedness constraints and validity constraints, the many unresolved issues of namespaces and XML, and other advanced features (like parameter entities and notations) included in XML 1.0. It will also address some problems with processing XML in a wide variety of environments, as well as the challenges involved in making good use of its internationalization features.

One of the best 'features' of XML is that you don't really need to know all of its tools to get real work done. I've tried to structure this book so that developers can come to it from whatever skill level they may have now (assuming they've seen XML before, admittedly) and find the tools they need. Early chapters don't assume knowledge presented in the later chapters - many developers simply don't need tools presented in the later chapters, and the pointers are only there to follow if you need to. I've tried to make sure I've indicated all of the possibilities without presenting them all at once in formless jumble, though many of the chapters may be read by themselves.

Throughout the book, I've attempted to illustrate a variety of approaches to modeling information with XML 1.0. There is no single path to design nirvana - every situation has its own peculiarities, and there are often many answers to the same set of problems, even violently contradictory answers, as some of the chapters in the last section of the book will demonstrate. Hopefully, after exploring different strategies, you'll at least be able to see the problems with fresh eyes, prepared to find workable solutions. While I don't assume that this book will have the impact of Strunk & White's classic The Elements of Style has had, I hope it helps developers make the most of XML.

Table of Contents

Introduction: Designing XML Documents (omitted from book)

I. Elementary Rules of Usage

1. XML Documents: An Overview
2. Starting the Document: The Prolog (Errata)
3. Foundations: Elements, Attributes and Namespaces (Errata)
4. Documents, 'Reality,' and Modeling Models
5. Processing Models and Document Structures
6. Common Document Patterns
7. Describing Foundations: Element Type Declarations
8. Describing Foundations: Attribute List Declarations
9. Extras: Comments, Processing Instructions, and CDATA Sections
10. White Space (Errata)
11. Data Typing in XML 1.0 (Errata)

II. Elementary Principles of Composition

12. Using Character References and Built-in Entities
13. Using General Entities for Reusable Document Content
14. Using Parameter Entities for Reusable Declarations
15. Using Notations and Unparsed Entities
16. Using Conditional Sections: INCLUDE and IGNORE

III. A Few Matters of Form

17. Types of Markup: Semantic to Application-Specific
18. Planning for Transformation and Presentation
19. Building Modular DTDs
20. Leaving Room for the Future: Extensible DTDs
21. Developing for an International Audience
22. The Importance of Documentation
23. Creating Webs of Documents: XLink

IV. Tools and Features Commonly Misused

24. Integrating Namespaces with XML 1.0
25. Describing Document Types Precisely (Errata)
26. Processing Instructions: Working Outside of Content
27. Troubles with Non-validating Parsers
28. XML Processing Architectures: Trees and Streams
29. Waiting for the Future: XML Schemas and Data Typing

V. An Approach to Style

30. Seeking Consistency
31. Building on Past Works
32. Maximizing Information Quantity and Quality
33. Designing for Large-Scale Interchange
34. XML and Data Integration
35. Maximizing Flexibility: Radical Extensibility


Order XML Elements of Style from!

Order XML Elements of Style from!