Operation Manual

478
USING DREAMWEAVER
Displaying XML data with XSLT
Last updated 3/28/2012
5. Attach an XML data source to the page.
6. Display XML data by binding the data to the XSLT fragment or to the entire XSLT page.
7. If appropriate, add a Repeating Region XSLT object to the table or table row that contains the XML data
placeholders.
8. Insert references.
To insert a reference to the XSLT fragment in your dynamic page, use the XSL Transformation server behavior.
To insert a reference to the entire XSLT page in the dynamic page, delete all of the HTML code from a dynamic
page, and then use the XSL Transformation server behavior.
9. Post the page and the fragment.
Post both the dynamic page and the XSLT fragment (or entire XSLT page) to your application server. If you are using
a local XML file, you will need to post that as well.
10. View the dynamic page in a browser.
When you do so, the application server transforms the XML data, inserts it in the dynamic page, and displays it in the
browser.
More Help topics
Working with Dreamweaver sites” on page 34
Choosing an application server” on page 506
Using XML and XSL with web pages” on page 470
Client-side XSL transformations” on page 472
Server-side XSL transformations” on page 471
Create an XSLT page
You can create XSLT pages that let you display XML data on web pages. You can create either an entire XSLT page—
an XSLT page that contains a
<body> tag and a <head> tag—or you can create an XSLT fragment. When you create
an XSLT fragment, you create an independent file that contains no body or head tag—a simple piece of code that is
later inserted in a dynamic page.
Note: If you are starting with an existing XSLT page, you need to attach an XML data source to it.
1 Select File > New.
2 In the Blank Page category of the New Document dialog box, select one of the following from the Page Type
column:
Select XSLT (Entire page) to create an entire XSLT page.
Select XSLT (Fragment) to create an XSLT fragment.
3 Click Create and do one of the following in the Locate XML Source dialog box:
Select Attach A Local File, click the Browse button, browse to a local XML file on your computer, and click OK.
Select Attach A Remote File, enter the URL of an XML file on the Internet (such as one coming from an RSS feed),
and click OK.