Introduction

As I stated in the preface, this is neither an introductory book nor an XML tutorial. I assume that you're familiar with the basic structure of an XML document as elements that contain text, that you know how to ask a parser to read an XML document in your language of choice, that you can attach a stylesheet to a document as necessary, and so forth.

However, I have noticed over the last few years that certain words and phrases have taken on a diverse set of meanings and are often used inconsistently. Sometimes this just confuses people, but occasionally it has led to serious process failures. Some of this has been caused by authors and trainers (embarrassingly, sometimes including the author of this book) who weren't sufficiently careful with their use of words, such as element and tag . However, some of the confusion rests with the XML working groups at the W3C who are often not consistent with each other or even within the same specification. Before we proceed with the detailed items, it is worth taking the time to define our terms carefully , making sure we agree about which words mean what as well as recognize those areas where there are genuine disagreements about the meanings of common technical terms.

Toward that end, I've prepared the following list of the most frequently confused XML terms:

  • Element versus tag

  • Attribute versus attribute value

  • Entity versus entity reference

  • Entity reference versus character reference

  • Children versus child elements versus content

  • Text versus character data versus markup

  • Namespace versus namespace name versus namespace URI

  • XML document versus XML file

  • XML application versus XML software

  • Well- formed versus valid

  • DTD versus DOCTYPE

  • XML declaration versus processing instruction

  • Character set versus character encoding

  • URI versus URI reference versus IRI

  • Schema versus the W3C XML Schema Language

Confusing these terms often causes much misunderstanding regarding how various APIs and tools work. For instance, if you think that a character reference is an entity reference, you may find yourself wondering why a SAX parser never invokes the startEntity method for character references in your documents. When you ask a question about this on a mailing list, you may not phrase your question in a way that others can understand. You might even spend several hours carefully devising a test case and filing a bug report on a feature that's operating exactly as it should.

The answers to many apparently difficult questions become almost obvious when you're careful to state exactly what you mean. Thus it behooves us to define our terms carefully.



Effective XML. 50 Specific Ways to Improve Your XML
Effective XML: 50 Specific Ways to Improve Your XML
ISBN: 0321150406
EAN: 2147483647
Year: 2002
Pages: 144

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net