--- loncom/xml/lonxml.pm 2001/01/30 21:01:36 1.49 +++ loncom/xml/lonxml.pm 2001/02/13 00:13:47 1.50 @@ -378,12 +378,19 @@ sub handler { $request->print(''."\n"); - my $file = "/home/httpd/html".$request->uri; + my $file=&Apache::lonnet::filelocation("",$request->uri); my %mystyle; - my $result = ''; - $result = Apache::lonxml::xmlparse($target, &Apache::lonnet::getfile($file),'',%mystyle); + my $result = ''; + my $filecontents=&Apache::lonnet::getfile($file); + if ($filecontents == -1) { + &Apache::lonxml::error(" Unable to find $file"); + $filecontents=''; + } else { + $result = &Apache::lonxml::xmlparse($target,$filecontents,'',%mystyle); + } $request->print($result); + $request->print(''); $request->print(&Apache::lontexconvert::footer()); writeallows($request->uri); @@ -409,21 +416,3 @@ sub warning { 1; __END__ - - - - - - - - - - - - - - - - - -