Sams teach yourself XML in 24 hours [3rd ed] 2005933163, 9780672327971, 067232797X

1. Getting to know XML -- 2. Creating XML documents -- 3. Defining data with DTD schemas -- 4. Digging deeper into XML d

628 134 6MB

English Pages x, 562 pages: illustrations; 23 cm + 1 CD-ROM (4 3/4 in) [577] Year 2006

Report DMCA / Copyright

DOWNLOAD FILE

Sams teach yourself XML in 24 hours [3rd ed]
 2005933163, 9780672327971, 067232797X

Table of contents :
Cover......Page 1
Contents......Page 6
Introduction......Page 16
How This Book Is Structured......Page 17
What You’ll Need......Page 18
How to Use This Book......Page 19
Part I: XML Essentials......Page 20
HOUR 1: Getting to Know XML......Page 22
The What and Why of XML......Page 23
XML and Web Browsers......Page 28
Real-World XML......Page 30
A Quick XML Primer......Page 36
Selecting an XML Editor......Page 44
Constructing Your First XML Document......Page 47
Viewing Your XML Document......Page 50
Part II: Defining XML Data......Page 56
Creating Your Own Markup Languages......Page 58
Schemas and XML Data Modeling......Page 60
Comparing Schema Technologies......Page 64
The Importance of Document Validation......Page 65
DTD Construction Basics......Page 66
Digging Deeper into Elements......Page 70
Putting Attributes to Work......Page 76
A Complete DTD Example......Page 79
Leaving a Trail with Comments......Page 86
Characters of Text in XML......Page 87
The Wonderful World of Entities......Page 90
The Significance of Notations......Page 96
Using XML to Create an Online Radio......Page 98
Understanding Namespaces......Page 104
Naming Namespaces......Page 106
Declaring and Using Namespaces......Page 108
HOUR 6: Using SVG to Draw Scalable Graphics......Page 116
What Is SVG?......Page 117
SVG and Related Technologies......Page 118
Inside the SVG Language......Page 120
Creating an SVG Drawing......Page 121
Embedding an SVG Drawing in a Web Page......Page 139
XML Schema Construction Basics......Page 144
Working with Simple Types......Page 148
Digging into Complex Types......Page 158
Namespaces and XSD Schemas......Page 165
A Complete XML Schema Example......Page 166
RELAX NG and the Future of XML Schema......Page 169
Document Validation Revisited......Page 172
Validation Tools......Page 174
Repairing Invalid Documents......Page 180
Part III: Formatting and Displaying XML Documents......Page 186
Style Sheets and XML Formatting......Page 188
Leveraging CSS, XSLT, and XSL-FO......Page 194
Style Sheets in Action......Page 195
Getting to Know CSS......Page 204
Wiring a Style Sheet to an XML Document......Page 212
Your First CSS Style Sheet......Page 213
Inside CSS Positioning......Page 216
The Ins and Outs of Text Formatting......Page 227
Your Second Complete Style Sheet......Page 232
XSL Basics......Page 238
The Pieces and Parts of XSL......Page 241
An XSLT Primer......Page 245
Wiring an XSL Style Sheet to an XML Document......Page 251
Your First XSLT Style Sheet......Page 252
A Closer Look at XSLT......Page 260
Pattern Essentials......Page 267
Putting Expressions to Work......Page 269
A Complete XSLT Example......Page 272
Yet Another XSLT Example......Page 275
The Role of XML in iTunes......Page 286
Digging Into the iTunes Library File......Page 288
Linking to Tracks in the iTunes Store......Page 290
Building an iTunes Web Viewer......Page 293
What Is XSL-FO?......Page 302
Working with the XSL-FO Language......Page 304
Converting an XSL-FO Document to PDF......Page 312
A More Complete XSL-FO Example......Page 314
Getting to Know Google Maps......Page 320
Google Maps Customization Basics......Page 324
Brainstorming a Custom Mapping Application......Page 328
Developing a Custom Map Document......Page 330
Hacking Together a Custom Google Map......Page 332
Part IV: Processing and Managing XML Data......Page 342
What Is the DOM?......Page 344
How the DOM Works......Page 345
DOM Interfaces......Page 348
Binding XML Data to a Web Page......Page 349
Using the DOM to Access XML Data......Page 351
A Complete DOM Example......Page 357
Updating the DOM Tree......Page 359
What Is SAX?......Page 364
Obtaining a SAX Parser......Page 367
Using SAX with Java......Page 369
Inside the SAX Sample Program......Page 371
What Is XQuery?......Page 382
XML Data Querying 101......Page 383
Processing XQuery Results......Page 388
Getting to Know Saxon......Page 390
Practical XML Querying with XQuery and Saxon......Page 391
A Quick Relational Database Primer......Page 398
The World’s Shortest Guide to SQL......Page 400
Databases and XML......Page 405
Exporting an XML Document from a Database......Page 407
Accessing Data from a Database as XML......Page 409
HOUR 20: Using XML to Assist Search Engines......Page 416
Web Crawling Basics......Page 417
Getting to Know Google Sitemaps......Page 418
Inside the Google Sitemap Protocol......Page 420
Creating Your Own Sitemap......Page 423
Validating Your Sitemap......Page 425
Submitting Your Sitemap to Google......Page 427
Using an Automated Sitemap Tool......Page 429
Part V: XML’s Impact on HTML......Page 434
XHTML: A Logical Merger......Page 436
Comparing XHTML and HTML......Page 438
Creating and Validating XHTML Documents......Page 439
Migrating HTML to XHTML......Page 445
HOUR 22: Addressing and Linking XML Documents......Page 454
Understanding XPath......Page 455
Navigating a Document with XPath Patterns......Page 457
Using XPath Functions......Page 461
The Role of XPath......Page 464
HTML, XML, and Linking......Page 465
Addressing with XPointer......Page 471
Linking with XLink......Page 474
A Complete XLink Example......Page 480
HOUR 23: Going Wireless with WML and XHTML Mobile......Page 486
XML and the Wireless Web......Page 487
WML Essentials......Page 489
Creating WML Documents......Page 491
Blending WML with XHTML Mobile......Page 508
HOUR 24: Syndicating the Web with RSS News Feeds......Page 514
A Brief History of RSS......Page 515
Using an RSS News Aggregator......Page 517
Inside the RSS 2.0 Language......Page 519
Creating and Validating a News Feed......Page 522
Displaying a News Feed......Page 524
Part VI: Appendix......Page 532
General XML Resources......Page 534
XML Tools......Page 535
XML-Based Languages......Page 536
XML Specifications......Page 537
A......Page 540
B......Page 541
C......Page 542
D......Page 545
E......Page 548
F......Page 549
G......Page 550
I......Page 552
L......Page 553
M......Page 556
N......Page 557
P......Page 559
R......Page 561
S......Page 563
T......Page 567
V......Page 568
W......Page 570
X-Y-Z......Page 573

Polecaj historie