[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 29 May 2003 18:41:05 -0000


albertel		Thu May 29 14:41:05 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - end style tags need to get the parameter values for the start style tag, which is some arbitrary location in the tag stack, not -1
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.258 loncom/xml/lonxml.pm:1.259
--- loncom/xml/lonxml.pm:1.258	Wed May 28 17:05:33 2003
+++ loncom/xml/lonxml.pm	Thu May 29 14:41:04 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.258 2003/05/28 21:05:33 albertel Exp $
+# $Id: lonxml.pm,v 1.259 2003/05/29 18:41:04 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -523,6 +523,7 @@
 	      '<LONCAPA_INTERNAL_TURN_STYLE_ON />';
 	    &Apache::lonxml::newparser($pars,\$string);
 	    $Apache::lonxml::style_values=$$parstack[-1];
+	    $Apache::lonxml::style_end_values=$$parstack[-1];
 	} else {
 	  $result = &callsub("start_$token->[1]", $target, $token, $stack,
 			     $parstack, $pars, $safeeval, $style_for_target);
@@ -534,7 +535,8 @@
 	    my $string=$$style_for_target{'/'.$token->[1]}.
 	      '<LONCAPA_INTERNAL_TURN_STYLE_ON end="'.$token->[1].'" />';
 	    &Apache::lonxml::newparser($pars,\$string);
-	    $Apache::lonxml::style_values=$$parstack[-1];
+	    $Apache::lonxml::style_values=$Apache::lonxml::style_end_values;
+	    $Apache::lonxml::style_end_values='';
 	    $dontpop=1;
 	} else {
 	    #clear out any tags that didn't end