XSLT Template << value-of >> for-each
Wait! Stop! Hold the phone! Did you have a look at the example link at the bottom of the previous page? What happened? We have all the information contained on the XML page, we linked it to the stylesheet page, and all that prints out is a small message of text? What happened to the movie data?

ANSWER : This was to show that the stylesheet template was active and working. We can now put special XSL commands into the template that will extract and display the data stored in the XML document.

The command value-of will display information from the file at a specific point.

We will adjust the template to create a table format and show the information out of the XML data...

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="/">


<table border="1">
<td> <xsl:value-of select="list_of_movies/movie/title"/> </td>
<td> <xsl:value-of select="list_of_movies/movie/age_group"/> </td>
<td> <xsl:value-of select="list_of_movies/movie/comments"/> </td>



The command will extract the information from the path in the select value.

You can now view the XML page... XML Example 5
XSLT Template << value-of >> for-each

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads