MM_XSLTransform error in PHP page
Posted by: Tolana
Posted on: 2006-09-11 08:25:00
I am new to creating dynamic pages that "consume" an RSS feed, so I'm not sure if my problem here is in the XML or if it's a compatibility problem with DH's PHP.
Here's what I'm trying to do:
In Dreamweaver, I've created an XSLT fragment (http://www.cnualert.info/noaa-alerts.xsl) to process the feed at http://www.weather.gov/alerts/wwarssget.php?zone=VAZ094. Dreamweaver's preview on my PC retrieves the headlines just fine. However, placing the retrieval code in a PHP page at DH returns an error: "MM_XSLTransform error.
Error opening http://www.weather.gov/alerts/wwarssget.php?zone=VAZ094."
I have a test page at http://www.cnualert.info/index2.php if you want to see the error.
I can't find any troubleshooting from Dreamweaver that fixes the problem, which is why I'm wondering if I'm doing something wrong in relation to PHP.
The code in index2.php as Dreamweaver wrote it is:
- before <html> is:
<?php
//XMLXSL Transformation class
require_once('includes/MM_XSLTransform/MM_XSLTransform.class.php');
?>
- in the page is:
<?php
$mm_xsl = new MM_XSLTransform();
$mm_xsl->setXML("http://www.weather.gov/alerts/wwarssget.php?zone=VAZ094");
$mm_xsl->setXSL("noaa-alerts.xsl");
echo $mm_xsl->Transform();
?>
Before you ask, all the files referenced above do exist. :-)
Any help would be appreciated!