--- loncom/xml/scripttag.pm 2001/11/05 22:59:33 1.56 +++ loncom/xml/scripttag.pm 2001/11/12 20:27:28 1.57 @@ -237,6 +237,9 @@ sub start_import { my $dir=$location; $dir=~s:/[^/]*$::; # &Apache::lonxml::debug("directory $dir $location file $file \nEND\n"); + my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); + if (!$id) { $id=$Apache::lonxml::curdepth; } + push(@Apache::inputtags::import,$id); &Apache::lonxml::newparser($parser,\$file,$dir); } elsif ($target eq "edit" ) { $result.=&Apache::edit::tag_start($target,$token); @@ -249,7 +252,12 @@ sub start_import { $result=&Apache::edit::modifiedfield($token); &Apache::lonxml::debug($result); } elsif ($target eq 'meta') { - $result.=''; + my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); + $result.=''; $result.=$bodytext; $result.=''; } @@ -257,6 +265,7 @@ sub start_import { } sub end_import { + pop(@Apache::inputtags::import); return ''; }