Understanding the Technologies

Although XML is like HTML in many ways, it doesn’t have any inherent formatting capabilities. Unlike HTML, where a browser that encounters an <h1> tag displays bolder and bigger text, browsers can’t format XML tags. They need an intermediary that can read and translate XML tags and tell the browser how to format and structure the resulting page. Enter XSLT and XPath. They’re two complementary (and very complex) languages that let you define how browsers display XML tags. Fortunately, even though these languages are hard to master, Dreamweaver takes care of the entire process. All you need to know is how to use Dreamweaver’s Design view to create web pages chock-full of information from an XML file.

XPath identifies the tags and discrete sections of an XML file (see Figure 13-17). In other words, it’s like a blueprint for an XML file—it identifies its component parts.

XSLT is the magic dust that transforms an XML document into an HTML document. It’s a translator par excellence. In fact, XSLT can take a single XML file and create a document that displays properly on all kinds of products—web browsers, smart phones, printers, and so on. XSLT stands for Extensible Style Language Transformations, which is really just a geeky name for a programming language that converts XML tags—<event>Halloween Social</event>, for example—into something else, like the code a browser understands—<h1>Halloween Social</h1>. In a nutshell, that’s what Dreamweaver’s XML tools ...

Get Dreamweaver CS5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.