Macromedia dreamweaver 8-using dreamweaver User Manual

Page of 1030
About XML data and repeating elements
743
About XML data and repeating elements
The Repeat Region XSLT object lets you display repeating elements from an XML file within 
a page. Any region containing an XML data placeholder can be turned into a repeated region. 
However, the most common regions are a table, a table row, or a series of table rows. 
The following example illustrates how the Repeat Region XSLT object is applied to a table 
row that displays menu information for a restaurant. The initial row displays three different 
elements from the XML schema: item, description, and price. When the Repeat Region XSLT 
object is applied to the table row, and the page is processed by an application server or a 
browser, the table is repeated with unique data inserted in each new table row.
When you apply a Repeat Region XSLT object in the Document window, a thin, tabbed, gray 
outline appears around the repeated region. When you preview your work in a browser (File > 
Preview in Browser), the gray outline disappears and the selection expands to display the 
specified repeating elements in the XML file, as in the previous illustration.
You might also notice that when you add the Repeat Region XSLT object to the page, 
Dreamweaver truncates the length of the XML data placeholder in the Document window. 
This is because Dreamweaver updates the XPath for the XML data placeholder so that it is 
relative to the path of the repeating element.