Displaying XML data in XSLT pages

Displaying XML data in XSLT pages

Once you’ve created an XSLT page and attached an XML data source, you can bind data to the page.

To display XML data:

  1. Open an XSLT page with an attached XML data source. For instructions, see Creating XSLT pages.
  2. (Optional) Select Insert > Table to add a table to the page. A table helps you organize your XML data. For more information, see Presenting Content with Tables.
  3. In the Bindings panel, select an XML element and drag it to the place on the page where you want to insert data.

    This is a picture of the feature being described.

    An XML data placeholder appears on the page. The placeholder is highlighted and in curly brackets. It uses the XPath (XML Path language) syntax to describe the hierarchical structure of the XML schema. For example, if you drag the child element "title" to the page, and that element has the parent elements "rss," "channel," and "item," then the syntax for the dynamic content placeholder will be {rss/channel/item/title}.

    Once an XML data placeholder is on the page, you can double-click it to open the XPath Expression Builder. The XPath Expression builder lets you format selected data, or select other items from the XML schema. For more information, click the Help button in the XPath Expression builder.

  4. (Optional) Apply styles to your XML data by selecting an XML data placeholder and applying styles to it like any other piece of content using the Property inspector or the CSS Styles panel. Alternatively, you can use Design-time style sheets to apply styles to XSLT fragments. Each of these methods has its own set of benefits and limitations. For more information, see Applying styles to XSLT fragments.
  5. Preview your work in a browser (File > Preview in Browser)

Related topics

  • Displaying repeating XML elements
  • Inserting XSLT fragments in dynamic pages
  • About using XML and XSL with web pages
  • Performing XSL transformations on the server


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Defining Sources of Dynamic Content
Developing Applications Rapidly