--- loncom/xml/lonxml.pm 2001/03/13 22:44:24 1.56
+++ loncom/xml/lonxml.pm 2001/05/04 19:18:43 1.71
@@ -5,16 +5,78 @@
# 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 $import @extlinks);
+qw(@pwd @outputstack $redirection $import @extlinks $metamode);
use strict;
use HTML::TokeParser;
use Safe;
use Safe::Hole;
use Opcode;
use Apache::Constants qw(:common);
+use Apache::lontexconvert;
+
+
+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 (<
+// BEGIN LON-CAPA Internal
+ 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;
+ }
+ }
+// END LON-CAPA Internal
+
+ENDSCRIPT
+}
+
+sub loadevents() {
+ return 'LONCAPAreg();';
+}
+
+sub unloadevents() {
+ return 'LONCAPAstale();';
+}
sub register {
my $space;
@@ -33,27 +95,33 @@ sub printalltags {
}
}
use Apache::style;
-use Apache::lontexconvert;
use Apache::run;
use Apache::londefdef;
use Apache::scripttag;
+use Apache::edit;
#================================================== Main subroutine: xmlparse
@pwd=();
@outputstack = ();
$redirection = 0;
$import = 1;
@extlinks=();
+$metamode = 0;
sub xmlparse {
my ($target,$content_file_string,$safeinit,%style_for_target) = @_;
if ($target eq 'meta') {
- &startredirection;
+ # meta mode is a bit weird only some output is to be turned off
+ #