--- loncom/xml/londefdef.pm 2001/03/27 17:50:38 1.26 +++ loncom/xml/londefdef.pm 2001/06/02 03:59:59 1.30 @@ -2,7 +2,7 @@ # Tags Default Definition Module # # last modified 06/26/00 by Alexander Sakharuk -# 11/6,11/30,02/01/01 Gerd Kortemeyer +# 11/6,11/30,02/01/01,5/4 Gerd Kortemeyer package Apache::londefdef; @@ -29,7 +29,7 @@ sub end_output { } #-- tag sub start_m { - my ($target,$token,$parstack,$parser) = @_; + my ($target,$token,$tagstack,$parstack,$parser) = @_; my $currentstring = ''; if ($target eq 'web') { my $inside = &Apache::lonxml::get_all_text("/m",$$parser[$#$parser]); @@ -58,7 +58,8 @@ sub end_output { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = $token->[4]; + $currentstring = &Apache::lonxml::xmlbegin(). + &Apache::lonxml::fontsettings(); } return $currentstring; } @@ -66,7 +67,7 @@ sub end_output { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = $token->[2]; + $currentstring = &Apache::lonxml::xmlend(); } return $currentstring; } @@ -83,7 +84,8 @@ sub end_output { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = $token->[2]; + $currentstring = &Apache::lonxml::registerurl(). + $token->[2]; } return $currentstring; } @@ -217,7 +219,7 @@ sub end_output { } #-------------------------------------------------------------------------- tag sub start_meta { - my ($target,$token,$parstack,$parser) = @_; + my ($target,$token,$tagstack,$parstack,$parser) = @_; my $currentstring = ''; if ($target eq 'web') { my $args=''; @@ -243,7 +245,7 @@ sub end_output { return $currentstring; } sub end_meta { - my ($target,$token) = @_; + my ($target,$token,$tagstack,$parstack,$parser) = @_; my $currentstring = ''; if ($target eq 'web') { my $args=''; @@ -259,8 +261,15 @@ sub end_output { my ($target,$token) = @_; my $currentstring = ''; if ($target eq 'web') { - $currentstring = $token->[4]; - } elsif ($target eq 'tex') { + $token->[2]->{'onLoad'}.=&Apache::lonxml::loadevents(); + $token->[2]->{'onUnload'}.=&Apache::lonxml::unloadevents(); + + $currentstring = '<'.$token->[1]; + map { + $currentstring.=' '.$_.'="'.$token->[2]->{$_}.'"'; + } keys %{$token->[2]}; + $currentstring.='>'; + } elsif ($target eq 'tex') { $currentstring = " \\begin{document} "; } return $currentstring; @@ -949,7 +958,7 @@ sub end_output { return $currentstring; } sub end_a { - my ($target,$token,$stackref) = @_; + my ($target,$token,$tagstack,$stackref) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring .= $token->[2]; @@ -967,7 +976,7 @@ sub end_output { } #----------------------------------------------------------------------------
  • tag sub start_li { - my ($target,$token,$stackref) = @_; + my ($target,$token,$tagstack,$stackref) = @_; my $currentstring = ''; if ($target eq 'web') { $currentstring = $token->[4];