What Is Inside This Book

This book is designed to give you as much of the whole XML story as one book can hold. We'll not only see the full XML syntaxfrom the most basic to the most advancedbut also dig into many of the ways in which XML is used.

There are hundreds of real-world topics covered in this book, like connecting XML to databasesboth locally and on Web serversstyling XML for viewing in today's browsers, reading and using XML documents in browsers, creating our own graphically based browsers, and a great deal more.

Here's a sample of some of the topics in this booknote that each of these topics themselves have many subtopics (too many to list here):

  • The complete XML syntax

  • Well- formed XML documents

  • Valid XML documents

  • Document type definitions (DTDs)

  • Namespaces

  • The XML Document Object Model (DOM)

  • Canonical XML

  • XML schemas

  • Parsing XML with JavaScript

  • XML and data binding

  • XML and Cascading Style Sheets (CSS)

  • XML and Java

  • XML and .NET

  • DOM parsers

  • SAX parsers

  • Extensible Stylesheet Language (XSL) transformations

  • XSL formatting objects

  • XLinks

  • XPointers

  • XPath

  • XBase

  • XHTML 1.0 and 1.1

  • Resource Description Framework (RDF)

  • Simple Object Access Protocol (SOAP)

  • Vector Markup Language (VML)

  • Wireless Markup Language (WML)

  • Server-side XML with JavaServer Pages (JSP), Active Server Pages (ASP), Java servlets, and Perl

This book starts with the basics. I do assume that you have some knowledge of HTML, but not necessarily much. We'll see how to create XML documents from scratch in this book, starting at the very beginning.

From there, we'll move up to see how to check the syntax of XML documents. The big attraction of XML is that you can define your own tags, like the <DOCUMENT> and <GREETING> tags in this document, which we'll see early in Chapter 1:

 <?xml version="1.0" encoding="UTF-8"?>  <DOCUMENT>     <GREETING>         Hello From XML     </GREETING>     <MESSAGE>         Welcome to the wild and woolly world of XML.     </MESSAGE> </DOCUMENT> 

Because you can create your own tags in XML, it's also important to specify the syntax you want those tags to obey (for example, can a <MESSAGE> appear inside a <GREETING> ?). XML puts a big emphasis on this, too, and there are two main ways to specify the syntax you want your XML to followwith XML document type definitions (DTDs) and XML schemas. We'll see how to create both.

And because you can make up your own tags in XML, it's also up to you to specify how they should be usedNetscape Navigator won't know, for example, that a <KILLER> tag marks a favorite book in your collection. Because it's up to you to determine what a tag actually means, handling your XML documents in programming is an important part of learning XML, despite what some second-rate XML books try to claim. The two languages I'll use in this book are JavaScript and Java; before using them, I'll introduce them in special sections with plenty of examples, so even if you're not familiar with these languages, you won't have to go anywhere else to get the skills you need.

The major browsers today are becoming more and more XML-aware, and they use scripting languages to let you work with your XML documents. We'll be using the most popular and powerful of those scripting languages here, JavaScript. Using JavaScript, we'll be able to read XML documents directly in browsers like the Microsoft Internet Explorer.

It's also important to know how to handle XML outside browsers, because there are plenty of things that JavaScript can't handle. These days, most XML development is taking place in Java, and there is an endless arsenal of Java resources available for free on the Internet. In fact, the connection between Java and XML is a natural one, as we'll see. We'll use Java to read XML documents and interpret them, starting in Chapter 11. That doesn't mean you have to be a Java expertfar from it, in factbecause I'll introduce all the Java we'll need right here in this book. And because most XML development is done in Java today, we're going to find a wealth of tools here, ready for use.

You can also design your XML documents to be displayed directly in some modern browsers, and I'll take a look at doing that in two wayswith Cascading Style Sheets (CSS) and the Extensible Stylesheet Language (XSL). Using CSS and XSL, you can indicate exactly how a tag that you make up, like <PANIC> or <BIG_AND_BOLD> or <AZURE_UNDERLINED_TEXT> , should be displayed. I'll take a look at both parts of XSLXSL transformations and formatting objectsin depth.

In addition, we'll see various other XML specifications in this book as well, such as XLinks, XBase, and XPointers, which let you point to particular items in XML documents in very specific ways. The XML specifications are made by a body called the World Wide Web Consortium, abbreviated W3C, and we'll become very familiar with those specifications here, seeing what they sayand seeing what they lack.

I'll wind up the book by taking a look at a number of the most popular uses of XML on the Internet in several chapters. XML is really a language for defining languages, and there are hundreds of such XML-based languages out there now. Some of them are gaining great popularity, and I'll cover them in some depth in this book.

There is an astonishing wealth of material on XML available on the Internet today, so I'm also going to fill this book with the URIs of dozens of those resources (in XML, you use Uniform Resource Identifiers, not URLs, although in practice they are the same thing for most purposes today). In nearly every chapter, you'll find lists of free online programs and other resources. (However, there's a hazard here that I should mentionURIs change frequently on the Internet, so don't be surprised if some of these URIs have changed by the time you look for them.)



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

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