version 1.221.2.1, 2003/01/09 22:45:50
|
version 1.221.2.3, 2003/03/19 21:57:59
|
Line 693 sub inner_xmlparse {
|
Line 693 sub inner_xmlparse {
|
if ($metamode<1) { |
if ($metamode<1) { |
my $text=$token->[1]; |
my $text=$token->[1]; |
if ($token->[0] eq 'C' && $target eq 'tex') { |
if ($token->[0] eq 'C' && $target eq 'tex') { |
$text = '%'.$text."\n"; |
$text = ''; |
|
# $text = '%'.$text."\n"; |
} |
} |
$result.=$text; |
$result.=$text; |
} |
} |
Line 771 sub inner_xmlparse {
|
Line 772 sub inner_xmlparse {
|
if ($token->[0] eq 'E') { |
if ($token->[0] eq 'E') { |
&end_tag($stack,$parstack,$token); |
&end_tag($stack,$parstack,$token); |
} |
} |
} |
} |
if ($#$pars > -1) { |
if ($#$pars > -1) { |
pop @$pars; |
pop @$pars; |
pop @Apache::lonxml::pwd; |
pop @Apache::lonxml::pwd; |
Line 1113 sub store_counter {
|
Line 1114 sub store_counter {
|
sub get_all_text { |
sub get_all_text { |
my($tag,$pars)= @_; |
my($tag,$pars)= @_; |
&Apache::lonxml::debug("Got a ".ref($pars)); |
&Apache::lonxml::debug("Got a ".ref($pars)); |
|
my $gotfullstack=1; |
if (ref($pars) ne 'ARRAY') { |
if (ref($pars) ne 'ARRAY') { |
|
$gotfullstack=0; |
$pars=[$pars]; |
$pars=[$pars]; |
} |
} |
my $depth=0; |
my $depth=0; |
Line 1145 sub get_all_text {
|
Line 1148 sub get_all_text {
|
pop(@$pars); |
pop(@$pars); |
pop(@Apache::lonxml::pwd); |
pop(@Apache::lonxml::pwd); |
} |
} |
if (($depth >=0) && ($#$pars == 0) ) { $top_empty=1; } |
if (($depth >=0) && ($#$pars == 0) ) { &debug("here4");$top_empty=1; } |
|
} |
|
if ($top_empty && $depth >= 0) { |
|
#never found the end tag ran out of text, throw error send back blank |
|
&error('Never found end tag for <'.$tag.'>'); |
|
if ($gotfullstack) { |
|
my $newstring='</'.$tag.'>'.$result; |
|
&Apache::lonxml::newparser($pars,\$newstring); |
|
} |
|
$result=''; |
} |
} |
} else { |
} else { |
while ($#$pars > -1) { |
while ($#$pars > -1) { |