Commit 36d58586 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-05-14 20:53:20 by cvscast] Empty log message

Original author: cvscast
Date: 2003-05-14 20:54:10+00:00
parent 46ab7505
...@@ -23,21 +23,6 @@ ...@@ -23,21 +23,6 @@
<include file="tutorial.xml"/> <include file="tutorial.xml"/>
<include file="sitemap.xml"/> <include file="sitemap.xml"/>
<!--
<box>
<ul>
<li><a href="plan.php">Site map</a></li>
<li><a href="/cgi-bin/cduce">Online demo</a></li>
<li><a href="papers.php">Papers and talks</a></li>
<li><a href="team.php">CDuce team</a></li>
<li><a href="bench.php">Benchmarks</a></li>
<li><a href="examples.php">Examples</a></li>
<li><a href="memento.php">Memento</a></li>
<li><a href="tutorial.php">Tutorial</a></li>
</ul>
</box>
-->
<left> <left>
<p> CDuce ("seduce") is a new typed functional language with <p> CDuce ("seduce") is a new typed functional language with
...@@ -59,7 +44,7 @@ XML types play a central role in CDuce. ...@@ -59,7 +44,7 @@ XML types play a central role in CDuce.
<left> <left>
<p> All pages of this site were automatically generated from an XML description of <p> All pages of this site were automatically generated from an XML description of
the content by <a href="examples.php#site"> the following CDuce program</a>. the content by <a href="examples.html#site">the following CDuce program</a>.
</p><p> </p><p>
<img src="img/cducepower2.jpg" alt="Powered by CDuce"/></p> <img src="img/cducepower2.jpg" alt="Powered by CDuce"/></p>
</left> </left>
...@@ -73,17 +58,17 @@ href="http://www.di.ens.fr/~castagna/EQUIPE"><b>Languages</b></a> ...@@ -73,17 +58,17 @@ href="http://www.di.ens.fr/~castagna/EQUIPE"><b>Languages</b></a>
group of ENS in Paris and the <a group of ENS in Paris and the <a
href="http://www.lri.fr/bd"><b>Databases</b></a> group of LRI in 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. Orsay, two <a href="http://www.cnrs.fr">CNRS</a> labs.
See also the <a href="team.php">CDuce team</a> page, See also the <local href="team">CDuce team</local> page,
our <a href="papers.php">technical papers</a>. our <local href="papers">technical papers</local>.
</p> </p>
<section title="Online running prototype"> <section title="Online running prototype">
<p> The only available implementation of CDuce is an <a <p> The only available implementation of CDuce is an <a
href="cgi-bin/cduce">online prototype</a>. To get a feeling of CDuce, 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 you can try the examples and play with them, or have a look at this <local
href="memento.php">memento</a> which briefly explains the syntax of href="memento">memento</local> which briefly explains the syntax of
the language. We also have some <a href="examples.php">larger the language. We also have some <local href="examples">larger
examples</a>. </p> examples</local>. </p>
<p>We are planning to distribute a first public release in the next <p>We are planning to distribute a first public release in the next
few weeks.</p> few weeks.</p>
...@@ -132,7 +117,7 @@ Some of CDuce peculiar features: ...@@ -132,7 +117,7 @@ Some of CDuce peculiar features:
</ul> </ul>
<p> <p>
<a href="bench.php">Preliminary benchmarks</a> suggest that despite the <local href="bench">Preliminary benchmarks</local> suggest that despite the
overhead for static type verification, a CDuce overhead for static type verification, a CDuce
program can run faster (30% to 60%) than an equivalent XSLT program can run faster (30% to 60%) than an equivalent XSLT
style-sheet (we performed benchmarks with style-sheet (we performed benchmarks with
...@@ -162,7 +147,7 @@ our research projects include: ...@@ -162,7 +147,7 @@ our research projects include:
</ul> </ul>
<p> <p>
We wrote several <a href="papers.php">technical papers</a> about We wrote several <local href="papers">technical papers</local> about
the language design and its theoretical foundations. the language design and its theoretical foundations.
</p> </p>
</box> </box>
...@@ -241,7 +226,7 @@ title="XML: Some hyperlinks minus the hype"> By Philip Wadler. </link> ...@@ -241,7 +226,7 @@ title="XML: Some hyperlinks minus the hype"> By Philip Wadler. </link>
</p> </p>
<p> <p>
<a href="mailto:Alain.Frisch@ens.fr">Webmaster</a> - <a href="mailto:Alain.Frisch@ens.fr">Webmaster</a> -
<a href="plan.php">Site map</a> <local href="sitemap">Site map</local>
</p> </p>
</meta> </meta>
......
...@@ -47,7 +47,7 @@ type InlineText = ...@@ -47,7 +47,7 @@ type InlineText =
Char Char
| <(`b|`i|`tt|`em) {||}>[InlineText*] | <(`b|`i|`tt|`em) {||}>[InlineText*]
| <code>String | <code>String
| <local href=String>[] | <local href=String>String
| Xa | Ximg | Xbr ;; | Xa | Ximg | Xbr ;;
...@@ -123,17 +123,20 @@ let fun authors ([Author+] -> String) ...@@ -123,17 +123,20 @@ let fun authors ([Author+] -> String)
| [ <author>a1 <author>a2 ] -> a1 @ ", and " @ a2 | [ <author>a1 <author>a2 ] -> a1 @ ", and " @ a2
| [ <author>a; rem ] -> a @ ", " @ authors rem;; | [ <author>a; rem ] -> a @ ", " @ authors rem;;
let fun find_local_link (sitemap : [Tree*], l : String) : Inline = let fun find_local_link (sitemap : [Tree*], l : String) : Tree =
match sitemap with match sitemap with
| (h,t) -> | (h,t) ->
if (h . name = l) then <a href=(h . url)>(h . title) if (h . name = l) then h
else else
(try find_local_link (t,l) with `Not_found -> (try find_local_link (t,l) with `Not_found ->
find_local_link (h . children,l)) find_local_link (h . children,l))
| [] -> raise `Not_found;; | [] -> raise `Not_found;;
let fun local_link (sitemap : Tree, l : String) : Inline = let fun local_link (sitemap : Tree, l : String, txt : String) : Inline =
try find_local_link ([sitemap],l) try
let h = find_local_link ([sitemap],l) in
let txt = if txt = "" then h . title else txt in
<a href=(h . url)>txt
with `Not_found -> raise [ 'Local link not found: ' !l ];; with `Not_found -> raise [ 'Local link not found: ' !l ];;
let fun compute_sitemap ((Page|External) -> Tree) let fun compute_sitemap ((Page|External) -> Tree)
...@@ -157,7 +160,7 @@ match page with ...@@ -157,7 +160,7 @@ match page with
let fun text (t : [InlineText*]) : Inlines = let fun text (t : [InlineText*]) : Inlines =
map t with map t with
| <code>x -> <b>[ <tt>(highlight x) ] | <code>x -> <b>[ <tt>(highlight x) ]
| <local href=l>[] -> local_link (sitemap,l) | <local href=l>txt -> local_link (sitemap,l,txt)
| <(tag & (`b|`i|`tt|`em))>x -> <(tag)>(text x) | <(tag & (`b|`i|`tt|`em))>x -> <(tag)>(text x)
| z -> z | z -> z
in in
...@@ -201,7 +204,7 @@ match page with ...@@ -201,7 +204,7 @@ match page with
| <local-links href=s>[] -> | <local-links href=s>[] ->
(match (split_comma s) with (match (split_comma s) with
| [] -> [] | [] -> []
| l -> let l = map l with x -> <li>[ (local_link(sitemap,x)) ] | l -> let l = map l with x -> <li>[ (local_link(sitemap,x,"")) ]
in [ <ul>l ]) in [ <ul>l ])
| t -> text [ t ] | t -> text [ t ]
in in
......
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