README 4.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
README - CDuce

This package is distributed under the terms of the Q Public License
version 1.0 (see the LICENSE file).


------------------------------------------------------------------------------
Abstract
------------------------------------------------------------------------------

CDuce is a programming language adapted to the manipulation of XML
12
documents.  It has been designed and developed as a joint research
13 14 15 16 17 18 19 20
project between the Languages group at ENS (Paris) and the Database
group at LRI (Orsay).

 [1] http://www.di.ens.fr/~castagna/EQUIPE
 [2] http://www.lri.fr/bd


The current implementation has been written to demonstrate the
21 22 23
innovative features of the language and to validate design choices.
It is a research prototype, not a robust application.

24 25 26 27 28 29 30

------------------------------------------------------------------------------
Overview of the distribution
------------------------------------------------------------------------------

See the INSTALL file for Installation instructions.

31
1. CDuce command-line interpreter / toplevel
32

33 34
For performance reasons, it is advised to build it using OCaml native code
compiler (by default in the Makefile).
35 36 37

Usage:

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 42 43
in the argv variable (having type [ String* ], which means: sequence
of character strings).

44
The option --quiet suppresses normal output (typing, results). It is
45 46 47
normally used when the CDuce interpreter is used in the context
of batch processing.

48
The option --dump followed by a filename allows persistence between
49 50 51 52 53 54 55
several invocations of the interpreter: the current environment
(defined types and values) is saved to the file when the interpreter
terminates and it is restored if the interpreter is started again with
the same option. Note that only the arguments after -- on the first
invocation in a session are passed to the CDuce program.

When no CDuce file is given on the command line, the interpreter
56 57 58 59
behaves as a toplevel. Phrases are interpreted when the user type
";;". Of course, mutually recursive definition (types or functions)
must be entirely contained in an adjacent sequence of phrases
(without ";;" inbetween).
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88


2. CDuce CGI interface

It is also possible to play with CDuce in a web browser, using the
webiface CGI interface (or webiface.opt) program. Of course, You will
need a web server with CGI support. 

There is usually a running version at:

http://www.cduce.org/cgi-bin/cduce

Some features are disabled in the web interface (including
file manipulation).

3. dtd2cduce

dtd2cduce is small tool that generated CDuce type declarations from
a DTD.

Usage: dtd2cduce <prefix> <.dtd file>

<prefix> is a string prepended to tag names to form CDuce type names
(<prefix> must start with a capital letter).

The generated declarations are sent to the standard output.

4. CDuce web site

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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126

------------------------------------------------------------------------------
Documentation
------------------------------------------------------------------------------

There are several sources of information concerning CDuce:

- we started to write a manual and a tutorial as part of the web site. 
  You can find the manual at:

  http://www.cduce.org/manual.html

  or generate it locally (make local_website).


- papers about CDuce:

  http://www.cduce.org/papers.html


- code examples:

  In the web site:
  http://www.cduce.org/examples.html
  http://www.cduce.org/bench.html
  
  In the distribution: 
  web/site.cd
  web/examples/build.cd

  Online prototype:
  http://www.cduce.org/cgi-bin/cduce


- and of course the interpreter source code !

127

128 129 130 131 132 133 134 135 136 137 138
------------------------------------------------------------------------------
Feedback
------------------------------------------------------------------------------

We'll appreciate any feedback (comments, suggestions, questions,
bug reports, ...) concerning the CDuce language or interpreter at:
<Alain.Frisch@ens.fr>



  -- The CDuce team
139 140