Commit 6c257543 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-03-16 22:19:31 by cvscast] Empty log message

Original author: cvscast
Date: 2003-03-16 22:21:38+00:00
parent 47e086f2
......@@ -74,9 +74,6 @@ build_defun:
$(OCAMLDEFUN) $(DIRS:%=-I defun/%) -p -d defun $$i.ml; \
done
memento.html: cduce tests/memento.cd tests/memento.xml
./cduce -quiet tests/memento.cd
cduce: $(CDUCE)
$(OCAMLC) $(DEBUG) -linkpkg -o $@ gramlib.cma $(CDUCE)
......@@ -165,12 +162,12 @@ web/files: cduce.opt web/site.cd
# Site-specific installation
build_web:
rsh cedre ". .env; cd IMPLEM/CDUCE; make webiface memento.html"
rsh cedre ". .env; cd IMPLEM/CDUCE; make webiface"
install_web:
ssh cduce@iris "cp ~frisch/IMPLEM/CDUCE/webiface cgi-bin/cduce2; cp ~frisch/IMPLEM/CDUCE/memento.html public_html/; chmod +s cgi-bin/cduce2"
ssh cduce@iris "cp ~frisch/IMPLEM/CDUCE/webiface cgi-bin/cduce2; chmod +s cgi-bin/cduce2"
install_web_local:
ssh root@localhost "cp ~beppe/IMPLEM/CDUCE/webiface /var/www/cgi-bin/cduce; cp ~beppe/IMPLEM/CDUCE/memento.html /var/www/html/; chmod +s /var/www/cgi-bin/cduce; cp ~beppe/IMPLEM/CDUCE/web/index.html /var/www/html"
build_website:
rsh cedre ". .env; cd IMPLEM/CDUCE; make web/files"
scp web/*.html web/cduce.css cduce@iris:public_html/
scp web/*.php web/cduce.css cduce@iris:public_html/
......@@ -70,7 +70,7 @@ let html_header p =
<div class=\"box\">
<ul>
<li><a href=\"/\">Main page</a></li>
<li><a href=\"/memento.html\">CDuce Memento</a></li>
<li><a href=\"/memento.php\">CDuce Memento</a></li>
</ul>
</div>
";
......
......@@ -15,7 +15,7 @@ This page presents some simple CDuce programs.
<ul>
<li><a href="/cgi-bin/cduce">Online demo</a></li>
<li><a href="/">Home page</a></li>
<li><a href="memento.html">Syntax memento</a></li>
<li><a href="memento.php">Syntax memento</a></li>
</ul>
</box>
</navig>
......
......@@ -15,11 +15,11 @@
<box>
<ul>
<li><a href="/cgi-bin/cduce">Online demo</a></li>
<li><a href="papers.html">Papers and talks</a></li>
<li><a href="team.html">CDuce team</a></li>
<li><a href="plan.html">Site map</a></li>
<li><a href="bench.html">Benchmarks</a></li>
<li><a href="examples.html">Examples</a></li>
<li><a href="papers.php">Papers and talks</a></li>
<li><a href="team.php">CDuce team</a></li>
<li><a href="plan.php">Site map</a></li>
<li><a href="bench.php">Benchmarks</a></li>
<li><a href="examples.php">Examples</a></li>
</ul>
</box>
......@@ -65,16 +65,16 @@ href="http://www.di.ens.fr/~castagna/EQUIPE"><b>Languages</b></a>
group of ENS in Paris and the <a
href="http://www.lri.fr/bd"><b>Databases</b></a> group of LRI in
Orsay, two <a href="http://www.cnrs.fr">CNRS</a> labs.
See also the <a href="team.html">CDuce team</a> page,
our <a href="papers.html">technical papers</a>.
See also the <a href="team.php">CDuce team</a> page,
our <a href="papers.php">technical papers</a>.
</p>
<section title="Online running prototype">
<p> The only available implementation of CDuce is an <a
href="cgi-bin/cduce">online prototype</a>. To get a feeling of CDuce,
you can try the examples and play with them, or have a look at this <a
href="memento.html">memento</a> which briefly explains the syntax of
the language. We also have some <a href="examples.html">larger
href="memento.php">memento</a> which briefly explains the syntax of
the language. We also have some <a href="examples.php">larger
examples</a>. </p>
<p>We are planning to distribute a first public release in the next
......@@ -124,7 +124,7 @@ Some of CDuce peculiar features:
</ul>
<p>
<a href="bench.html">Preliminary benchmarks</a> suggest that a CDuce
<a href="bench.php">Preliminary benchmarks</a> suggest that a CDuce
program can run faster (30% to 60%) than an equivalent XSLT
style-sheet (we performed benchmarks with
the xsltproc tools from the Gnome libxslt library).
......@@ -153,7 +153,7 @@ our research projects include:
</ul>
<p>
We wrote several <a href="papers.html">technical papers</a> about
We wrote several <a href="papers.php">technical papers</a> about
the language design and its theoretical foundations.
</p>
</box>
......@@ -232,7 +232,7 @@ title="XML: Some hyperlinks minus the hype"> By Philip Wadler. </link>
</p>
<p>
<a href="mailto:Alain.Frisch@ens.fr">Webmaster</a> -
<a href="plan.html">Site map</a>
<a href="plan.php">Site map</a>
</p>
</meta>
......
......@@ -15,7 +15,7 @@ This page presents Papers and Talks about CDuce.
<ul>
<li><a href="/cgi-bin/cduce">Online demo</a></li>
<li><a href="/">Home page</a></li>
<li><a href="memento.html">CDuce memento</a></li>
<li><a href="memento.php">CDuce memento</a></li>
</ul>
</box>
</navig>
......
......@@ -78,10 +78,10 @@ let fun content (t : Content) : Flow =
[ <a href=f>tit '. ' !(authors aut) '. ' !(text com) ]
| <include-verbatim file=f>[] ->
let code = load_file f in
(* let code = transform code with
| '\n' -> [ '\n' <br>[] ]
| ' ' -> "\160"
| c -> [c] in *)
let code = transform code with
(* | c & ('a'--'z') -> [ <b>[c] ] *)
(* | ' ' -> "\160" *)
| c -> [c] in
[
<div class="code">[ <pre>code ]
]
......@@ -102,6 +102,30 @@ let fun main2html (Box -> Flow)
| <meta>c -> [ <div class="meta">(content c) ];;
let php_css : String =
[' <?php
$browser = getenv("HTTP_USER_AGENT");
if (preg_match("/MSIE/i", "$browser")) {
$css = "<link rel=\"stylesheet\" href=\"cduce.css\"
type=\"text/css\">";
} elseif (preg_match("/Mozilla/i", "$browser")) {
$css = "<blink>For better presentation use a more recent version
of your browser, like Netscape 6</blink>";
} if (preg_match("/Mozilla\/5.0/i", "$browser")) {
$css = "<link rel=\"stylesheet\" href=\"cduce.css\"
type=\"text/css\">";
} elseif (preg_match("/opera/i", "$browser")) {
$css = "<link rel=\"stylesheet\" href=\"cduce.css\"
type=\"text/css\">";
}
echo "$css";
?> '];;
let fun patch_css (String -> String)
| [ a::_*? '<meta content="css"/>'; rem ] -> a @ php_css @ rem
| s -> s;;
let fun page2html (Page -> Xhtml)
<page>[ <title>title <banner>banner <navig>navig <main>main ] ->
let toc =
......@@ -115,7 +139,7 @@ let fun page2html (Page -> Xhtml)
<head>[
<title>title
<meta content="text/html; charset=iso-8859-1"; http-equiv="Content-Type">[]
<link rel="stylesheet"; href="cduce.css"; type="text/css"> []
<meta content="css">[]
]
<body>[
<div class="title">[ <h1>(text banner) ]
......@@ -142,10 +166,10 @@ let fun do_page((Page,String) -> [])
(page,outf) ->
let _ = print [ 'Generating html ... ' ] in
let html : String =
[ '<?xml version="1.0" encoding="iso-8859-1"?>'
[ (* '<?xml version="1.0" encoding="iso-8859-1"?>' *)
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
!(print_xml (page2html page)) ] in
!(patch_css (print_xml (page2html page))) ] in
let _ = print [ 'Saving to ' !outf '...\n' ] in
dump_to_file outf html;;
......@@ -168,6 +192,6 @@ let site =
| <page input=inf; output=outf>_ -> do_file(inf,outf)
| <external href=url; title=t>_ -> (url,<title>t) in
let _ = print [ 'Create plan... ' ] in
let plan = make_plan (ts @ [("plan.html", <title>"CDuce site")]) in
do_page(plan,"plan.html")
let plan = make_plan (ts @ [("plan.php", <title>"CDuce site")]) in
do_page(plan,"plan.php")
| _ -> raise "Invalid site.xml";;
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<site>
<page input="index.xml" output="index.html"/>
<page input="index.xml" output="index.php"/>
<external href="cgi-bin/cduce" title="CDuce prototype"/>
<page input="memento.xml" output="memento.html"/>
<page input="bench.xml" output="bench.html"/>
<page input="papers.xml" output="papers.html"/>
<page input="examples.xml" output="examples.html"/>
<page input="team.xml" output="team.html"/>
<page input="memento.xml" output="memento.php"/>
<page input="bench.xml" output="bench.php"/>
<page input="papers.xml" output="papers.php"/>
<page input="examples.xml" output="examples.php"/>
<page input="team.xml" output="team.php"/>
</site>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment