--- loncom/xml/lonxml.pm 2003/09/27 04:08:56 1.281 +++ loncom/xml/lonxml.pm 2003/10/01 21:13:50 1.282 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.281 2003/09/27 04:08:56 albertel Exp $ +# $Id: lonxml.pm,v 1.282 2003/10/01 21:13:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -163,6 +163,9 @@ $Apache::lonxml::style_end_values=''; #array of ssi calls that need to occur after we are done parsing @Apache::lonxml::ssi_info=(); +#should we do the postag variable interpolation +$Apache::lonxml::post_evaluate=1; + sub xmlbegin { my $output=''; if ($ENV{'browser.mathml'}) { @@ -477,7 +480,7 @@ sub inner_xmlparse { &Apache::lonxml::error("Unknown token event :$token->[0]:$token->[1]:"); } #evaluate variable refs in result - if ($result ne "") { + if ($Apache::lonxml::post_evaluate &&$result ne "") { my $extras; if (!$Apache::lonxml::usestyle) { $extras=$Apache::lonxml::style_values; @@ -488,6 +491,8 @@ sub inner_xmlparse { $result= &Apache::run::evaluate($result,$safeeval,$extras); } } + $Apache::lonxml::post_evaluate=1; + if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) { #Style file definitions should be correct if ($target eq 'tex' && ($Apache::lonxml::usestyle)) { @@ -608,6 +613,7 @@ sub setup_globals { @Apache::lonxml::pwd=(); @Apache::lonxml::extlinks=(); @Apache::lonxml::ssi_info=(); + $Apache::lonxml::post_evaluate=1; if ($target eq 'meta') { $Apache::lonxml::redirection = 0; $Apache::lonxml::metamode = 1;