The only difference here is the
<xsl:for-each select="message">
this allows us to apply the transformation to any instance of a <greeting> within a <message>
So navigating to phpbuilder.php gives us the following markup to our browser:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>PHP-XML/XSL/Cocoon Transformation</title>
</head>
<body>
<p><h1>
<div align="center">This is a Dynamically Generated XML that has been Transformed using XSLT</div>
</h1></p>
<p>Hello UK</p>
<p>Hello USA</p>
<p>Hello France</p>
To summarise, we have started with a php script that writes some valid XML to a file and then
redirects to that .xml page. As it's .XML Cocoon wakes up and starts to parse it, combined
with the XSL we have browser friendly code that was Dynamically generated by PHP.
Create a new Stylesheet for WML and Cocoon will allow you to use the same php code to make a WAP freindly page =)