File:  [LON-CAPA] / loncom / xml / scripttag.pm
Revision 1.107: download - view: text, annotated - select for diffs
Tue Feb 10 18:58:26 2004 UTC (20 years, 3 months ago) by albertel
Branches: MAIN
CVS tags: HEAD
- publishing things like
  <display>&web('','','<p>'></display>
  we cause part metadata to not be generated

    1: # The LearningOnline Network with CAPA
    2: # <script> definiton
    3: #
    4: # $Id: scripttag.pm,v 1.107 2004/02/10 18:58:26 albertel Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: # 2/21 Guy
   29: # 8/20 Gerd Kortemeyer
   30: 
   31: package Apache::scripttag;
   32: 
   33: use strict;
   34: use Apache::lonnet;
   35: use Apache::style;
   36: 
   37: #Globals
   38: # this used to pass around the standard callsub arguments to a tag func
   39: # so xmlparse can reenter the inner_xmlparse loop.
   40: 
   41: @Apache::scripttag::parser_env = ();
   42: BEGIN {
   43:   &Apache::lonxml::register('Apache::scripttag',
   44: 			    ('script','scriptlib','parserlib','import',
   45: 			     'window','display','storetc','physnet',
   46: 			     'standalone','comment',
   47: 			     'LONCAPA_INTERNAL_TURN_STYLE_ON',
   48: 			     'LONCAPA_INTERNAL_TURN_STYLE_OFF',
   49: 			     'LONCAPA_INTERNAL_LONHTTPD_PORT'));
   50: }
   51: 
   52: sub start_LONCAPA_INTERNAL_TURN_STYLE_ON {
   53:     $Apache::lonxml::usestyle=1;
   54:     $Apache::lonxml::style_values='';
   55:     return ('','no');
   56: }
   57: 
   58: sub end_LONCAPA_INTERNAL_TURN_STYLE_ON {
   59:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
   60:     my $end=&Apache::lonxml::get_param('end',$parstack,$safeeval);
   61:     if (defined($end)) {
   62: 	&Apache::lonxml::end_tag($tagstack,$parstack,$token);
   63:     }
   64:     return ('','no');
   65: }
   66: 
   67: sub start_LONCAPA_INTERNAL_TURN_STYLE_OFF {
   68:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
   69:     $Apache::lonxml::usestyle=0;
   70:     my $end=&Apache::lonxml::get_param('end',$parstack,$safeeval);
   71:     if (!$end) {
   72: 	$Apache::lonxml::style_values=$$parstack[-1];
   73: 	$Apache::lonxml::style_end_values=$$parstack[-1];
   74:     } else {
   75: 	$Apache::lonxml::style_values=$Apache::lonxml::style_end_values;
   76: 	$Apache::lonxml::style_end_values='';
   77:     }
   78:     return ('','no');
   79: }
   80: 
   81: sub end_LONCAPA_INTERNAL_TURN_STYLE_OFF {
   82:     return ('','no');
   83: }
   84: 
   85: sub start_LONCAPA_INTERNAL_LONHTTPD_PORT {
   86:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
   87:     if ($target eq 'web') {
   88: 	my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'};
   89: 	if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; }
   90: 	return '<script type="text/javascript">var lonhttpdport=\''.
   91: 	    $lonhttpdPort.'\';</script>';
   92:     }
   93:     return ('','no');
   94: }
   95: 
   96: sub end_LONCAPA_INTERNAL_LONHTTPD_PORT {
   97:     return ('','no');
   98: }
   99: 
  100: sub start_script {
  101:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
  102:   @Apache::scripttag::parser_env = @_;
  103:   my $result='';
  104:   my $type= &Apache::lonxml::get_param('type',$parstack,$safeeval);
  105:   &Apache::lonxml::debug("found type of $type");
  106:   if ($type eq "loncapa/perl") {
  107:     if ( $target eq "modified" ) {
  108: 	$result=$token->[4].&Apache::edit::modifiedfield('/script',$parser);
  109:     } elsif ( $target eq 'web' || $target eq 'tex' ||
  110: 	      $target eq 'grade' || $target eq 'answer' ||
  111: 	      $target eq 'analyze' ) {
  112: 	my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser);
  113: 	if (!$Apache::lonxml::default_homework_loaded) {
  114: 	    &Apache::lonxml::default_homework_load($safeeval);
  115: 	}
  116: 	&Apache::run::run($bodytext,$safeeval);
  117: 	if (($target eq 'answer') &&
  118: 	    ($ENV{'form.answer_output_mode'} ne 'tex') &&
  119: 	    ($Apache::lonhomework::viewgrades == 'F')) {
  120: 	    $Apache::lonxml::evaluate--;
  121: 	    $result.="<script type=\"text/javascript\"> function LONCAPA_scriptvars_$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=500,height=500,scrollbars=1,resizable=yes');newWindow.document.open('text/html','replace');newWindow.document.writeln('<html><head><title>Script Vars</title></head><body bgcolor=\"#FFFFFF\"><pre>";
  122: 	    my $listing=&Apache::run::dump($target,$safeeval);
  123: 	    $listing=~s/\'/\\\'/g;
  124: 	    $listing=~s/\n/\\n/g;
  125: 	    $listing=~s/\r/\\r/g;
  126: 	    $result.=$listing;
  127: 	    $result.= "</pre></body></html>');newWindow.document.close();}</script><a href=\"javascript:LONCAPA_scriptvars_$Apache::lonxml::curdepth();void(0);\">Script Vars</a><br />";
  128: 	}
  129:     } elsif ($target eq "edit" ) {
  130:       #&Apache::run::run($bodytext,$safeeval);
  131:       #$result="<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";
  132: 	my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser);
  133: 	$result=&Apache::edit::tag_start($target,$token,'Script');
  134: 	$result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4);
  135:     } elsif ($target eq 'meta') {
  136: 	my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser);
  137:     }
  138:   } else {
  139:     if ($target ne "meta") {
  140:       $result = $token->[4];
  141:       my $bodytext=&Apache::lonxml::get_all_text_unblanaced("/script",$parser);
  142:       $result.=$bodytext;
  143:     }
  144:   }
  145:   return $result;
  146: }
  147: 
  148: sub end_script {
  149:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
  150:   if ( $target eq "meta" ) { return ''; } 
  151:   my $type = &Apache::lonxml::get_param('type',$parstack,$safeeval);
  152:   my $result='';
  153:   #other script blocks need to survive
  154:   if ($type ne "loncapa/perl") {
  155:     return $token->[2];
  156:   } elsif ($target eq 'edit' ) {
  157:     return &Apache::edit::end_table();
  158:   } elsif ($target eq 'answer') {
  159:     $Apache::lonxml::evaluate++;
  160:   }
  161:   return '';
  162: }
  163: 
  164: sub start_display {
  165:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
  166: 
  167:   my $result;
  168: 
  169:   if ( $target eq "modified" ) {
  170:       $result=$token->[4].&Apache::edit::modifiedfield("/display",$parser);
  171:   } elsif ( $target eq 'web' || $target eq 'tex' ||
  172: 	    $target eq 'grade' || $target eq 'answer' ||
  173: 	      $target eq 'analyze') {
  174:       my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser);
  175:       if (!$Apache::lonxml::default_homework_loaded) {
  176: 	  &Apache::lonxml::default_homework_load($safeeval);
  177:       }
  178:       $result=&Apache::run::run($bodytext,$safeeval);
  179:       if ($target eq 'grade' || $target eq 'answer' ||
  180: 	  $target eq 'analyze') {
  181: 	  $result=''; # grade should produce no output
  182:       }
  183:       $Apache::lonxml::post_evaluate=0;
  184:   } elsif ($target eq "edit" ) {
  185:     my $bodytext=&Apache::lonxml::get_all_text_unblanced("/display",$parser);
  186:     #$result = 
  187:     #  "<br /> &lt;$token->[1]&gt; output: <br />$bodytext<br />Source:<br />";
  188:     #$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,1);
  189:     $result=&Apache::edit::tag_start($target,$token,'Script With Display');
  190:     $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,1)
  191:   } elsif ($target eq 'meta') {
  192:       my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/display",$parser);
  193:   }
  194:   return $result;
  195: }
  196: 
  197: sub end_display {
  198:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
  199:   if ($target eq 'edit' ) { return &Apache::edit::end_table(); }
  200:   return '';
  201: }
  202: 
  203: sub start_scriptlib {
  204:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  205:   my $bodytext;
  206:   my $result ='';
  207:   my $error='';
  208: 
  209:   if ($target eq 'web' || $target eq 'tex' || $target eq 'grade' ||
  210:       $target eq 'meta' || $target eq 'edit' || $target eq 'answer' ||
  211:       $target eq 'analyze') {
  212:     $bodytext=$$parser[$#$parser]->get_text("/scriptlib");
  213:     $bodytext=&Apache::run::evaluate($bodytext,$safeeval,
  214: 				     $$parstack[$#$parstack]);
  215:     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],
  216: 					       $bodytext);
  217:     my $script=&Apache::lonnet::getfile($location);
  218:     if ($script == -1) {
  219:       if ($target eq 'edit') {
  220:         $error='</tr><tr><td>Errors</td><td colspan="2"><b> Unable to find <i>'.$location.'</i></b></td>'."\n";
  221:       } else {
  222: 	&Apache::lonxml::error("<b> Unable to find <i>$location</i> for scriptlib</b>");
  223: 	return "";
  224:       }
  225:     }
  226:     &Apache::run::run($script,$safeeval);
  227:     #&Apache::lonxml::debug("ran $bodytext:<br />".&Apache::lonnet::getfile($bodytext)."<br />");
  228:   }
  229:   if ($target eq "edit" ) {
  230:     $result=
  231:       &Apache::edit::tag_start($target,$token,'New Script Functions').
  232: 	&Apache::edit::editline($token->[1],$bodytext,'scriptlib',40).
  233:             &Apache::edit::browse(undef,'textnode').
  234: 	  $error.'</td></tr>'.
  235: 	    &Apache::edit::end_table();
  236:   }
  237:   if ($target eq "modified" ) {
  238:       $result=$token->[4].&Apache::edit::modifiedfield("/scriptlib",$parser);
  239:   }
  240:   return $result;
  241: }
  242: 
  243: sub end_scriptlib {
  244:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  245:   my @result;
  246:   if ($target eq "edit" ) { $result[1]='no'; }
  247:   return @result;
  248: }
  249: 
  250: sub start_parserlib {
  251:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  252:   my $bodytext;
  253:   my $result ="";
  254:   my $error='';
  255:   if ($target eq 'web' || $target eq 'tex' || $target eq 'grade' ||
  256:       $target eq 'meta' || $target eq 'edit' || $target eq 'answer' ||
  257:       $target eq 'analyze') {
  258:     $bodytext=$$parser[$#$parser]->get_text("/parserlib");
  259:     $bodytext=&Apache::run::evaluate($bodytext,$safeeval,
  260: 				     $$parstack[$#$parstack]);
  261:     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],
  262: 					       $bodytext);
  263:     my $styletext=&Apache::lonnet::getfile($location);
  264:     #&Apache::lonxml::debug("found :$bodytext: in :$location: with :$styletext:");
  265:     if ($styletext == -1) {
  266:       if ($target eq 'edit') {
  267: 	$error='</tr><tr><td>Errors</td><td colspan="2"><b> Unable to find <i>'.$location.'</i></b></td>'."\n";
  268:       } else {
  269: 	&Apache::lonxml::error("<b> Unable to find <i>$location</i> for parserlib</b>");
  270: 	return "";
  271:       }
  272:     }
  273:     %$style = ( %$style , &Apache::style::styleparser($target,$styletext));
  274:   }
  275:   if ($target eq "edit" ) {
  276:     $result=
  277:       &Apache::edit::tag_start($target,$token,'New Tag Definitions').
  278: 	&Apache::edit::editline($token->[1],$bodytext,'',40).
  279: 	  $error.'</td></tr>'.
  280: 	    &Apache::edit::end_table();
  281:   }
  282:   if ($target eq "modified" ) {
  283:       $result=$token->[4].&Apache::edit::modifiedfield("/parserlib",$parser);
  284:   }
  285:   return $result;
  286: }
  287: 
  288: sub end_parserlib {
  289:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  290:   my @result;
  291:   if ($target eq "edit" ) { $result[1]='no'; }
  292:   return @result;
  293: }
  294: 
  295: sub start_window {
  296:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  297:     my $result = '';
  298:     if ($target eq 'web') {
  299: 	&Apache::lonxml::startredirection;
  300:     } elsif ($target eq 'tex') {
  301: 	$result = '\unskip\footnote{';
  302:     } elsif ($target eq 'edit') {
  303: 	$result.=&Apache::edit::tag_start($target,$token);
  304: 	$result.=&Apache::edit::text_arg('Text of Link:','linktext',$token,70);
  305: 	$result.=&Apache::edit::text_arg('Height:','width',$token,5);
  306: 	$result.=&Apache::edit::text_arg('Width:','height',$token,5);
  307: 	$result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row();
  308:     } elsif ($target eq 'modified') {
  309: 	my $constructtag=&Apache::edit::get_new_args($token,$parstack,
  310: 						     $safeeval,'linttext',
  311: 						     'width','height');
  312: 	if ($constructtag) { $result=&Apache::edit::rebuild_tag($token); }
  313:     }
  314:     return $result;  
  315: }
  316: 
  317: sub end_window {
  318:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  319:   my $result;
  320:   if ($target eq 'web') {
  321:     my $output=&Apache::lonxml::endredirection;
  322:     $output =~ s/[\n\r]/ /g;
  323: #    $output = &HTML::Entities::encode($output,'<>&"\'');
  324:     $output =~ s/\'/\\\'/g;
  325:     my $linktext= &Apache::lonxml::get_param('linktext',$parstack,$safeeval);
  326:     if (!$linktext) { $linktext='<sup>*</sup>'; }
  327:     my $width= &Apache::lonxml::get_param('width',$parstack,$safeeval);
  328:     if (!$width) { $width='500'; }
  329:     my $height= &Apache::lonxml::get_param('height',$parstack,$safeeval);
  330:     if (!$height) { $height='200'; }
  331:     $result = "<script type=\"text/javascript\"> function LONCAPA_newwindow_$Apache::lonxml::curdepth() {newWindow=open('','new_W','width=$width,height=$height,scrollbars=1');newWindow.document.open('text/html','replace');newWindow.document.writeln('<html><head><title>newwindow</title></head><body bgcolor=\"#FFFFFF\"> $output </body></html>');newWindow.document.close();}</script><a href=\"javascript:LONCAPA_newwindow_$Apache::lonxml::curdepth();void(0);\">$linktext</a>";
  332:   } elsif ($target eq 'tex') {
  333:       $result = '}';
  334:   } else {
  335:       $result = '';
  336:   }
  337:   return $result; 
  338: }
  339: 
  340: sub start_import {
  341:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  342:   my $bodytext=$$parser[$#$parser]->get_text("/import");
  343:   my $result ="";
  344: 
  345:   $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]);
  346: 
  347:   if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ||
  348:       $target eq 'tex' || $target eq 'analyze' ) {
  349:     # FIXME this probably needs to be smart about construction vs.
  350:     # non construction space.
  351:     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);
  352:     my $file=&Apache::lonnet::getfile($location);
  353:     if ($file == -1) {
  354:       &Apache::lonxml::error("<b> Unable to find <i>$bodytext as $location</i> for import</b>");
  355:       return "";
  356:     }
  357: 
  358:     my $dir=$location;
  359:     $dir=~s:/[^/]*$::;
  360:     #  &Apache::lonxml::debug("directory $dir $location file $file \n<b>END</b>\n");
  361:     my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
  362:     if (!$id) { $id=$Apache::lonxml::curdepth; }
  363:     push(@Apache::inputtags::import,$id);
  364:     push(@Apache::inputtags::importlist,$id);
  365: 
  366: 	&Apache::lonxml::newparser($parser,\$file,$dir);
  367: 
  368:   } elsif ($target eq "edit" ) {
  369:     $result.=&Apache::edit::tag_start($target,$token);
  370:     $result.=&Apache::edit::editline($token->[1],$bodytext,'',40);
  371:     $result.=&Apache::edit::browse(undef,'textnode');
  372:     #FIXME this need to convert $bodytext to be a contruction space reference
  373:     #my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);
  374:     #$result.="Click<a href=\"$location\">here</a> to edit<br />"
  375:   } elsif ($target eq 'modified') {
  376:       $result=$token->[4].&Apache::edit::modifiedfield("/import",$parser);
  377:   } elsif ($target eq 'meta') {
  378:     my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
  379:     $result.='<import part="'.$Apache::inputtags::part;
  380:     if ($id) {
  381:       $result.='" id="'.$id;
  382:     }
  383:     $result.='">';
  384:     $result.=$bodytext;
  385:     $result.='</import>';
  386:   }
  387:   return $result;
  388: }
  389: 
  390: sub end_import {
  391:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  392:   pop(@Apache::inputtags::import);
  393:   my $result;
  394:   if ($target eq 'edit' ) { $result=&Apache::edit::end_table(); }
  395:   return $result;
  396: }
  397: 
  398: sub start_storetc {
  399:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  400:   my $result = '';
  401:   &Apache::lonxml::startredirection;
  402:   return $result; 
  403: }
  404: 
  405: sub end_storetc {
  406:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  407:     my $result;
  408:     my $output=&Apache::lonxml::endredirection;
  409:     $output =~ s/\"/\&quot\;/g;
  410:     $result = '{\bf '.$output.'.}}\write\tcfile{\protect\tcpc{ '.$output.'.}{\the\value{relpage}}}';
  411:     return $result;
  412: }
  413: 
  414: 
  415: sub start_physnet {
  416:     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  417:     my $bodytext = '/adm/includes/physnet.sty';
  418:     my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext);
  419:     my $cbistyletext=&Apache::lonnet::getfile($location);
  420: 
  421:     %$style = (%$style,&Apache::style::styleparser($target,$cbistyletext));
  422:     $$parser['-1']->unget_token($token);
  423: #    if ( defined($$style{'physnet'}) ) {
  424: #        &Apache::lonxml::newparser($parser,\$$style{'physnet'});
  425: #    }
  426:     return "";
  427: }
  428: 
  429: sub end_physnet {
  430:   return '';
  431: }
  432: 
  433: sub start_standalone {
  434:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  435:   my $result='';
  436:   if ($target eq 'web' ) {
  437:     if ( $ENV{'request.course.id'} ) {
  438:       my $inside = &Apache::lonxml::get_all_text("/standalone",$parser);
  439:     } else {
  440:       $result='<table bgcolor="#E1E1E1" border="2"><tr><td>';
  441:     }
  442:   }
  443:   return $result;
  444: }
  445: 
  446: sub end_standalone {
  447:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  448:   my $result='';
  449:   if ($target eq 'web' ) {
  450:     if ( $ENV{'request.course.id'} ) {
  451:     } else {
  452:       $result='</td></tr></table>';
  453:     }
  454:   }
  455:   return $result;
  456: }
  457: 
  458: sub start_comment {
  459:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
  460:   my $result='';
  461:   if ($target eq 'edit') {
  462:     $result=&Apache::edit::tag_start($target,$token);
  463:     my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser);
  464:     $result.=&Apache::edit::editfield($token->[1],$bodytext,'',80,4)
  465:   } elsif ( $target eq 'modified') {
  466:     $result=$token->[4].&Apache::edit::modifiedfield("/comment",$parser);
  467:   } elsif ( $target eq 'web' || $target eq 'tex' || $target eq 'grade' ||
  468: 	    $target eq 'answer' || $target eq 'meta' || $target eq 'analyze') {
  469:     #normally throw away comments
  470:     my $bodytext=&Apache::lonxml::get_all_text("/comment",$parser);
  471:   }
  472:   return $result;
  473: }
  474: 
  475: sub end_comment {
  476:   my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
  477:   if ($target eq 'edit' ) { return &Apache::edit::end_table(); }
  478:   return '';
  479: }
  480: 
  481: 
  482: sub xmlparse {
  483:   my ($string) = @_;
  484: #  &Apache::lonxml::debug("Got $string");
  485:   my ($target,$token,$tagstack,$parstack,$oldparser,$safeeval,$style)=
  486:     @Apache::scripttag::parser_env;
  487:   my @parser;
  488:   &Apache::lonxml::newparser(\@parser,\$string);
  489:   my $result=&Apache::lonxml::inner_xmlparse($target,$tagstack,
  490: 					     $parstack,\@parser,
  491: 					     $safeeval,$style);
  492:   return $result;
  493: }
  494: 
  495: 1;
  496: __END__

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