version 1.32, 2000/11/06 14:32:35
|
version 1.34, 2000/11/06 17:03:29
|
Line 2
|
Line 2
|
# XML Parser Module |
# XML Parser Module |
# |
# |
# last modified 06/26/00 by Alexander Sakharuk |
# last modified 06/26/00 by Alexander Sakharuk |
|
# 11/6 Gerd Kortemeyer |
|
|
package Apache::lonxml; |
package Apache::lonxml; |
|
use vars |
|
qw(@pwd $outputstack $redirection $textredirection $on_offimport @extlinks); |
use strict; |
use strict; |
use HTML::TokeParser; |
use HTML::TokeParser; |
use Safe; |
use Safe; |
Line 26 use Apache::run;
|
Line 28 use Apache::run;
|
use Apache::londefdef; |
use Apache::londefdef; |
use Apache::scripttag; |
use Apache::scripttag; |
#================================================== Main subroutine: xmlparse |
#================================================== Main subroutine: xmlparse |
@Apache::lonxml::pwd=(); |
@pwd=(); |
$Apache::lonxml::outputstack = ''; |
$outputstack = ''; |
$Apache::lonxml::redirection = 1; |
$redirection = 1; |
$Apache::lonxml::textredirection = 1; |
$textredirection = 1; |
$Apache::lonxml::on_offimport = 0; |
$on_offimport = 0; |
|
@extlinks=(); |
|
|
sub xmlparse { |
sub xmlparse { |
|
|
Line 300 sub parstring {
|
Line 303 sub parstring {
|
return $temp; |
return $temp; |
} |
} |
|
|
|
sub writeallows { |
|
my $thisurl='/res/'.&Apache::lonnet::declutter(shift); |
|
my $thisdir=$thisurl; |
|
$thisdir=~s/\/[^\/]+$//; |
|
my %httpref=(); |
|
map { |
|
$httpref{'httpref.'. |
|
&Apache::lonnet::hreflocation($thisdir,$_)}=$thisurl; } @extlinks; |
|
&Apache::lonnet::appenv(%httpref); |
|
} |
|
|
sub handler { |
sub handler { |
my $request=shift; |
my $request=shift; |
|
|
Line 335 sub handler {
|
Line 349 sub handler {
|
|
|
$request->print('</body>'); |
$request->print('</body>'); |
$request->print(&Apache::lontexconvert::footer()); |
$request->print(&Apache::lontexconvert::footer()); |
|
writeallows($request->uri); |
return 'OK'; |
return 'OK'; |
} |
} |
|
|