XDuce
   HOME

TheInfoList



OR:

An XML transformation language is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
designed specifically to transform an ''input''
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 ...
document into an ''output'' document which satisfies some specific goal. There are two special cases of transformation: * XML to XML: the ''output document'' is an XML document. * XML to Data: the ''output document'' is a
byte stream A bitstream (or bit stream), also known as binary sequence, is a sequence of bits. A bytestream is a sequence of bytes. Typically, each byte is an 8-bit quantity, and so the term octet stream is sometimes used interchangeably. An octet may ...
.


XML to XML

As XML to XML transformation outputs an XML document, XML to XML transformation chains form
XML pipeline In software, an XML pipeline is formed when XML (Extensible Markup Language) processes, especially XML transformations and XML validations, are connected. For instance, given two transformations T1 and T2, the two can be connected so that an inpu ...
s.


XML to Data

The XML (EXtensible Markup Language) to Data transformation contains some important cases. The most notable one is XML to HTML (HyperText Markup Language), as an
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
document ''is not'' an XML document.


Existing languages

* XSLT:
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subseque ...
is the best known XML transformation language. The XSLT 1.0 W3C recommendation was published in 1999 together with
XPath XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values (e.g., strings, numbers, or Boolean v ...
1.0, and it has been widely implemented since then. XSLT 2.0 has become a W3C recommendation since January 2007 and implementations of the specification like Saxon 8 are already available. * XQuery:
XQuery XQuery (XML Query) is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats (JSON, bin ...
is a full functional language, despite having "query" in the name. It is a ''de facto'' standard used by Microsoft, Oracle, DB2, MarkLogic, etc., is the foundation for the XRX web programming model, and has a W3C recommendation for versions 1.0. XQuery is not written in XML itself like XSLT is, so its syntax is much lighter. The language is based on
XPath 2.0 XPath 2.0 is a version of the XPath language defined by the World Wide Web Consortium, W3C. It became a recommendation on 23 January 2007. As a W3C Recommendation it was superseded by XPath 3.0 on 10 April 2014. XPath is used primarily for selec ...
. XQuery programs cannot have
side-effects In medicine, a side effect is an effect, whether therapeutic or adverse, that is secondary to the one intended; although the term is predominantly employed to describe adverse effects, it can also apply to beneficial, but unintended, consequence ...
, just like XSLT and provides almost the same capabilities (for instance: declaring variables and functions, iterating over sequences, using W3C schema types), even though the program syntax are quite different. XQuery is logic driven, using FOR, WHERE and function composition (e.g. fn:concat("", generate-body(), "")). In contrast, XSLT is data-driven (push processing model) where certain conditions of the input document trigger the execution of templates rather than the code executing in the order in which it is written. * XProc:
XProc XProc is a W3C Recommendation to define an XML transformation language to define XML Pipelines. Below is an example abbreviated XProc file: This is a pipeline that consists of two atomic steps, XInclude and Val ...
is an XML Pipeline language. The XProc 1.0 W3C Recommendation was published in May 2010. * XML document transform: Is a Microsoft standard for performing simple transforms on XML documents. Primarily for creating IIS Web.config files (Config Transforms), other implementations allow it to be used for generic config files as build time (Slow Cheetah) or from the command line (CTT). * STX: STX (Streaming Transformations for XML) is inspired by XSLT but has been designed to allow a one-pass transformation process that never prevents streaming. Implementations are available in Java
Joost
and Perl
XML::STX
. * XML Script:
XML Script XML Script and XML-Script are two unrelated XML technologies. The former (XML Script) is an XML transformation language, while the latter (XML-Script) is Microsoft technologypreview for scripting web browsers - think of it as an XML version of E ...
is an imperative scripting language inspired by
Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offici ...
that uses the XML syntax. XML Script supports
XPath XPath (XML Path Language) is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values (e.g., strings, numbers, or Boolean v ...
and its proprietary DSLPath for selecting nodes from the input tree. * FXT: FXT is a functional XML transformation tool, implemented in
Standard ML Standard ML (SML) is a general-purpose, modular, functional programming language with compile-time type checking and type inference. It is popular among compiler writers and programming language researchers, as well as in the development of the ...
. * XDuce:
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: ...
is a typed language with a lightweight syntax, compared to XSLT. It is written in ML. * CDuce:
CDuce {{notability, date=August 2018 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 t ...
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: ...
to a general-purpose
functional programming 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 ...
, se
CDuce homepage
* XACT: XACT is a Java-based system for programming XML transformations. Notable features include XML templates as immutable values and a static analysis to ensure type safety using XML Schema types
XACT home page
. * XFun: XFun is a functional language X-Fun for defining transformations between XML data trees, while providing shredding instructions. X-Fun can be understood as an extension of Frisch's
XStream XStream is a Java library to serialize objects to XML (or JSON) and back again. XStream library XStream uses reflection to discover the structure of the object graph to serialize at run time, and doesn't require modifications to objects. It can ...
language with output shredding, while pattern matching is replaced by tree navigation with XPath expressions.

* XStream:
XStream XStream is a Java library to serialize objects to XML (or JSON) and back again. XStream library XStream uses reflection to discover the structure of the object graph to serialize at run time, and doesn't require modifications to objects. It can ...
is a simple functional transformation language for XML documents based on CAML. XML transformations written in XStream are evaluated in streaming: when possible, parts of the output are computed and produced while the input document is still being parsed. Some transformations can thus be applied to huge XML documents which would not even fit in memory. The XStream compiler is distributed under the terms of the
CeCILL CeCILL (from CEA CNRS INRIA Logiciel Libre) is a free software license adapted to both international and French legal matters, in the spirit of and retaining compatibility with the GNU General Public License (GPL). It was jointly developed by ...
free software license A free-software license is a notice that grants the recipient of a piece of software extensive rights to modify and redistribute that software. These actions are usually prohibited by copyright law, but the rights-holder (usually the author) ...
. * Xtatic: Xtatic applies methods from
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: ...
to C#, se
Xtatic homepage
* HaXml:
HaXml HaXml is a collection of utilities for parsing, filtering, transforming, and generating XML documents using Haskell. Its basic facilities include: * a parser for XML, * a separate error-correcting parser for HTML The HyperText Markup Lan ...
is a library and collection of tools to write XML transformations in
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lang ...
. Also se
this paper about HaXml published in 1999
an

See also the more recen
HXML
and Haskell XML Toolbox
HXT
, which is based on the ideas of HaXml and HXML but takes a more general approach to XML processing. * XMLambda: XMLambda (XMλ) is described in a 1999 paper by Erik Meijer and
Mark Shields Mark Stephen Shields (May 25, 1937 – June 18, 2022) was an American political columnist, advisor, and commentator. He worked in leadership positions for many Democratic candidates' electoral campaigns. Shields provided weekly political anal ...
. No implementation is available. Se
XMLambda home page
* FleXML:
FleXML FleXML is an XML transformation language originally developed by Kristofer Rose. It allows a programmer to specify actions in C programming language or C++, and associate those actions with element definitions in an XML DTD. It is similar in p ...
is an XML processing language first implemented by Kristofer Rose. Its approach is to add actions to an XML DTD specifying processing instructions for any subset of the DTD's rules. * Scala: Scala is a general-purpose functional and object-oriented language with specific support for XML transformation in the form of XML pattern matching, literals, and expressions, along with standard XML libraries. * LINQ to XML:
LINQ to XML Language Integrated Query (LINQ, pronounced "link") is a Microsoft .NET Framework component that adds native data Query language, querying capabilities to List of CLI languages, .NET languages, originally released as a major part of .NET Framework ...
is a .NET 3.5 syntax and programming API available in C#, VB and some other .NET languages. LINQ is primarily designed as a query language, but it also supports XML transforms.


See also

*
Filter (software) A filter is a computer program or subroutine to process a stream, producing another stream. While a single filter can be used individually, they are frequently strung together to form a pipeline. Some operating systems such as Unix are rich with f ...
*
Filter (Unix) A filter is a computer program or subroutine to process a stream, producing another stream. While a single filter can be used individually, they are frequently strung together to form a pipeline. Some operating systems such as Unix are rich with ...
*
Web template A web template system in web publishing lets web designers and developers work with ''web templates'' to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic el ...
*
Web template system A web template system in web publishing lets web designers and developers work with ''web templates'' to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic el ...
*
Template engine (web) A web template system in web publishing lets web designers and developers work with ''web templates'' to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic ele ...
*
Tritium (programming language) Tritium is a simple scripting language for efficiently transforming structured data like HTML, XML, and JSON. It is similar in purpose to XSLT but has a syntax influenced by jQuery, Sass, and CSS versus XSLT's XML based syntax. History T ...


References

{{DEFAULTSORT:Xml Transformation Language Transformation languages XML-based standards