Adobe 38040334 - Dreamweaver CS3 User Manual page 431

Pc
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

DREAMWEAVER CS3
424
User Guide
The relationship between the linked XSLT and XML pages is conceptually similar, yet different from the external
CSS/HTML page model. When you have an HTML page that contains content (such as text), you use an external
style sheet to format that content. The HTML page determines the content, and the external CSS code, which the
user never sees, determines the presentation. With XSLT and XML, the situation is reversed. The XML file (which
the user never sees in its raw form), determines the content while the XSLT page determines the presentation. The
XSLT page contains the tables, layout, graphics, and so forth that the standard HTML usually contains. When a user
views the XML file in a browser, the XSLT page formats the content.
When you use Dreamweaver to link an XSLT page to an XML page, Dreamweaver inserts the appropriate code for
you at the top of the XML page. If you own the XML page to which you're linking (that is, if the XML file exclusively
lives on your web server), all you need to do is use Dreamweaver to insert the appropriate code that links the two
pages. When you own the XML file, the XSL transformations performed by the client are fully dynamic. That is,
whenever you update the data in the XML file, any HTML output using the linked XSLT page will be automatically
updated with the new information.
Note: The XML and XSL files you use for client-side transformations must reside in the same directory. If they don't, the
browser will read the XML file and find the XSLT page for the transformation, but will fail to find assets (style sheets,
images, and so on) defined by relative links in the XSLT page.
If you don't own the XML page to which you're linking (for example, if you want to use XML data from an RSS feed
somewhere out on the web), the workflow is a bit more complicated. To perform client-side transformations using
XML data from an external source, you must first download the XML source file to the same directory where your
XSLT page resides. When the XML page is in your local site, you can use Dreamweaver to add the appropriate code
that links it to the XSLT page, and post both pages (the downloaded XML file and the linked XSLT page) to your web
server. When the user views the XML page in a browser, the XSLT page formats the content, just like in the previous
example.
September 4, 2007

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents