did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321150400

Effective XML 50 Specific Ways to Improve Your XML

by
  • ISBN13:

    9780321150400

  • ISBN10:

    0321150406

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2003-09-22
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99

Summary

Praise for Effective XML "This is an excellent collection of XML best practices: essential reading for any developer using XML. This book will help you avoid common pitfalls and ensure your XML applications remain practical and interoperable for as long as possible." -Edd Dumbill, Managing Editor, XML.com and Program Chair, XML Europe "A collection of useful advice about XML and related technologies. Well worth reading both before, during, and after XML application development." -Sean McGrath, CTO, Propylon "A book on many best practices for XML that we have been eagerly waiting for." -Akmal B. Chaudhri, Editor, IBM developerWorks "The fifty easy-to-read items cover many aspects of XML, ranging from how to use markup effectively to what schema language is best for what task. Sometimes controversial, but always relevant, Elliotte Rusty Harold's book provides best practices for working with XML that every user and implementer of XML should be aware of." -Michael Rys, Ph.D., Program Manager, SQL Server XML Technologies, Microsoft Corporation "Effective XML is an excellent book with perfect timing. Finally, an XML book everyone needs to read! Effective XML is a fount of XML best practices and solid advice. Whether you read Effective XML cover to cover or randomly one section at a time, its clear writing and insightful recommendations enlighten, entertain, educate, and ultimately improve the effectiveness of even the most expert XML developer. I'll tell you what I tell all my coworkers and customers: You need this book." -Michael Brundage, Technical Lead, XML Query Processing, Microsoft WebData XML Team "This book provides great insight for all developers who write XML software, regardless of whether the software is a trivial application-specific XML processor or a fullblown W3C XML Schema Language validator. Mr. Harold covers everything from a very important high-level terminology discussion to details about parsed XML nodes. The well-researched comparisons of currently available XML-related software products, as well as the key criteria for selecting between XML technologies, exemplify the thoroughness of this book." -Cliff Binstock, Author, The XML Schema Complete Reference If you want to become a more effective XML developer, you need this book. You will learn which tools to use when in order to write legible, extensible, maintainable and robust XML code. Page 36: How do you write DTDs that are independent of namespace prefixes? Page 82: What do parsers reliably report and what don't they? Page 130: Which schema language is the right one for your job? Page 178: Which API should you choose for maximum speed and minimum size? Page 257: What can you do to ensure fast, reliable access to DTDs and schemas without making your document less portable? Page 283: Is XML too verbose for your application?Elliotte Rusty Harold provides you with 50 practical rules of thumb based on real-world examples and best practices. His engaging writing style is easy to understand and illustrates how you can save development time while improving your XML code. Learn to write XML that is easy to edit, simple to process, and is fully interoperable with other applications and code. Understand how to design and document XML vocabularies so they are both descriptive and extensib

Author Biography

