--- loncom/xml/lonxml.pm 2000/11/22 17:35:13 1.40 +++ loncom/xml/lonxml.pm 2000/12/04 22:10:23 1.41 @@ -39,9 +39,9 @@ $on_offimport = 0; sub xmlparse { my ($target,$content_file_string,$safeinit,%style_for_target) = @_; - if ($target eq 'meta') - {$Apache::lonxml::textredirection = 0; - $Apache::lonxml::on_offimport = 1; + if ($target eq 'meta') { + $Apache::lonxml::textredirection = 0; + $Apache::lonxml::on_offimport = 1; } my @pars = (); @Apache::lonxml::pwd=(); @@ -75,33 +75,33 @@ sub xmlparse { while ( $#pars > -1 ) { while ($token = $pars[$#pars]->get_token) { if ($token->[0] eq 'T') { - if ($Apache::lonxml::textredirection == 1) {$result=$token->[1];} -# $finaloutput .= &Apache::run::evaluate($token->[1],$safeeval,''); + if ($Apache::lonxml::textredirection == 1) {$result=$token->[1];} + # $finaloutput .= &Apache::run::evaluate($token->[1],$safeeval,''); } elsif ($token->[0] eq 'S') { -# if ($target eq 'meta' and $token->[2]->{metaout} eq 'ON') {$Apache::lonxml::textredirection = 1;} + # if ($target eq 'meta' and $token->[2]->{metaout} eq 'ON') {$Apache::lonxml::textredirection = 1;} # add tag to stack push (@stack,$token->[1]); # add parameters list to another stack push (@parstack,&parstring($token)); &increasedepth($token); if (exists $style_for_target{$token->[1]}) { - - if ($Apache::lonxml::redirection == 1) { - $finaloutput .= &recurse($style_for_target{$token->[1]}, - $target,$safeeval,\%style_for_target, - @parstack); - } else { - $Apache::lonxml::outputstack .= &recurse($style_for_target{$token->[1]}, - $target,$safeeval,\%style_for_target, - @parstack); - } - + + if ($Apache::lonxml::redirection == 1) { + $finaloutput .= &recurse($style_for_target{$token->[1]}, + $target,$safeeval,\%style_for_target, + @parstack); + } else { + $Apache::lonxml::outputstack .= &recurse($style_for_target{$token->[1]}, + $target,$safeeval,\%style_for_target, + @parstack); + } + } else { $result = &callsub("start_$token->[1]", $target, $token,\@parstack, - \@pars, $safeeval, \%style_for_target); + \@pars, $safeeval, \%style_for_target); } } elsif ($token->[0] eq 'E') { -# if ($target eq 'meta') {$Apache::lonxml::textredirection = 0;} + #if ($target eq 'meta') {$Apache::lonxml::textredirection = 0;} #clear out any tags that didn't end while ($token->[1] ne $stack[$#stack] && ($#stack > -1)) {pop @stack;pop @parstack;&decreasedepth($token);}