Datasheet
background-color: #FF33FF;
font-family: Arial;
font-size: 14pt;
}
h1 {
color: #0000FF;
font-family: Times New Roman;
font-size: 24pt;
}
When you consider that many pages across a web site will share the same CSS, and that the CSS files
will normally only be loaded by the browser on first access (subsequent page accesses will use the CSS
then stored in the browser’s cache), it’s easy to see that the reduced page bloat can result in dramatically
improved page load times— especially on large and complex pages.
The separation of style from content provided by CSS makes creating and maintaining web sites dramat-
ically easier. Changes to the look and feel of the entire site can be made simply by the modification of a
single CSS file.
XML and XPath
XML, or Extensible Markup Language, is a simple, extensible text format, primarily used for transferring
and exchanging data structures. Being text-based, it is easily human-readable and is widely used in
interfacing with web-based systems. Along with HTML, it is derived from SGML (Standard Generalized
Markup Language) and follows a similar tag-based model. XML specifications are managed by the
World Wide Web Consortium and may be found on its web site.
Each XML application is free to define its own data structures, which may then be formally described
within a DTD (document type definition) or XML schema. A discussion of these documents is beyond
the scope of this book, but again, details can be found on the W3C web site.
Creation of XML documents is very simple — here’s a sample document describing part of a book
publisher’s catalog:
<?xml version=”1.0”?>
<books>
<book>
<title>Flickr Mashups</title>
<author>David Wilkinson</author>
<isbn>0470097744</isbn>
</book>
<book>
<title>Google Maps Mashups</title>
<author>Virender Ajmani</author>
<isbn>0470097752</isbn>
</book>
<book>
<title>del.icio.us Mashups</title>
<author>Brett O’Connor</author>
<isbn>0470097760</isbn>
</book>
9
Chapter 1: Rewriting the Web
05_097748 ch01.qxp 12/14/06 5:53 PM Page 9










