]> matita.cs.unibo.it Git - helm.git/commitdiff
http_getter reimplemented from scratch
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 24 Nov 2000 14:41:40 +0000 (14:41 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 24 Nov 2000 14:41:40 +0000 (14:41 +0000)
17 files changed:
helm/configuration/local/etc/helm/configuration.xml
helm/header/setheader.xsl
helm/http_getter/http_getter.pl
helm/interface/getter.ml
helm/interface/pxpUriResolver.ml
helm/style/basic.xsl
helm/style/content.xsl
helm/style/content_to_html.xsl
helm/style/html_init.xsl
helm/style/html_reals.xsl
helm/style/html_set.xsl
helm/style/mmlextension.xsl
helm/style/proofs.xsl
helm/style/reals.xsl
helm/style/ricerca.xsl
helm/style/set.xsl
helm/style/theory_content.xsl

index c0ce319b755c5a71d3eee2a2c5f1213a6c16829d..29672d5e1d547013bdabe2473d0c60ea1cf977e5 100644 (file)
@@ -18,5 +18,5 @@
  <webeqp_url>http://localhost/cgi-bin/helm/webeqp.pl</webeqp_url>
  <use_webeqp_url>http://localhost/cgi-bin/helm/use_webeqp.pl</use_webeqp_url>
  <html_link><value-of var="getheader_url"/>?baseurl=<value-of var="style_url"/>&amp;stylesheet1=rootcontent.xsl&amp;stylesheet2=content_to_html.xsl&amp;xmluri=</html_link>
- <getter_url>http://localhost:8081/getwithtypes?url=</getter_url>
+ <getter_url>http://localhost:8081/get?uri=</getter_url>
 </configuration>
index a1ba13199f6fd0ff82acef3ad0e34f8292e739fe..a5f6a7f890164abac92b4339c2bbc552b461a10b 100644 (file)
@@ -8,7 +8,7 @@
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/get?uri=</xsl:variable>
 
 <!--SET THE HEADER AND OPEN THE XML FILE-->
 
index 884bbc307d97fd553b1417b32cd740980b8285bf..ccc8a82b81f6deece6e8161c0cd85e313b715bc5 100755 (executable)
@@ -16,7 +16,10 @@ use HTTP::Request;
 use LWP::UserAgent;
 use DB_File;
 
-my $cont = "";
+#CSC: mancano i controlli sulle condizioni di errore di molte funzioni
+#CSC: ==> non e' robusto
+#CSC: altra roba da sistemare segnata con CSC
+
 my $d = new HTTP::Daemon LocalPort => 8081;
 tie(%map, 'DB_File', $uris_dbm.".db", O_RDONLY, 0664);
 print "Please contact me at: <URL:", $d->url, ">\n";
@@ -29,256 +32,103 @@ while (my $c = $d->accept) {
     while (my $r = $c->get_request) {
         #CSC: mancano i controlli di sicurezza
         
-        $cont = "";
-        my $cicuri = $r->url; 
-        $cicuri =~ s/^[^?]*\?url=(.*)/$1/;
-        print "*".$r->url."\n";
+        my $inputuri = $r->url; 
+        $inputuri =~ s/^[^?]*\?uri=(.*)/$1/;
+        print "\nRequest: ".$r->url."\n\n";
         my $http_method = $r->method;
         my $http_path = $r->url->path;
-        if ($http_method eq 'GET' and $http_path eq "/get") {
-            my $filename = $cicuri;
-            $filename =~ s/cic:(.*)/$1/;
-            $filename =~ s/theory:(.*)/$1/;
-            $filename = $helm_dir.$filename.".xml";
-            my $resolved = $map{$cicuri};
-            print "$cicuri ==> $resolved ($filename)\n";
-            if (stat($filename)) {
-               print "Using local copy\n";
-               open(FD, $filename);
-               while(<FD>) { $cont .= $_; }
-               close(FD);
-               my $res = new HTTP::Response;
-               $res->content($cont);
-               $c->send_response($res);
-            } else {
-               print "Downloading\n";
-               $ua = LWP::UserAgent->new;
-               $request = HTTP::Request->new(GET => "$resolved");
-               $response = $ua->request($request, \&callback);
-               
-               print "Storing file\n";
-               mkdirs($filename);
-               open(FD, ">".$filename);
-               print FD $cont;
-               close(FD);
 
-               my $res = new HTTP::Response;
-               $res->content($cont);
-               $c->send_response($res);
-            }
-        } elsif ($http_method eq 'GET' and $http_path eq "/annotate") {
-            my $do_annotate = ($cicuri =~ /\.ann$/);
-            my $target_to_annotate = $cicuri;
-            $target_to_annotate =~ s/(.*)\.ann$/$1/ if $do_annotate;
-            my $filename = $cicuri;
-            $filename =~ s/cic:(.*)/$1/;
-            $filename =~ s/theory:(.*)/$1/;
-            my $filename_target = $helm_dir.$filename if $do_annotate;
-            $filename = $helm_dir.$filename.".xml";
-            $filename_target =~ s/(.*)\.ann$/$1.xml/ if $do_annotate;
-            my $resolved = $map{$cicuri};
-            my $resolved_target = $map{$target_to_annotate} if $do_annotate;
-            if ($do_annotate) {
-               print "($cicuri, $target_to_annotate) ==> ($resolved + $resolved_target) ($filename)\n";
-            } else {
-               print "$cicuri ==> $resolved ($filename)\n";
-            }
-
-            # Retrieves the annotation
-
-            if (stat($filename)) {
-               print "Using local copy for the annotation\n";
-               open(FD, $filename);
-               while(<FD>) { $cont .= $_; }
-               close(FD);
-            } else {
-               print "Downloading the annotation\n";
-               $ua = LWP::UserAgent->new;
-               $request = HTTP::Request->new(GET => "$resolved");
-               $response = $ua->request($request, \&callback);
-               
-               print "Storing file for the annotation\n";
-               mkdirs($filename);
-               open(FD, ">".$filename);
-               print FD $cont;
-               close(FD);
-            }
-            my $annotation = $cont;
+        if ($http_method eq 'GET' and $http_path eq "/getciconly") {
+            # finds the uri, url and filename
+            my $cicuri = $inputuri;
 
-            # Retrieves the target to annotate
+            my $cicfilename = $cicuri;
+            $cicfilename =~ s/cic:(.*)/$1/;
+            $cicfilename =~ s/theory:(.*)/$1/;
+            $cicfilename = $helm_dir.$cicfilename.".xml";
 
-            $cont = "";
-            if ($do_annotate) {
-               if (stat($filename_target)) {
-                  print "Using local copy for the file to annotate\n";
-                  open(FD, $filename_target);
-                  while(<FD>) { $cont .= $_; }
-                  close(FD);
-               } else {
-                  print "Downloading the file to annotate\n";
-                  $ua = LWP::UserAgent->new;
-                  $request = HTTP::Request->new(GET => "$resolved_target");
-                  $response = $ua->request($request, \&callback);
-               
-                  print "Storing file for the file to annotate\n";
-                  mkdirs($filename_target);
-                  open(FD, ">".$filename_target);
-                  print FD $cont;
-                  close(FD);
-               }
-            }
-            my $target = $cont;
+            my $cicurl   = $map{$cicuri};
 
-            # Merging the annotation and the target
+            print_request("cic",$cicuri,$cicurl,$cicfilename);
 
-            $target =~ s/<\?xml [^?]*\?>//sg;
-            $target =~ s/<!DOCTYPE [^>]*>//sg;
-            $annotation =~ s/<\?xml [^?]*\?>//sg;
-            $annotation =~ s/<!DOCTYPE [^>]*>//sg;
-            my $merged = <<EOT;
-<?xml version="1.0" encoding="UTF-8"?>
-<cicxml uri="$target_to_annotate">
-$target
-$annotation
-</cicxml>
-EOT
+            # Retrieves the file
+            my $ciccontent = download(0,"cic",$cicurl,$cicfilename);
 
             # Answering the client
-
-            my $res = new HTTP::Response;
-            $res->content($merged);
-            $c->send_response($res);
-        } elsif ($http_method eq 'GET' and $http_path eq "/getwithtypes") {
-            my $mode;
-            my $do_annotate;
-            if ($cicuri =~ /\.types$/) {
-               $do_annotate = 1;
-               $mode = "types";
-            } elsif ($cicuri =~ /\.ann$/) {
-               $do_annotate = 1;
-               $mode = "ann";
+            answer($c,$ciccontent);
+        } elsif ($http_method eq 'GET' and $http_path eq "/get") {
+            # finds the uris, urls and filenames
+            my $cicuri = $inputuri,
+               $typesuri = $inputuri,
+               $annuri = $inputuri;
+            my $annsuffix;
+            if ($inputuri =~ /\.types$/) {
+               $cicuri    =~ s/(.*)\.types$/$1/;
+               undef($annuri);
+            } elsif ($inputuri =~ /\.types\.ann$/) {
+               $cicuri    =~ s/(.*)\.types\.ann$/$1/;
+               $typesuri  =~ s/(.*)\.ann$/$1/;
+               $annsuffix = ".types.ann";
+            } elsif ($inputuri =~ /\.ann$/) {
+               $cicuri  =~ s/(.*)\.ann$/$1/;
+               undef($typesuri);
+               $annsuffix = ".ann";
             } else {
-               $do_annotate = 0;
-            }
-            my $target_to_annotate = $cicuri;
-            if ($mode eq "types") {
-               $target_to_annotate =~ s/(.*)\.types$/$1/;
-            } elsif ($mode eq "ann") {
-               $target_to_annotate =~ s/(.*)\.ann$/$1/;
-            }
-            my $filename = $cicuri;
-            $filename =~ s/cic:(.*)/$1/;
-            $filename =~ s/theory:(.*)/$1/;
-            my $filename_target = $helm_dir.$filename if $do_annotate;
-            $filename = $helm_dir.$filename.".xml";
-            if ($mode eq "types") {
-               $filename_target =~ s/(.*)\.types$/$1.xml/;
-            } elsif ($mode eq "ann") {
-               $filename_target =~ s/(.*)\.ann$/$1.xml/;
-            }
-            my $resolved = $map{$cicuri};
-            my $resolved_target = $map{$target_to_annotate} if $do_annotate;
-            if ($do_annotate) {
-               print "GETWITHTYPES!!\n" if ($mode eq "types");
-               print "GETWITHANN!!\n" if ($mode eq "ann");
-               print "($cicuri, $target_to_annotate) ==> ($resolved + $resolved_target) ($filename)\n";
-             } else {
-               print "$cicuri ==> $resolved ($filename)\n";
+               undef($typesuri);
+               undef($annuri);
             }
 
-            # Retrieves the annotation
+            my $cicfilename = $cicuri;
+            $cicfilename =~ s/cic:(.*)/$1/;
+            $cicfilename =~ s/theory:(.*)/$1/;
+            $cicfilename = $helm_dir.$cicfilename;
 
-            if (stat($filename)) {
-               print "Using local copy for the types\n" if ($mode eq "types");
-               print "Using local copy for the ann\n" if ($mode eq "ann");
-               open(FD, $filename);
-               while(<FD>) { $cont .= $_; }
-               close(FD);
-            } else {
-               print "Downloading the types\n" if ($mode eq "types");
-               print "Downloading the ann\n" if ($mode eq "ann");
-               $ua = LWP::UserAgent->new;
-               $request = HTTP::Request->new(GET => "$resolved");
-               $response = $ua->request($request, \&callback);
-               
-               print "Storing file for the types\n" if ($mode eq "types");
-               print "Storing file for the ann\n" if ($mode eq "ann");
-               mkdirs($filename);
-               open(FD, ">".$filename);
-               print FD $cont;
-               close(FD);
-            }
-            my $annotation = $cont;
+            my $typesfilename = $cicfilename.".types.xml"     if $typesuri;
+            my $annfilename  = $cicfilename.$annsuffix.".xml" if $annuri;
+            $cicfilename .= ".xml";
 
-            # Retrieves the target to annotate
+            my $cicurl   = $map{$cicuri};
+            my $typesurl = $map{$typesuri} if $typesuri;
+            my $annurl   = $map{$annuri}  if $annuri;
 
-            $cont = "";
-            my $target;
-            if ($do_annotate) {
-               if (stat($filename_target)) {
-                  print "Using local copy for the file to type\n";
-                  open(FD, $filename_target);
-                  while(<FD>) { $cont .= $_; }
-                  close(FD);
-               } else {
-                  print "Downloading the file to type\n";
-                  $ua = LWP::UserAgent->new;
-                  $request = HTTP::Request->new(GET => "$resolved_target");
-                  $response = $ua->request($request, \&callback);
-               
-                  print "Storing file for the file to type\n";
-                  mkdirs($filename_target);
-                  open(FD, ">".$filename_target);
-                  print FD $cont;
-                  close(FD);
-               }
-               $target = $cont;
-            } else {
-               $target = $annotation;
-               $annotation = "";
-            }
+            print_request("cic",$cicuri,$cicurl,$cicfilename);
+            print_request("types",$typesuri,$typesurl,$typesfilename)
+             if ($typesuri);
+            print_request("ann",$annuri,$annurl,$annfilename)
+             if ($annuri);
 
-            # Merging the annotation and the target
+            # Retrieves the files
+
+            my $ciccontent = download(1,"cic",$cicurl,$cicfilename);
+            my $typescontent =
+             download(1,"types",$typesurl,$typesfilename) if ($typesuri);
+            my $anncontent =
+             download(1,"ann",$annurl,$annfilename) if ($annuri);
+
+            # Merging the files together
 
-            $target =~ s/<\?xml [^?]*\?>//sg;
-            $target =~ s/<!DOCTYPE [^>]*>//sg;
-            $annotation =~ s/<\?xml [^?]*\?>//sg;
-            $annotation =~ s/<!DOCTYPE [^>]*>//sg;
-            my $element, $endelement; 
-            if ($mode eq "types") {
-               $element = "<ALLTYPES>";
-               $endelement = "</ALLTYPES>";
-            } elsif ($mode eq "ann") {
-               $element = "";
-               $endelement = "";
-            }
             my $merged = <<EOT;
 <?xml version="1.0" encoding="UTF-8"?>
-<cicxml uri="$target_to_annotate">
-$target
-$element
-$annotation
-$endelement
+<cicxml uri="$cicuri">
+$ciccontent
+$typescontent
+$anncontent
 </cicxml>
 EOT
 
             # Answering the client
-
-            my $res = new HTTP::Response;
-            $res->content($merged);
-            $c->send_response($res);
+            answer($c,$merged);
          } elsif ($http_method eq 'GET' and $http_path eq "/getdtd") {
-            my $filename = $cicuri;
+            my $filename = $inputuri;
             $filename = $dtd_dir."/".$filename;
-            print "DTD: $cicuri ==> ($filename)\n";
+            print "DTD: $inputuri ==> ($filename)\n";
             if (stat($filename)) {
                print "Using local copy\n";
                open(FD, $filename);
+               $cont = "";
                while(<FD>) { $cont .= $_; }
                close(FD);
-               my $res = new HTTP::Response;
-               $res->content($cont);
-               $c->send_response($res);
+               answer($c,$cont);
             } else {
                die "Could not find DTD!";
             }
@@ -289,15 +139,14 @@ EOT
             $quoted_html_link =~ s/>/&gt;/g;
             $quoted_html_link =~ s/'/&apos;/g;
             $quoted_html_link =~ s/"/&quot;/g;
-            print "Configuration requested, returned #$quoted_html_link#\n";
+            print "\nConfiguration requested, returned #$quoted_html_link#\n";
            $cont = "<?xml version=\"1.0\"?><html_link>$quoted_html_link</html_link>";
-            my $res = new HTTP::Response;
-            $res->content($cont);
-            $c->send_response($res);
+            answer($c,$cont);
         } else {
-            print "INVALID REQUEST!!!!!\n";
+            print "\nINVALID REQUEST!!!!!\n";
             $c->send_error(RC_FORBIDDEN)
         }
+        print "\nRequest solved: ".$r->url."\n\n";
     }
     $c->close;
     undef($c);
@@ -308,23 +157,67 @@ EOT
 
 #================================
 
-sub callback
-{
- my ($data) = @_;
- $cont .= $data;
-}
 
-# Does not raise errors if could not create dirs/files
-
-# Too much powerful: creates even /home, /home/users/, ...
+#CSC: Too much powerful: creates even /home, /home/users/, ...
+#CSC: Does not raise errors if could not create dirs/files
 sub mkdirs
 {
  my ($pathname) = @_;
  my @dirs = split /\//,$pathname;
  my $tmp;
  foreach $dir (@dirs) {
-  $tmp = ((defined($tmp)) ?  $tmp = $tmp."\/".$dir : "");
+  $tmp = ((defined($tmp)) ?  $tmp."\/".$dir : "");
   mkdir($tmp,0777);
  }
  rmdir($tmp);
 }
+
+sub print_request
+{
+ my ($str,$uri,$url,$filename) = @_;
+ print $str."uri: $uri\n";
+ print $str."url: $url\n";
+ print $str."filename: $filename\n\n";
+}
+
+sub callback
+{
+ my ($data) = @_;
+ $cont .= $data;
+}
+
+sub download
+{
+ my ($remove_headers,$str,$url,$filename) = @_;
+ $cont = ""; # modified by side-effect by the callback function
+ if (stat($filename)) {
+    print "Using local copy for the $str file\n";
+    open(FD, $filename);
+    while(<FD>) { $cont .= $_; }
+    close(FD);
+ } else {
+    print "Downloading the $str file\n";
+    $ua = LWP::UserAgent->new;
+    $request = HTTP::Request->new(GET => "$url");
+    $response = $ua->request($request, \&callback);
+               
+    print "Storing the $str file\n";
+    mkdirs($filename);
+    open(FD, ">".$filename);
+    print FD $cont;
+    close(FD);
+ }
+ if ($remove_headers) {
+    $cont =~ s/<\?xml [^?]*\?>//sg;
+    $cont =~ s/<!DOCTYPE [^>]*>//sg;
+ }
+ return $cont;
+}
+
+sub answer
+{
+ my ($c,$cont) = @_;
+ my $res = new HTTP::Response;
+ $res->content($cont);
+ $c->send_response($res);
+}
index 21c1901a183722c4b2ac040964827f7353c4e06f..39af104ccb3e38de26d64ec5e500d1e84cea7627 100644 (file)
@@ -115,8 +115,8 @@ let get uri =
  let module U = UriManager in
   get_file
    (U.uri_of_string
-    (Str.replace_first (Str.regexp "\.ann$") ""
-     (Str.replace_first (Str.regexp "\.types$") "" (U.string_of_uri uri))))
+    (Str.replace_first (Str.regexp "\.types$") ""
+     (Str.replace_first (Str.regexp "\.ann$") "" (U.string_of_uri uri))))
 ;;
 
 (* get_ann : uri -> filename *)
index 6ebbf71bd4bf02165b140e00dc7cd292e4734578..ad8713cf371031a911c5cbc88795fc5651e78e4c 100644 (file)
 
 let resolve =
  function
-    "http://localhost:8081/getdtd?url=cic.dtd" ->
+    "http://localhost:8081/getdtd?uri=cic.dtd" ->
      Configuration.dtd_dir ^ "/cic.dtd"
-  | "http://localhost:8081/getdtd?url=maththeory.dtd" ->
+  | "http://localhost:8081/getdtd?uri=maththeory.dtd" ->
      Configuration.dtd_dir ^ "/maththeory.dtd"
-  | "http://localhost:8081/getdtd?url=annotations.dtd" ->
+  | "http://localhost:8081/getdtd?uri=annotations.dtd" ->
      Configuration.dtd_dir ^ "/annotations.dtd"
   | s  -> s
 ;;
index 93eb28052f35e6568e7b524474af23a9d49ae509..a05a281b942c3ba77e2cb5e6a7a415bbef9e99f6 100644 (file)
@@ -14,7 +14,7 @@
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- ************************* LOGIC *********************************-->
 
index 7d211d2f7e7c1758efb3d2d3a3d902db04bd76a2..68a418dcdd24587953282a0d8236d84cae2b4b32 100644 (file)
@@ -37,7 +37,7 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- CIC TERMS -->
 
@@ -45,11 +45,7 @@ Amaya o da chi di dovere in /really_very_local/helm/PARSER/example/.../]
     <m:lambda helm:xref="{@id}">
      <m:bvar>
       <m:ci>
-      <!--<m:msqrt>
-       <m:mi>-->
-        <xsl:value-of select="target/@binder"/>
-      <!-- </m:mi>
-       </m:msqrt>-->
+       <xsl:value-of select="target/@binder"/>
       </m:ci>
       <m:type>
        <xsl:apply-templates select="source/*[1]" mode="noannot"/>
index dd1c0779482e712b80130c6f8807266e823ab1ea..f2d6182740c34ff7796bdf57067c9e9dccfaccfe 100644 (file)
@@ -14,7 +14,7 @@
 <xsl:include href="html_reals.xsl"/>
 
 
-<!-- <xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>-->
+<!-- <xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>-->
 <xsl:variable name="header" select="document('http://localhost:8081/conf')/html_link"/>
 
 <xsl:variable name="showcast" select="0"/>
index 9e81b169c8a95d02d7e71335f91960f26037a667..44d75fd0a0df86d9d6006c8292340a6d6fc84eda 100644 (file)
@@ -8,7 +8,7 @@
 <!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena                      -->
 <!--***********************************************************************--> 
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 
 <!-- BASIC OPERATORS -->
index 04ff478c5aca48f302d4a81939db104ef7ef2eb1..1f1750b2d15f45f537ea8db721f245416b06e9b6 100644 (file)
@@ -8,7 +8,7 @@
 <!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena                      -->
 <!--***********************************************************************--> 
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- LIMIT -->
 
index 6c7f66b1b3ca87daf5a5814fc8e4568a0f56c7b4..ca38298d155ec875a0c50f24507057dc8840e314 100644 (file)
@@ -8,7 +8,7 @@
 <!-- HELM Group: Asperti, Padovani, Sacerdoti, Schena                      -->
 <!--***********************************************************************--> 
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- IN -->
 
index d467b77af79d18b15e7129e780ba83a35019c703..cd6609aa16d282c1cc2c3f825b587e24a3658794 100644 (file)
@@ -18,7 +18,7 @@
 <!-- Parameter affecting line-breaking                                     -->
 <!--***********************************************************************-->
 
-<xsl:variable name="framewidth" select="35"/>
+<xsl:variable name="framewidth" select="30"/>
 
 <!--***********************************************************************-->
 <!-- Gli oggetti sono stampati come mtext all'interno di una marca toplevel-->
          <m:mtr>
           <m:mtd>
            <m:mrow>
-            <m:mo color="#b03060">:></m:mo>
+            <m:mo color="Maroon">:></m:mo>
             <xsl:apply-templates select="*[position()=3]"/>
            </m:mrow>
           </m:mtd>
        <xsl:otherwise>
         <m:mo stretchy="false">(</m:mo>
         <xsl:apply-templates select="*[position()=2]"/>
-        <m:mo color="#b03060">:></m:mo>
+        <m:mo color="Maroon">:></m:mo>
         <xsl:apply-templates select="*[position()=3]"/>
         <m:mo stretchy="false">)</m:mo>
        </xsl:otherwise>
          <m:mtr>
           <m:mtd>
            <m:mrow>
-            <m:mtext color="#b03060">we proved </m:mtext>
+            <m:mtext color="Maroon">we proved </m:mtext>
             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
             <xsl:apply-templates select="*[position()=3]"/>
            </m:mrow>
          <m:mtr>
           <m:mtd>
            <m:mrow>
-            <m:mtext color="#b03060">we get</m:mtext>
+            <m:mtext color="Maroon">we get</m:mtext>
             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
             <xsl:apply-templates select="."/>
            </m:mrow>
          <m:mtr>
           <m:mtd>
            <m:mrow>
-            <m:mtext color="#b03060">we get</m:mtext>
+            <m:mtext color="Maroon">we get</m:mtext>
             <m:mphantom><m:mtext>_</m:mtext></m:mphantom>
             <xsl:apply-templates select="."/>
            </m:mrow>
 <xsl:template match = "m:set">
  <xsl:choose>
   <xsl:when test="count(child::*) = 0">
-   <m:mi
+   <m:mo
     <m:mchar name="emptyset"/>
-   </m:mi>
+   </m:mo>
   </xsl:when>
   <xsl:otherwise>
    <xsl:variable name="charlength">
index a3f2a15078cdeed3588e53b6485dce568f5c28ac..da751e437daac4eac71930a29376580980b5140f 100644 (file)
@@ -14,7 +14,7 @@
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- ************************* LOGIC *********************************-->
 
index 6c47f95627160055cb7879eae845ba74c9a131f9..208d8416ef41e5b5f708936dbc8d36d43d19fd10 100644 (file)
@@ -15,7 +15,7 @@
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- ************************* LOGIC *********************************-->
 
index e0fa13a93967fd531f5f3557bdc81554701bf423..28e210dca1012c450b65bcbd5c7b276b701dd4fb 100644 (file)
@@ -10,7 +10,7 @@
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <xsl:template match="/">
                <html> 
index b61b44e8858fbf790edaea5d0b80b8be8bb8114d..cdb96ec3e64040ddb9df7c432a3ad936929a3f88 100644 (file)
@@ -14,7 +14,7 @@
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- ************************* LOGIC *********************************-->
 
index 9b65cc5b2d42d010bdedc80279df62b76a9d5722..5ff5a41f76c37299c42f6929214289e5a4739068 100644 (file)
@@ -13,7 +13,7 @@
 <!-- Variable containing the absolute path of the CIC file            -->
 <!--******************************************************************-->
 
-<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+<xsl:variable name="absPath">http://localhost:8081/getciconly?uri=</xsl:variable>
 
 <!-- THEORY -->