This article needs additional citations for verification. (August 2018) (Learn how and when to remove this template message)
The topic of this article may not meet Wikipedia's general notability guideline. (August 2018) (Learn how and when to remove this template message)
CDuce is an XML-oriented functional language, which extends XDuce in a few directions. It features XML regular expression types, XML regular expression patterns, XML iterators. CDuce is not strictly speaking an XML transformation language since it can be used for general-purpose programming.
Benefits of CDuce
- static verifications (e.g.: ensure that a transformation produces a valid document);
- smooth and safe compositions of XML transformations and incremental programming;
- static optimizations and efficient execution model (knowing the type of a document is crucial to extract information efficiently).
- complete integration with OCaml (OCaml libraries can be strightforwardly imported and CDuce programs can be exported to OCaml).
- integration with Ocsigen via the OcCDuce module
Features particular to CDuce
- XML objects can be manipulated as first-class citizen values: elements, sequences, tags, characters and strings, attribute sets; sequences of XML elements can be specified by regular expressions, which also apply to characters strings;
- functions themselves are first-class values, they can be manipulated, stored in data structure, returned by a function,...
- a powerful pattern matching operation can perform complex extractions from sequences of XML elements;
- a rich type algebra, with recursive types and arbitrary boolean combinations (union, intersection, complement) allows precise definitions of data structures and XML types; general purpose types and types constructors are taken seriously (products, extensible records, arbitrary precision integers with interval constraints, Unicode characters);
- polymorphism through a natural notion of subtyping, and overloaded functions with dynamic dispatch;
- a highly-effective type-driven compilation schema.