--- loncom/xml/lonxml.pm 2003/05/28 21:05:33 1.258
+++ loncom/xml/lonxml.pm 2003/09/27 04:15:26 1.266.2.2
@@ -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.266.2.2 2003/09/27 04:15:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -70,6 +70,7 @@ use Math::Cephes();
use Math::Random();
use Opcode();
+
sub register {
my ($space,@taglist) = @_;
foreach my $temptag (@taglist) {
@@ -95,6 +96,8 @@ use Apache::run();
use Apache::londefdef();
use Apache::scripttag();
use Apache::edit();
+use Apache::inputtags();
+use Apache::outputtags();
use Apache::lonnet();
use Apache::File();
use Apache::loncommon();
@@ -151,6 +154,13 @@ $Apache::lonxml::counter_changed=0;
#internal check on whether to look at style defs
$Apache::lonxml::usestyle=1;
+#locations used to store the parameter string for style substitutions
+$Apache::lonxml::style_values='';
+$Apache::lonxml::style_end_values='';
+
+#array of ssi calls that need to occur after we are done parsing
+@Apache::lonxml::ssi_info=();
+
sub xmlbegin {
my $output='';
if ($ENV{'browser.mathml'}) {
@@ -382,7 +392,7 @@ sub fontsettings() {
if (($ENV{'browser.os'} eq 'mac') && (!$ENV{'browser.mathml'})) {
$headerstring.=
'';
- } elsif (!$ENV{'browser.mathml'}) {
+ } elsif (!$ENV{'browser.mathml'} && $ENV{'browser.unicode'}) {
$headerstring.=
'';
}
@@ -444,6 +454,7 @@ sub xmlparse {
if ($ENV{'request.uri'}) {
&writeallows($ENV{'request.uri'});
}
+ &do_registered_ssi();
if ($Apache::lonxml::counter_changed) { &store_counter() }
return $finaloutput;
}
@@ -497,7 +508,7 @@ sub inner_xmlparse {
my $dontpop=0;
while ( $#$pars > -1 ) {
while ($token = $$pars['-1']->get_token) {
- if (($token->[0] eq 'T') || ($token->[0] eq 'C') || ($token->[0] eq 'D') ) {
+ if (($token->[0] eq 'T') || ($token->[0] eq 'C') ) {
if ($metamode<1) {
my $text=$token->[1];
if ($token->[0] eq 'C' && $target eq 'tex') {
@@ -506,8 +517,13 @@ sub inner_xmlparse {
}
$result.=$text;
}
+ } elsif (($token->[0] eq 'D')) {
+ if ($metamode<1 && $target eq 'web') {
+ my $text=$token->[1];
+ $result.=$text;
+ }
} elsif ($token->[0] eq 'PI') {
- if ($metamode<1) {
+ if ($metamode<1 && $target eq 'web') {
$result=$token->[2];
}
} elsif ($token->[0] eq 'S') {
@@ -523,6 +539,7 @@ sub inner_xmlparse {
'
'. - &Apache::loncommon::help_open_topic("Greek_Symbols",'Greek Symbols', - undef,undef,600) - .' | '. - &Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols', - undef,undef,600) - .' |