--- loncom/xml/lonxml.pm 2001/01/12 20:38:05 1.48
+++ loncom/xml/lonxml.pm 2001/05/04 17:33:35 1.70
@@ -4,10 +4,12 @@
# last modified 06/26/00 by Alexander Sakharuk
# 11/6 Gerd Kortemeyer
# 6/1/1 Gerd Kortemeyer
+# 2/21,3/13 Guy
+# 3/29,5/4 Gerd Kortemeyer
package Apache::lonxml;
use vars
-qw(@pwd $outputstack $redirection $textredirection $on_offimport @extlinks);
+qw(@pwd @outputstack $redirection $import @extlinks $metamode);
use strict;
use HTML::TokeParser;
use Safe;
@@ -15,6 +17,64 @@ use Safe::Hole;
use Opcode;
use Apache::Constants qw(:common);
+
+sub xmlbegin {
+ my $output='';
+ if ($ENV{'browser.mathml'}) {
+ $output=''
+ .''
+ .']>'
+ .'';
+ } else {
+ $output='';
+ }
+ return $output;
+}
+
+sub xmlend {
+ return '';
+}
+
+sub fontsettings() {
+ my $headerstring='';
+ if (($ENV{'browser.os'} eq 'mac') && (!$ENV{'browser.mathml'})) {
+ $headerstring.=
+ '';
+ }
+ return $headerstring;
+}
+
+sub registerurl {
+ return (<
+ function LONCAPAreg() {
+ if (window.location.pathname!="/res/adm/pages/menu.html") {
+ menu=window.open("","LONCAPAmenu");
+ menu.currentURL=window.location.pathname;
+ menu.currentStale=0;
+ }
+ }
+
+ function LONCAPAstale() {
+ if (window.location.pathname!="/res/adm/pages/menu.html") {
+ menu=window.open("","LONCAPAmenu");
+ menu.currentStale=1;
+ }
+ }
+
+ENDSCRIPT
+}
+
+sub loadevents() {
+ return 'LONCAPAreg();';
+}
+
+sub unloadevents() {
+ return 'LONCAPAstale();';
+}
+
sub register {
my $space;
my @taglist;
@@ -31,32 +91,36 @@ sub printalltags {
&Apache::lonxml::debug("$temp -- $Apache::lonxml::alltags{$temp}");
}
}
-
use Apache::style;
-use Apache::lontexconvert;
use Apache::run;
use Apache::londefdef;
use Apache::scripttag;
+use Apache::edit;
#================================================== Main subroutine: xmlparse
@pwd=();
-$outputstack = '';
-$redirection = 1;
-$textredirection = 1;
-$on_offimport = 0;
+@outputstack = ();
+$redirection = 0;
+$import = 1;
@extlinks=();
+$metamode = 0;
sub xmlparse {
my ($target,$content_file_string,$safeinit,%style_for_target) = @_;
if ($target eq 'meta') {
- $Apache::lonxml::textredirection = 0;
- $Apache::lonxml::on_offimport = 1;
+ # meta mode is a bit weird only some output is to be turned off
+ #