Commit 80454c16 authored by Pietro Abate's avatar Pietro Abate

- fix xtransform.cd for the cgi evaluator

- add required files to build the documentation
parent 2e902f1f
......@@ -34,11 +34,10 @@ debug:
# Packaging
DISTRIB = $(DIRS) cduce.spec tools depend INSTALL INSTALL.WIN32 CHANGES \
DISTRIB = $(DIRS) web cduce.spec tools depend INSTALL INSTALL.WIN32 CHANGES \
LICENSE README AUTHORS Makefile.conf.template configure configure.ml doc \
META.in cduce_mktop VERSION PLIST.godi
# currently not used. Documentation online.
DISTRIB_DOC = doc.xml memento.xml tutorial.xml manual.xml tutorial manual \
xhtml.cd xhtml-categ.cd xhtml-strict.cd site.cd siteTypes.cd
......
......@@ -1300,8 +1300,7 @@ let bib : Biblio =
let titles = [bib]/<paper>_/<title>_
let authors = [bib]/<paper>_/<author>_
let titles_concat = [bib]/<paper>_/<title>_/Char
";"xtransform","
(* For the purpose of the example we can consider this hugely
";"xtransform","(* For the purpose of the example we can consider this hugely
simplified definition of Xhtml
*)
......@@ -1327,7 +1326,7 @@ type Address = <address>[ Inline* ];;
type Pre = <pre>[ (PCDATA | A | Fontstyle)* ];;
type Center = <center>[ Block* ];;
type A = <a ({ name = String } | { href = String })>[ (Inline \ A)* ];;
type A = <a ({ name = String } | { href = String })>[ (Inline)* ];;
type Tt = <tt>[ Inline* ];;
type I = <i>[ Inline* ];;
type B = <b>[ Inline* ];;
......@@ -1343,7 +1342,7 @@ type Small = <small>[ Inline* ];;
document as follows
*)
let bold(x:[Xhtml]):[Xhtml]=xtransform x with <a (y)>t -> [ <a(y)>[<b>t] ]
let bold (x:[Xhtml]):[Xhtml] = xtransform x with <a (y)>t -> [ <a (y)>[<b>t] ]
(* let us apply the function to a document where links appear
......@@ -1372,7 +1371,7 @@ let doc : Xhtml =
<a href=\"xtransform\">[<tt>\"xtransform\"]
' will put all links in bold so that when'
' you program your transformation you '
<big>[<a name=\"\">\" don\'t \" ] ' have to worry about it'
<big>[<a name=\"\">\" don't \" ] ' have to worry about it'
]
]
];;
......
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<site>
<title>CDuce</title>
<footer>
<meta>
<p>
<local href="sitemap">Site map</local>
</p>
</meta>
</footer>
<page name="index">
<title>CDuce: documentation</title>
<include file="tutorial.xml"/>
<include file="manual.xml"/>
<include file="memento.xml"/>
<left>
<p>
This is the main entry point to CDuce documentation.
</p>
<pages-toc/>
</left>
<box title="Available documents" link="src">
<p>
We mantain three kinds of on-line documentation: a <a
href="manual.html">User's guide</a> where all CDuce constructions are
grouped by categories and explained; a <a href="tutorial.html">Tutorial</a>
where we give a gentle introduction to programming in CDuce; and a
<a href="memento.html">Quick reference card</a> where we group and briefly explain in a single page CDuce syntax.
</p>
</box>
<page name="sitemap">
<title>Sitemap</title>
<left>
<p>This page lists all the pages from the CDuce documentation.</p>
</left>
<box title="Sitemap" link="sitemap">
<site-toc/>
</box>
</page>
</page>
</site>
(* For the purpose of the example we can consider this hugely
simplified definition of Xhtml
*)
......@@ -25,7 +24,7 @@ type Address = <address>[ Inline* ];;
type Pre = <pre>[ (PCDATA | A | Fontstyle)* ];;
type Center = <center>[ Block* ];;
type A = <a ({ name = String } | { href = String })>[ (Inline \ A)* ];;
type A = <a ({ name = String } | { href = String })>[ (Inline)* ];;
type Tt = <tt>[ Inline* ];;
type I = <i>[ Inline* ];;
type B = <b>[ Inline* ];;
......@@ -41,7 +40,7 @@ type Small = <small>[ Inline* ];;
document as follows
*)
let bold(x:[Xhtml]):[Xhtml]=xtransform x with <a (y)>t -> [ <a(y)>[<b>t] ]
let bold (x:[Xhtml]):[Xhtml] = xtransform x with <a (y)>t -> [ <a (y)>[<b>t] ]
(* let us apply the function to a document where links appear
......@@ -70,7 +69,7 @@ let doc : Xhtml =
<a href="xtransform">[<tt>"xtransform"]
' will put all links in bold so that when'
' you program your transformation you '
<big>[<a name="">" don\'t " ] ' have to worry about it'
<big>[<a name="">" don't " ] ' have to worry about it'
]
]
];;
......
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<page name="manual">
<title>User's manual</title>
<include file="manual/interpreter.xml"/>
<include file="manual/types_patterns.xml"/>
<include file="manual/expressions.xml"/>
<include file="manual/namespaces.xml"/>
<include file="manual/schema.xml"/>
<include file="manual/schema_samples.xml"/>
<include file="manual/interface.xml"/>
<left>
<p>
This Guide describes all CDuce's constructions.
</p>
<pages-toc/>
<p>See also:</p>
<local-links href="index,tutorial,memento"/>
</left>
<box title="Table of Contents" link="toc">
<p>Sections:</p>
<pages-toc sections=""/>
</box>
</page>
This diff is collapsed.
This diff is collapsed.
(** Input types **)
using H = "xhtml"
type Site = <site>[ <title>String Header? Footer? H.script* Page ]
type Header = <header>[ Item* ]
type Footer = <footer>[ Item* ]
type Page = <page name=Latin1 url=?String new=?"" leftbar=?("true"|"false")>[ <title>String <banner>[InlineText*]? Item* ]
type External = <external href=String title=String name=String>[]
type Item =
<box ({title=String; link=String; short=?String} | {})>Content
| <meta>Content
| <left>Content
| <footnotes>[]
| Page
| External
type Author = <author presenter=?("yes"|"no")>String
type Paper =
<paper file=?String old=?"">[
<title>String Author+ <comment>[InlineText*] <abstract>Content ]
type Slides =
<slides file=String>[ <title>String Author+ <comment>[InlineText*] ]
type Link =
<link url=String title=String>[ InlineText* ]
type Content =
[ ( <p style=?String>[InlineText*]
| <ol style=?String>[<li>Content +]
| <section title=String>Content
| <sample highlight=?"true"|"false">String
| <xmlsample highlight=?"true"|"false">String
| <sessionsample highlight=?"true"|"false">String
| H.table
| Paper | Slides | Link
| <boxes-toc short=?"" sections=?"">[]
| <pages-toc sections=?"">[]
| <site-toc>[]
| <local-links href=String>[]
| <two-columns>[ <left>Content <right>Content ]
| <note title=?String> Content
| <footnotes>[]
| <xhtml>H.Flow
| <demo label=?String prefix=?String>String
| <ul>[<li>Content +]
| InlineText
)* ]
type InlineText =
Char
| <(`b|`i|`tt|`em) style=?String>[InlineText*]
| <code>String
| <local href=String>String
| <footnote nocount=?"true">[InlineText*]
| H.a | H.img | H.br |H.script
| <thumbnail href=String width=?IntStr height=?IntStr>[]
| <thumbnails href=String width=?IntStr height=?IntStr>[ PCDATA ]
type IntStr = ['0'--'9'+]
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<page name="tutorial">
<title>Tutorial</title>
<include file="tutorial/getting_started.xml"/>
<include file="tutorial/first_functions.xml"/>
<include file="tutorial/overloading.xml"/>
<include file="tutorial/patterns.xml"/>
<include file="tutorial/errors.xml"/>
<include file="tutorial/references.xml"/>
<include file="tutorial/queries.xml"/>
<include file="tutorial/higherorder.xml"/>
<include file="tutorial/exercises.xml"/>
<left>
<p>
This tutorial is a step-by-step introduction to CDuce.
</p>
<pages-toc/>
<p>See also:</p>
<local-links href="index,memento,manual"/>
</left>
<box title="Tutorial Index" link="tut">
<p><b>This tutorial is under construction!</b></p>
<p>Sections:</p>
<pages-toc sections=""/>
</box>
</page>
......@@ -289,5 +289,5 @@ type head =
(title (script | style | meta | link | object)*))))
];;
type html =
<html id=?String dir=?("ltr" | "rtl") xml:lang=?String lang=?String>[
<html xmlns="http://www.w3.org/1999/xhtml" id=?String dir=?("ltr" | "rtl") xml:lang=?String lang=?String>[
(head body) ];;
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