Performing xsl transformationson the server – Adobe Dreamweaver CC 2015 User Manual
Page 518
511
XML
Last updated 6/3/2015
The following topics provide guidelines for helping you determine the appropriate previewing methods, based on your
needs.
Previewing pages for server-side transformations
In the case of server-side transformations, the content the site visitor ultimately sees is transformed by your application
server. When building XSLT and dynamic pages for use with server-side transformations, it is always preferable to
preview the dynamic page that contains the XSLT fragment instead of the XSLT fragment itself. In the former scenario,
you make use of the application server, which ensures that your preview is consistent with what your site visitors will
see when they visit your page. In the latter scenario, Dreamweaver performs the transformation, and could provide
slightly inconsistent results. You can use Dreamweaver to preview your XSLT fragment while you are building it, but
you’ll be able to see the most accurate results of the data rendering if you use the application server to preview your
dynamic page after you’ve inserted the XSLT fragment.
Previewing pages for client-side transformations
In the case of client-side transformations, the content the site visitor ultimately sees is transformed by a browser. You
accomplish this by adding a link from the XML file to the XSLT page. If you open the XML file in Dreamweaver and
preview it in a browser, you force the browser to load the XML file and perform the transformation. This provides you
with the same experience as that of your site visitor.
Using this approach, however, makes it more difficult to debug your page because the browser transforms the XML and
generates the HTML internally. If you select the browser’s View Source option to debug the generated HTML, you will
only see the original XML that the browser received, not the full HTML (tags, styles, and so forth) responsible for the
rendering of the page. To see the full HTML when viewing source code, you must preview the XSLT page in a browser
instead.
Previewing entire XSLT pages and XSLT fragments
When creating entire XSLT pages and XSLT fragments, you’ll want to preview your work to make sure that your data
is being displayed correctly. If you use Preview in Browser to display an entire XSLT page or an XSLT fragment,
Dreamweaver performs the transformation using a built-in transformation engine. This method gives you quick
results, and makes it easier for you to incrementally build and debug your page. It also provides a way for you to view
the full HTML (tags, styles, and so forth) by selecting the View Source option in the browser.
Note: This previewing method is commonly used when you begin building XSLT pages, regardless of whether you use the
client or the server to transform your data.
More Help topics
Display repeating XML elements
Performing XSL transformationson the server
Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the
options described in this article in Dreamweaver CC and later. For more information, see