--- loncom/xml/style.pl 2000/06/29 14:47:59 1.1 +++ loncom/xml/style.pl 2000/06/29 19:31:09 1.2 @@ -112,10 +112,11 @@ sub styleparser { # target found if ($stoken->[0] eq 'S' and $stoken->[1] eq 'target') { # target defined via tag - if (index $stoken->[2]{dest},$target =! -1) { + if (defined $stoken->[2]{dest}) { + if (index($stoken->[2]{dest},$target) == -1) { while ($stoken = $pstyle->get_token and $stoken->[1] ne 'target') { } - } else { + } elsif (index($stoken->[2]{dest},$target) != -1) { while ($stoken = $pstyle->get_token and $stoken->[1] ne 'target') { if ($stoken->[0] eq 'T') { $current_value .= $stoken->[1]; @@ -149,7 +150,49 @@ sub styleparser { } } } - } + } + } else { + if (index($stoken->[2]{excl},$target) != -1) { + while ($stoken = $pstyle->get_token and $stoken->[1] ne 'target') { + } + } elsif (index($stoken->[2]{excl},$target) == -1) { + while ($stoken = $pstyle->get_token and $stoken->[1] ne 'target') { + if ($stoken->[0] eq 'T') { + $current_value .= $stoken->[1]; + } elsif ($stoken->[0] eq 'S') { + my $flagelem = 0; + for (my $i=$#value_style-1;$i>=0;$i=$i-2) { + if ($stoken->[1] eq $value_style[$i]) { + $flagelem = 1; + $iele = $i + 1; + last; + } + } + if ($flagelem == 0) { + $current_value .= $stoken->[4]; + } else { + $current_value .= $value_style[$iele]; + } + } elsif ($stoken->[0] eq 'E') { + my $flagelem = 0; + for (my $i=$#value_style-1;$i>=0;$i=$i-2) { + if ($stoken->[1] eq $value_style[$i]) { + $flagelem = 1; + $iele = $i + 1; + last; + } + } + if ($flagelem == 0) { + $current_value .= $stoken->[2]; + } else { + $current_value .= $value_style[$iele]; + } + } + } + } + + + } } elsif ($stoken->[1] ne $target) { #target defined via short-form tag my $tempo_token = $stoken->[1]; 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.