
1109
Integrating with XML and XSLT
32
Bind data to a page by dragging an element from the Bindings panel and dropping it in the desired
place or by positioning your cursor on the page and double-clicking the selected data element in the
Bindings panel.
In addition to displaying XML data as text, you can also use it in a link. Select the text,
data, or image you want to use as a link and then, from the Property inspector’s Link
field, click the Browse for File icon. When the Select File dialog box opens, select Data Sources; the
XML data tree appears just like in the Bindings panel. Choose the data field you want to use as the
href value, typically labeled link or rss:link, and then click OK twice to close the open dialog boxes.
The XML data appears in the Link field wrapped in braces, like this: {rss:link}.
The basic code inserted by Dreamweaver for XSL data looks like this:
<xsl:value-of select=”rdf:RDF/rss:channel/rss:title”/>
where the value of the select attribute is the XPath description of where the data is located in the
XML file. Forward slashes represent parent nodes, much like folders in a URL.
Repeating XSL data
A common use of XSLT fragments is to incorporate results from an RSS feed onto the page. Gener-
ally, you would include a few heading elements, such as the main feed title and author, followed by
a series of titles, short descriptions, and links, each concerning a pa ...