Attach xml data sources, Convert html pages to xslt pages – Adobe Dreamweaver CC 2015 User Manual
Page 520

513
XML
Last updated 6/3/2015
• 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.
Note: Clicking the Cancel button generates a new XSLT page with no attached XML data source.
The Bindings panel is populated with the schema of your XML data source
The following table provides an explanation of the various elements in the schema that might appear:
4
Save your new page (File > Save) with the .xsl or .xslt extension (.xsl is the default).
Convert HTML pages to XSLT pages
You can also convert existing HTML pages to XSLT pages. For example, if you have a predesigned static page to which
you want to add XML data, you can convert the page to an XSLT page, instead of creating an XSLT page and redesigning
the page from scratch.
1
Open the HTML page that you want to convert.
2
Select File > Convert > XSLT 1.0.
A copy of the page opens in the Document window. The new page is an XSL style sheet, saved with the .xsl extension.
Attach XML data sources
If you are starting with an existing XSLT page, or if you don’t attach an XML data source when creating a new XSLT
page with Dreamweaver, you must attach an XML data source using the Bindings panel.
1
In the Bindings panel (Window > Bindings), click the XML link.
Element
Represents
Details
<>
Required non-repeating XML element
An element that appears exactly once
within its parent node
<>+
Repeating XML element
An element that appears one or more
times within its parent node
<>+
Optional XML element
An element that appears zero or more
times within its parent node
Element node in boldface type
Current context element
Normally the repeating element when the
insertion point is inside a repeating region
@
XML attribute