This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Announce: PHP Class Wrapper for Sablot Extension


Steven Liu wrote a PHP 4.0 extension that adds the Sablotron XSLT engine. To that, I've contributed a PHP include file that wraps up the functionality of the Sablotron interface in a PHP 'class.'

The Sablotron Extension (Unix/Linux) is at:
http://p4lib.hk-go.to/
The PHP classes and examples are in:
http://p4lib.hk-go.to/download/php_sablot_demo_1.tar.gz
Doumentation for the PHP class files is at:
http://www.whump.com/www/phpSablot.html

Usage of the PHP class is straightforward:

<?php

include ('fileReader.inc'  );
include ('xslTransform.inc');

$transform  = new xslTransform();
$transform->setXsl("transform.xsl");
$transform->setXml("data.xml");
$transform->setParameter("foo","bar");
$transform->apply();

if($transform->getError() == 0)
{
	print $string;
}
else
{
	echo "<p class=\"warning\">",$transform->getErrorstr(),"</p>";
}

?>



-- Bill Humphries <bill@whump.com>
http://www.whump.com/moreLikeThis/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]