Greetings. When I attempted the following script, it printed the
background images embedded in my XSL file but not the text corresponding
to the XML nodes. Yet when I embed the XSL declaration manually into my
XML file, and don't even use this script but just load the xml file into 
the browser, it works fine. So it appears to be connected to Sablotron. Is
there some process I am calling incorrectly?

Filipp Sapienza
[EMAIL PROTECTED]



<?php

// What are the XML and XSL files?
$xmlFile = "syllabus.xml";
$xslFile = "syllabus.xsl";

// Create a new processor handle
$th = @xslt_create() or die("Can't create XSLT handle!");

// Open the XML and XSL files
$xh = fopen($xmlFile, "r") or die("Can't open XML file");
$sh = fopen($xslFile, "r") or die("Can't open XSL file");

// Read in the XML and XSL contents
$xmlContent = fread($xh, filesize($xmlFile));
$xslContent = fread($sh, filesize($xslFile));

// Perform the XSL transformation
@xslt_process($xslContent, $xmlContent, $XSLtransformation);

// Output the transformed XML file
echo $XSLtransformation;

// Free up the resources
@xslt_free($th);

?>

Reply via email to