beautypg.com

Performing xsl transformationson the client, Creating entire xslt pages and displaying data, Link an xslt page to an xml page – Adobe Dreamweaver CC 2015 User Manual

Page 535

background image

528

XML

Last updated 6/3/2015

Performing XSL transformationson the client

Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the
options described in this article in Dreamweaver CC and later. For more information, see

this article

.

Workflow for performing client-side XSL transformations

You can perform client-side XSL transformations. Read about server-side and client-side XSL transformations and
about using XML and XSL with web pages before building pages that display XML data.

The general workflow for performing client-side XSL transformations is as follows (each step is described in other
topics):

Set up a Dreamweaver site.

Create an XSLT page or convert an HTML page to XSLT.

• In your Dreamweaver site, create an entire XSLT page.

• Convert an existing HTML page to an entire XSLT page.

Attach an XML data source to the page (if you haven’t already done so).

The XML file that you attach must reside in the same directory as the XSLT page.

Bind your XML data to the XSLT page.

Display XML data by binding the data to the entire XSLT page.

If appropriate, add a Repeating Region XSLT object to the table or table row that contains the XML data
placeholder(s).

Attach the XSLT page to the XML page.

Post both the XML page and the linked XSLT page to your web server.

View the XML page in a browser.

When you do so, the browser transforms the XML data, formats it with the XSLT page, and displays the styled page in
the browser.

Creating entire XSLT pages and displaying data

You must use an entire XSLT page for client-side transformations. (XSLT fragments don’t work for this type of
transformation.) Follow these general steps for creating, binding XML data to, and formatting XSLT pages for client-
side transformations:

Create the XSLT page.

Display data in the XSLT page.

Display repeating elements in the XSLT page.

Link an XSLT page to an XML page

After you have an entire XSLT page with dynamic content placeholders for your XML data, you must insert a reference
to the XSLT page in the XML page.