]> matita.cs.unibo.it Git - helm.git/commitdiff
support for dynamic retrieval of style configuration file
authorLuca Padovani <luca.padovani@unito.it>
Tue, 6 Feb 2001 18:02:11 +0000 (18:02 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Tue, 6 Feb 2001 18:02:11 +0000 (18:02 +0000)
helm/http_getter/http_getter.pl.in

index e2ebb20d07ae52c7e25fda4b0e46f88fd3dbca02..89f1a521e218c8ddb3c81218182cf3bf4a67c1a7 100755 (executable)
@@ -242,7 +242,21 @@ EOT
             } else {
                die "Could not find DTD!";
             }
-         } elsif ($http_method eq 'GET' and $http_path eq "/getxslt") {
+        } elsif ($http_method eq 'GET' and $http_path eq "/getstyleconf") {
+            $filename = $styles_dir."/config/style-configuration.xml";
+            print "Style Configuration: $filename\n";
+            if (stat($filename)) {
+               open(FD, $filename) or die "Cannot open $filename\n";
+               $cont = "";
+               while(<FD>) {
+               $cont .= $_;
+              }
+               close(FD);
+               answer($c,$cont);
+            } else {
+               die "Could not find Style Configuration File!";
+            }
+        } elsif ($http_method eq 'GET' and $http_path eq "/getxslt") {
             my $filename = $inputuri;
             $filename = $styles_dir."/".$filename;
             print "XSLT: $inputuri ==> ($filename)\n";