<?
        // Allocate a new XSLT processor
        $xh = xslt_create() or die('Can not do; xslt_create()');

        // Process the document

        if (!isset($argv[0]) || !eregi('^[a-z0-9_-]+$',$argv[0]))
                $file = 'netinfo1';
        else
                $file = $argv[0];

        $xml_file = 'data/'.$file.'.xml';
        $xsl_file = 'data/'.$file.'.xsl';

        if (!($result = xslt_process($xh, $xml_file, $xsl_file)))
        {
    print "Sorry, test.xml could not be transformed by test.xsl into";
    print "  result.xml the reason is that " . xslt_error($xh) . " and the ";
    print "error code is " . xslt_errno($xh);
        }
    echo $result;

        xslt_free($xh);
?>