618543
675
Zoom out
Zoom in
Previous page
1/694
Next page
To the top
After you’ve created your XSLT page, you must link it to the XML file containing the XML data by inserting a reference to the XSLT page in the
XML file itself (much like you would insert a reference to an external CSS style sheet in the <head> section of an HTML page). Your site visitors
must view the XML file (not the XSLT page) in a browser. When your site visitors view the page, the browser performs the XSL transformation and
displays the XML data, formatted by the linked XSLT page.
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.
1. Browser requests XML file 2. Server responds by sending XML
file to browser 3. Browser reads XML directive and calls XSLT file 4. Server sends XSLT file to browser 5. Browser transforms XML data and
displays it in browser
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.
The disadvantage of performing client-side XSL transformations on XML data that comes from an external source is that the XML data is only
partially “dynamic.” The XML file that you download and alter is merely a “snapshot” of the file that lives elsewhere on the web. If the original XML
file out on the web changes, you must download the file again, link it to the XSLT page, and repost the XML file to your web server. The browser
only renders the data that it receives from the XML file on your web server, not the data contained in the original XML source file.
XML data and repeating elements
The Repeating 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 shows how the Repeating 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 Repeating 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.
668
675


Need help? Post your question in this forum.

Forumrules


Report abuse

Libble takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Product:

For example, Anti-Semitic content, racist content, or material that could result in a violent physical act.

For example, a credit card number, a personal identification number, or an unlisted home address. Note that email addresses and full names are not considered private information.

Forumrules

To achieve meaningful questions, we apply the following rules:

Register

Register getting emails for Adobe Dreamweaver CS6 at:


You will receive an email to register for one or both of the options.


Get your user manual by e-mail

Enter your email address to receive the manual of Adobe Dreamweaver CS6 in the language / languages: English as an attachment in your email.

The manual is 6,14 mb in size.

 

You will receive the manual in your email within minutes. If you have not received an email, then probably have entered the wrong email address or your mailbox is too full. In addition, it may be that your ISP may have a maximum size for emails to receive.

The manual is sent by email. Check your email

If you have not received an email with the manual within fifteen minutes, it may be that you have a entered a wrong email address or that your ISP has set a maximum size to receive email that is smaller than the size of the manual.

The email address you have provided is not correct.

Please check the email address and correct it.

Your question is posted on this page

Would you like to receive an email when new answers and questions are posted? Please enter your email address.



Info