Diff for /loncom/xml/lonxml.pm between versions 1.204 and 1.205

version 1.204, 2002/10/17 17:13:44 version 1.205, 2002/10/20 18:42:53
Line 60 Line 60
   
 package Apache::lonxml;   package Apache::lonxml; 
 use vars   use vars 
 qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $prevent_entity_encode);  qw(@pwd @outputstack $redirection $import @extlinks $metamode $evaluate %insertlist @namespace $prevent_entity_encode $errorcount $warningcount);
 use strict;  use strict;
 use HTML::LCParser();  use HTML::LCParser();
 use HTML::TreeBuilder();  use HTML::TreeBuilder();
Line 852  sub setup_globals { Line 852  sub setup_globals {
   my ($request,$target)=@_;    my ($request,$target)=@_;
   $Apache::lonxml::request=$request;    $Apache::lonxml::request=$request;
   $Apache::lonxml::registered = 0;    $Apache::lonxml::registered = 0;
     $errorcount=0;
     $warningcount=0;
   &init_counter();    &init_counter();
   @Apache::lonxml::pwd=();    @Apache::lonxml::pwd=();
   @Apache::lonxml::extlinks=();    @Apache::lonxml::extlinks=();
Line 1352  sub debug { Line 1354  sub debug {
 }  }
   
 sub error {  sub error {
     $errorcount++;
   if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {    if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {
     # If printing in construction space, put the error inside <pre></pre>      # If printing in construction space, put the error inside <pre></pre>
     print "<b>ERROR:</b>".join("\n",@_)."\n";      print "<b>ERROR:</b>".join("\n",@_)."\n";
Line 1377  sub error { Line 1380  sub error {
 }  }
   
 sub warning {  sub warning {
     $warningcount++;
   if ($ENV{'request.state'} eq 'construct') {    if ($ENV{'request.state'} eq 'construct') {
     print "<b>W</b>ARNING<b>:</b>".join('<br />',@_)."<br />\n";      print "<b>W</b>ARNING<b>:</b>".join('<br />',@_)."<br />\n";
   }    }

Removed from v.1.204  
changed lines
  Added in v.1.205


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>