[cduce-users] cygwin toplevel and FLOWR power

Alain Frisch Alain.Frisch at inria.fr
Wed May 10 18:04:50 CEST 2006


Ethan Aubin wrote:
> I'd like to use the toplevel, but dynamic loading isn't support on my
> platform (cygwin). Could ocamlduce build an `ocamlducemktop`?

I've just prepared a new release (for 3.09.2) with such a tool.
I also simplified the command-line interface of the tools: the ocamlduce
library is now considered at the same level at the standard library
(it's path is built in the tools and it is automatically linked).
There is also an ocamlducefind (which used to be built by the GODI
package). Just do "ocamlduce" to start the toplevel,
"ocamlducec", "ocamlduceopt", "ocamlducefind ocamlc", "ocamlducefind
ocamlopt" to compile/link.

Cf: http://www.cduce.org/ocaml_install.html

I'll prepare a GODI package as soon as GODI moves to OCaml 3.09.2.


> Also, are there any plans to integrate a query language or library for
> xquery (or xpath)?

There is a minimal support for the child axis in OCamlDuce. The syntax
is a little bit different from CDuce.

If e is an x-expression which evaluates to a sequence l, then e/
extracts all the children of the XML elements l, in order, e.g.:

let l = {{ [ <a>[ <x>[1 2] <y>[] ] <b>[<x>[3]] ] }} in {{ l/ }};;
====> {{[ <x>[ 1 2 ] <y>[ ] <x>[ 3 ] ]}}

Then you can use the e.(T) construction to filter the elements of a
sequence and keep only some of type T:


let l = {{ [ <a>[ <x>[1 2] <y>[] ] <b>[<x>[3]] ] }} in {{ l/.(<x>_) }};;
====> {{[ <x>[ 1 2 ] <x>[ 3 ] ]}}

Cf: http://www.cduce.org/ocaml_manual.html#expr

Currently, there is no descendant axis (// in CDuce). Same for the CQL
fragment of CDuce (select...from...where). Would you need them?


For other questions related to OCamlDuce, please use the
ocamlduce at cduce.org mailing list.


Cheers,

Alain



More information about the Cduce-users mailing list