Dreamweaver CS4 Resources
|
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.
- Select File > New.
- In the Blank Page category of the New Document dialog
box, select one of the following from the Page Type column:
- 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:
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
|
|
- Save your new page (File > Save) with the
.xsl or .xslt extension (.xsl is the default).
|