You Are Here: Home / Building the Web / Using the PHP Sablotron Extension
Web Log | Building the Web | Photos | Everything else... | Site Index | About | Feedback
<?php
# (c) 2000, Bill Humphries
include('fileReader.inc' );
include('xslTransform.inc');
?>
<html>
<head>
<title>XSLT Demo</title>
</head>
<body>
<p>This is a demo of the PHP Sablot Extension.</p>
<?php
$sites = array(
'meerkat' => "http://www.oreillynet.com/meerkat/index.php?_fl=rss&p=562",
'writetheweb' => "http://writetheweb.com/rss.php",
'xmlhack' => "http://www.xmlhack.com/rss.php",
);
$transform = new XslTransform();
if($transform->setXsl("weblogRSS91.xsl"))
{
do {
$transform->setParameter("TITLE",key($sites));
if($transform->setXml($sites[key($sites)]))
{
$transform->apply();
if ($transform->getError() == 0)
{
echo $transform->getOutput();
}
else
{
echo "<p>",key($sites),": ",$transform->getError(),"<br>\n";
echo ": ",$transform->getErrorstr(),"</p>\n";
}
}
else
{
echo "<p>Error transforming ",key($sites),".</p>\n";
}
$transform->setError("");
} while (next($sites));
}
?>
</body>
</html>
Last modified on 10/1/00; 3:48:36 PM.
Contact WHUMP dot COM.
Copyright © 1995-2000, Bill Humphries