I would like to pass the content of "./doc_test2.xml"
as an argument. How would I alter the file below to
accomplish this? Do I need to change the stylesheet as
well?

begin *.php----------------
<?php
$xml = "./doc_test.xml";
$xsl = "./doc_test.xsl";
$mydata = "./doc_test2.xml";
$arguments = array();
$arguments['mydata'] = $mydata;
ob_start();

$_parser = xslt_create();

if( !$result = @xslt_process(  $_parser,    // resource xh
                               $xml,        // string xsl
                               $xsl,
                               NULL,
                               $arguments,
                               array()
                             ) ) {
    printf( "Sablotron Error (%s): <br /><strong>%s</strong>",
            xslt_errno($_parser), xslt_error($_parser) );
}
ob_end_clean();
xslt_free($_parser);
echo $result;
?>
end *.php----------------

-- 
Bill
Amsterdam, NL

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to