Presentation is loading. Please wait.

Presentation is loading. Please wait.

Some Notes on XSLT Eugenia Fernandez IUPUI. Transforming XML with XSLT XSLT processor converts XML document into a node tree Uses XSLT stylesheet for.

Similar presentations


Presentation on theme: "Some Notes on XSLT Eugenia Fernandez IUPUI. Transforming XML with XSLT XSLT processor converts XML document into a node tree Uses XSLT stylesheet for."— Presentation transcript:

1 Some Notes on XSLT Eugenia Fernandez IUPUI

2 Transforming XML with XSLT XSLT processor converts XML document into a node tree Uses XSLT stylesheet for instructions on what to do with these nodes Instructions are contained in templates

3 XSLT Templates Templates have two parts a node set selection (written in XPath) that identifies which nodes the template should be applied to instructions on the actual transformation i.e. what output is desired

4 Starting the Transformation The XSLT processor automatically looks for a root template which is applied to the root node The root template generally contains both literals that are output as is, and other XSLT templates that further process source nodes

5 Applying Templates instruction identifies a set of nodes and specifies that the nodes be processed at that point with the matching template can include other xsl:apply-templates This allows you to control the order in which the contents of the source document are processed and output.

6 Applying Templates: Push Document root ID My name is “Joe” My name is Joe

7 Applying Templates: Pull Document root ID Employee Name: “Joe” Employee Name: Joe ID “Joe”

8 Push Example: books2.xsl Book List,, $

9 Pull Example: books1.xsl, $

10 Push and Pull: books3.xsl Book List Book List by Title …

11 Sources Castro, E. (2001) XML for the World Wide Web, Berkeley, CA:PeachPit Press. “Practical Transformation using XSLT and Xpath”, G. Ken Holman, presentation at XML One Conference, Chicago, IL, May, 2001.


Download ppt "Some Notes on XSLT Eugenia Fernandez IUPUI. Transforming XML with XSLT XSLT processor converts XML document into a node tree Uses XSLT stylesheet for."

Similar presentations


Ads by Google