CDuce
   HOME

TheInfoList



OR:

{{notability, date=August 2018 CDuce is an
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
-oriented
functional language In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that m ...
, which extends
XDuce An XML transformation language is a programming language designed specifically to transform an ''input'' XML document into an ''output'' document which satisfies some specific goal. There are two special cases of transformation: * XML to XML: ...
in a few directions. It features XML
regular expression A regular expression (shortened as regex or regexp; sometimes referred to as rational expression) is a sequence of characters that specifies a search pattern in text. Usually such patterns are used by string-searching algorithms for "find" or ...
types,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
regular expression patterns, XML iterators. CDuce is not strictly speaking an
XML transformation language An XML transformation language is a programming language designed specifically to transform an ''input'' XML document into an ''output'' document which satisfies some specific goal. There are two special cases of transformation: * XML to XML: ...
since it can be used for general-purpose programming. CDuce conforms to basic standards:
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology Technical standard, standard for the consistent character encoding, encoding, representation, and handling of Character (computing), text expre ...
,
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
, DTD,
Namespaces In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified. Namespaces ...
are fully supported, XML Schema is partially supported.


Benefits of CDuce

* static verifications (e.g.: ensure that a transformation produces a valid document); * smooth and safe compositions of
XML transformation An XML transformation language is a programming language designed specifically to transform an ''input'' XML document into an ''output'' document which satisfies some specific goal. There are two special cases of transformation: * XML to XML: ...
s 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 ( , formerly Objective Caml) is a general-purpose programming language, general-purpose, multi-paradigm programming language which extends the Caml dialect of ML (programming language), ML with object-oriented programming, object-oriented ...
(OCaml libraries can be straightforwardly 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 In programming language design, a first-class citizen (also type, object, entity, or value) in a given programming language is an entity which supports all the operations generally available to other entities. These operations typically include ...
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 Algebra () is one of the broad areas of mathematics. Roughly speaking, algebra is the study of mathematical symbols and the rules for manipulating these symbols in formulas; it is a unifying thread of almost all of mathematics. Elementary a ...
, with
recursive type In computer programming languages, a recursive data type (also known as a recursively-defined, inductively-defined or inductive data type) is a data type for values that may contain other values of the same type. Data of recursive types are usuall ...
s 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.


External links


CDuce
XML-based programming languages Functional languages