| 1 |
README - CDuce
|
| 2 |
|
| 3 |
This package is distributed under the terms of the Q Public License
|
| 4 |
version 1.0 (see the LICENSE file).
|
| 5 |
|
| 6 |
|
| 7 |
------------------------------------------------------------------------------
|
| 8 |
Abstract
|
| 9 |
------------------------------------------------------------------------------
|
| 10 |
|
| 11 |
CDuce is a programming language adapted to the manipulation of XML
|
| 12 |
documents. It has been designed and developed as a joint research
|
| 13 |
project between the Languages group at ENS (Paris) and the Database
|
| 14 |
group at LRI (Orsay).
|
| 15 |
|
| 16 |
[1] http://www.di.ens.fr/~castagna/EQUIPE
|
| 17 |
[2] http://www.lri.fr/bd
|
| 18 |
|
| 19 |
|
| 20 |
The current implementation has been written to demonstrate the
|
| 21 |
innovative features of the language and to validate design choices.
|
| 22 |
It is a research prototype, not a robust application.
|
| 23 |
|
| 24 |
|
| 25 |
------------------------------------------------------------------------------
|
| 26 |
Overview of the distribution
|
| 27 |
------------------------------------------------------------------------------
|
| 28 |
|
| 29 |
See the INSTALL file for Installation instructions.
|
| 30 |
|
| 31 |
1. CDuce command-line interpreter / toplevel
|
| 32 |
|
| 33 |
For performance reasons, it is advised to build it using OCaml native code
|
| 34 |
compiler (by default in the Makefile).
|
| 35 |
|
| 36 |
Usage:
|
| 37 |
|
| 38 |
cduce [options] [CDuce files] --arg [arguments for the CDuce program]
|
| 39 |
|
| 40 |
The arguments following the --arg are passed to the CDuce program
|
| 41 |
in the argv variable (having type [ String* ], which means: sequence
|
| 42 |
of character strings).
|
| 43 |
|
| 44 |
The option --quiet suppresses normal output (typing, results). It is
|
| 45 |
normally used when the CDuce interpreter is used in the context
|
| 46 |
of batch processing.
|
| 47 |
|
| 48 |
The option --dump followed by a filename allows persistence between
|
| 49 |
several invocations of the interpreter: the current environment
|
| 50 |
(defined types and values) is saved to the file when the interpreter
|
| 51 |
terminates and it is restored if the interpreter is started again with
|
| 52 |
the same option. Note that only the arguments after -- on the first
|
| 53 |
invocation in a session are passed to the CDuce program.
|
| 54 |
|
| 55 |
When no CDuce file is given on the command line, the interpreter
|
| 56 |
behaves as a toplevel. Phrases are interpreted when the user type
|
| 57 |
";;". Of course, mutually recursive definition (types or functions)
|
| 58 |
must be entirely contained in an adjacent sequence of phrases
|
| 59 |
(without ";;" inbetween).
|
| 60 |
|
| 61 |
|
| 62 |
2. CDuce CGI interface
|
| 63 |
|
| 64 |
It is also possible to play with CDuce in a web browser, using the
|
| 65 |
webiface CGI interface (or webiface.opt) program. Of course, You will
|
| 66 |
need a web server with CGI support.
|
| 67 |
|
| 68 |
There is usually a running version at:
|
| 69 |
|
| 70 |
http://www.cduce.org/cgi-bin/cduce
|
| 71 |
|
| 72 |
Some features are disabled in the web interface (including
|
| 73 |
file manipulation).
|
| 74 |
|
| 75 |
3. dtd2cduce
|
| 76 |
|
| 77 |
dtd2cduce is small tool that generated CDuce type declarations from
|
| 78 |
a DTD.
|
| 79 |
|
| 80 |
Usage: dtd2cduce <prefix> <.dtd file>
|
| 81 |
|
| 82 |
<prefix> is a string prepended to tag names to form CDuce type names
|
| 83 |
(<prefix> must start with a capital letter).
|
| 84 |
|
| 85 |
The generated declarations are sent to the standard output.
|
| 86 |
|
| 87 |
4. CDuce web site
|
| 88 |
|
| 89 |
The source files (XML + CDuce) for the CDuce web site
|
| 90 |
(http://www.cduce.org/) are included in the web/ subdirectory.
|
| 91 |
|
| 92 |
------------------------------------------------------------------------------
|
| 93 |
Documentation
|
| 94 |
------------------------------------------------------------------------------
|
| 95 |
|
| 96 |
There are several sources of information concerning CDuce:
|
| 97 |
|
| 98 |
- we started to write a manual and a tutorial as part of the web site.
|
| 99 |
You can find the manual at:
|
| 100 |
|
| 101 |
http://www.cduce.org/manual.html
|
| 102 |
|
| 103 |
or generate it locally (make local_website).
|
| 104 |
|
| 105 |
|
| 106 |
- papers about CDuce:
|
| 107 |
|
| 108 |
http://www.cduce.org/papers.html
|
| 109 |
|
| 110 |
|
| 111 |
- code examples:
|
| 112 |
|
| 113 |
In the web site:
|
| 114 |
http://www.cduce.org/examples.html
|
| 115 |
http://www.cduce.org/bench.html
|
| 116 |
|
| 117 |
In the distribution:
|
| 118 |
web/site.cd
|
| 119 |
web/examples/build.cd
|
| 120 |
|
| 121 |
Online prototype:
|
| 122 |
http://www.cduce.org/cgi-bin/cduce
|
| 123 |
|
| 124 |
|
| 125 |
- and of course the interpreter source code !
|
| 126 |
|
| 127 |
|
| 128 |
------------------------------------------------------------------------------
|
| 129 |
Feedback
|
| 130 |
------------------------------------------------------------------------------
|
| 131 |
|
| 132 |
We'll appreciate any feedback (comments, suggestions, questions,
|
| 133 |
bug reports, ...) concerning the CDuce language or this early release
|
| 134 |
of the interpreter at:
|
| 135 |
<Alain.Frisch@ens.fr>
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
-- The CDuce team
|