618543
675
Zoom out
Zoom in
Vorherige Seite
1/694
Nächste Seite
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

Brauchen Sie Hilfe? Stellen Sie Ihre Frage.

Forenregeln

Missbrauch melden von Frage und/oder Antwort

Libble nimmt den Missbrauch seiner Dienste sehr ernst. Wir setzen uns dafür ein, derartige Missbrauchsfälle gemäß den Gesetzen Ihres Heimatlandes zu behandeln. Wenn Sie eine Meldung übermitteln, überprüfen wir Ihre Informationen und ergreifen entsprechende Maßnahmen. Wir melden uns nur dann wieder bei Ihnen, wenn wir weitere Einzelheiten wissen müssen oder weitere Informationen für Sie haben.

Art des Missbrauchs:

Zum Beispiel antisemitische Inhalte, rassistische Inhalte oder Material, das zu einer Gewalttat führen könnte.

Beispielsweise eine Kreditkartennummer, persönliche Identifikationsnummer oder unveröffentlichte Privatadresse. Beachten Sie, dass E-Mail-Adressen und der vollständige Name nicht als private Informationen angesehen werden.

Forenregeln

Um zu sinnvolle Fragen zu kommen halten Sie sich bitte an folgende Spielregeln:

Neu registrieren

Registrieren auf E - Mails für Adobe Dreamweaver CS6 wenn:


Sie erhalten eine E-Mail, um sich für eine oder beide Optionen anzumelden.


Das Handbuch wird per E-Mail gesendet. Überprüfen Sie ihre E-Mail.

Wenn Sie innerhalb von 15 Minuten keine E-Mail mit dem Handbuch erhalten haben, kann es sein, dass Sie eine falsche E-Mail-Adresse eingegeben haben oder dass Ihr ISP eine maximale Größe eingestellt hat, um E-Mails zu erhalten, die kleiner als die Größe des Handbuchs sind.

Ihre Frage wurde zu diesem Forum hinzugefügt

Möchten Sie eine E-Mail erhalten, wenn neue Antworten und Fragen veröffentlicht werden? Geben Sie bitte Ihre Email-Adresse ein.



Info