Elliotte Rusty Harold is an adjunct professor of computer science at Polytechnic University in Brooklyn, New York, where he lectures on object-oriented programming and XML. His Cafe con Leche Web site has become one of the most popular sites for information on XML. He is the author of several well-respected books, including Processing XML with Java (Addison-Wesley, 2003), XML in a Nutshell, Second Edition (O'Reilly, 2002), and XML Bible, Second Edition (Wiley, 2001).

Table of Contents

Prefacep. xi
Acknowledgmentsp. xiii
Introductionp. XV
Element versus Tagp. xvi
Attribute versus Attribute Valuep. xvii
Entity versus Entity Referencep. xvii
Entity Reference versus Character Referencep. xviii
Children versus Child Elements versus Contentp. xix
Text versus Character Data versus Markupp. xxi
Namespace versus Namespace Name versus Namespace URIp. xxii
XML Document versus XML Filep. xxii
XML Application versus XML Softwarep. xxiii
Well-Formed versus Validp. xxiii
DTD versus DOCTYPEp. xxiv
XML Declaration versus Processing Instructionp. xxv
Character Set versus Character Encodingp. xxvi
URI versus URI Reference versus IRIp. xxvii
Schemas versus the W3C XML Schema Languagep. xxvii
Syntaxp. 1
Include an XML Declarationp. 1
The version Infop. 2
The encoding Declarationp. 2
The standalone Declarationp. 3
Mark Up with ASCII if Possiblep. 5
Stay with XML 1.0p. 10
New Characters in XML Namesp. 11
C0 Control Charactersp. 13
C1 Control Charactersp. 15
NEL Used as a Line Breakp. 16
Unicode Normalizationp. 17
Undeclaring Namespace Prefixesp. 18
Use Standard Entity Referencesp. 19
Comment DTDs Liberallyp. 21
The Header Commentp. 23
Declarationsp. 26
Name Elements with Camel Casep. 29
Parameterize DTDsp. 32
Parameterizing Attributesp. 35
Parameterizing Namespacesp. 35
Full Parameterizationp. 37
Conditional Sectionsp. 39
Modularize DTDsp. 42
Distinguish Text from Markupp. 51
White Space Mattersp. 52
The xml: space Attributep. 53
Ignorable White Spacep. 54
Tags and White Spacep. 54
White Space in Attributesp. 55
Schemasp. 57
Structurep. 59
Make Structure Explicit through Markupp. 59
Tag Each Unit of Informationp. 60
Avoid Implicit Structurep. 63
Where to Stop?p. 67
Store Metadata in Attributesp. 69
Remember Mixed Contentp. 75
Allow All XML Syntaxp. 79
Build on Top of Structures, Not Syntaxp. 82
Empty-Element Tagsp. 86
CDATA Sectionsp. 87
Character and Entity Referencesp. 90
Prefer URLs to Unparsed Entities and Notationsp. 91
Use Processing Instructions for Process-Specific Contentp. 95
Style Locationp. 96
Overlapping Markupp. 98
Page Formattingp. 101
Out-of-Line Markupp. 102
Misuse of Processing Instructionsp. 103
Include All Information in the Instance Documentp. 104
Encode Binary Data Using Quoted Printable and/or Base64p. 109
Quoted Printablep. 109
Base64p. 111
Use Namespaces for Modularity and Extensibilityp. 112
Choosing a Namespace URIp. 113
Validation and Namespacesp. 116
Rely on Namespace URIs, Not Prefixesp. 117
Don't Use Namespace Prefixes in Element Content and Attribute Valuesp. 121
Reuse XHTML for Generic Narrative Contentp. 124
Choose the Right Schema Language for the Jobp. 130
The W3C XML Schema Languagep. 130
Document Type Definitionsp. 131
RELAX NGp. 133
Schematronp. 134
Java, C#, Python, and Perlp. 135
Layering Schemasp. 138
Pretend There's No Such Thing as the PSVIp. 139
Version Documents, Schemas, and Stylesheetsp. 143
Mark Up According to Meaningp. 149
Semanticsp. 155
Use Only What You Needp. 155
Always Use a Parserp. 162
Layer Functionalityp. 166
Program to Standard APIsp. 170
SAXp. 171
DOMp. 175
JDOMp. 178
Choose SAX for Computer Efficiencyp. 178
Choose DOM for Standards Supportp. 183
Read the Complete DTDp. 186
Navigate with XPathp. 192
Serialize XML with XMLp. 201
Validate Inside Your Program with Schemasp. 203
Xerces-Jp. 206
DOM Level 3 Validationp. 210
Implementationp. 213
Write in Unicodep. 213
Choosing an Encodingp. 214
A char Is Not a Characterp. 218
Normalization Formsp. 219
Sortingp. 221
Parameterize XSLT Stylesheetsp. 221
Avoid Vendor Lock-Inp. 226
Hang On to Your Relational Databasep. 230
Document Namespaces with RDDLp. 233
Naturesp. 237
Purposesp. 239
Preprocess XSLT on the Server Sidep. 241
Servlet-Based Solutionsp. 242
Apachep. 244
IISp. 245
Serve XML+CSS to the Clientp. 246
Pick the Correct MIME Media Typep. 249
Tidy Up Your HTMLp. 253
MIME Typep. 254
HTML Tidyp. 254
Older Browsersp. 255
Catalog Common Resourcesp. 257
Catalog Syntaxp. 258
Using Catalog Filesp. 259
Verify Documents with XML Digital Signaturesp. 263
Digital Signature Syntaxp. 264
Digital Signature Toolsp. 273
Hide Confidential Data with XML Encryptionp. 275
Encryption Syntaxp. 276
Encryption Toolsp. 282
Compress if Space Is a Problemp. 283
Recommended Readingp. 287
Indexp. 289
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

Learning the fundamentals of XML might take a programmer a week. Learning how to use XML effectively might take a lifetime. While many books have been written that teach developers how to use the basic syntax of XML, this is the first one that really focuses on how to use XML well. This book is not a tutorial. It is not going to teach you what a tag is or how to write a DTD. I assume you know these things. Instead it's going to tell you when, why, where, and how to use such tools effectively (and perhaps equally importantly when not to use them). This book derives directly from my own experiences teaching and writing about XML. Over the last five years. I've written several books and taught numerous introductory courses about XML syntax, APIs, and tools. Increasingly I'm finding that audiences are already familiar with the basics of XML. They know what a tag is, how to validate a document against a DTD, and how to transform a document with an XSLT style sheet. The question of what XML is and why to use it has been sufficiently well evangelized. The essential syntax and rules are reasonably well understood. However, although most developers know what a CDATA section is, they are not sure what to use one for. Although programmers know how to add attribute and child nodes to elements, they are not certain which one to use when.Since XML has become a fundamental underpinning of new software systems, it becomes important to begin asking new questions, not just what XML is, but how does one use it effectively? Which techniques work and which don't? Perhaps most importantly, which techniques appear to work at first but fail to scale as systems are further developed? When I teach programming at my university, one of the first things I tell my students is that it is not enough to write programs that compile and produce the expected results. It is as important (perhaps more important) to write code that is extensible, legible, and maintainable. XML can be used to produce robust, extensible, maintainable, comprehensible systems or it can be used to create masses of unmaintainable, illegible, fragile, closed code. In the immortal words of Eric Clapton, "It's in the way that you use it." XML is not a programming language. It is a markup language; but it is being successfully used by many programmers. There have been markup languages before, but in the developer community XML is far and away the most successful. However, the newness and unfamiliarity of markup languages have meant that many developers are using it less effectively than they could. Many programmers are hacking together systems that work, but are not as robust, extensible, or portable as XML promises. This is to be expected. Programmers working with XML are pioneers exploring new territory, opening up new vistas in software, and accomplishing things that could not easily be accomplished just a few years ago. However one definition of a pioneer is someone with an arrow in their back, and more than a few XML pioneers have returned from the frontier with arrows in their backs.Five years after the initial release of XML into the world, certain patterns and antipatterns for the proper design of XML applications are becoming apparent. All of us in the XML community have made mistakes while exploring this new territory, the author of this book prominently among them. However, we've learned from those mistakes, and we're beginning to develop some principles that may help those who follow in our footsteps to avoid making the same mistakes we did. It is time to put up some caution signs in the road. We may not exactly say "Here there be dragons", but we can at least say, "That road is a lot rockier than it looks at first glance, and you might really want to take this slightly less obvious but much smoother path off to the left."This book is divided into four parts beginning with the lowest layer of XML and gradually working up to the highest: Part I

Rewards Program