XML transformation language
Encyclopedia
An XML transformation language is a programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 designed specifically to transform an input XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 document into an output XML 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.

XML to XML

As XML to XML transformation outputs an XML document, XML to XML transformation chains form XML pipeline
XML pipeline
In software, an XML Pipeline is formed when XML processes, especially XML transformations and XML validations, are connected together....

s.

XML to Data

The XML to Data transformation contains some important cases. The most notable one is XML to HTML, as an HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 document is not an XML document.

Existing languages

XSLT: XSLT
XSL Transformations
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

 is the best known XML transformation language. The XSLT 1.0 W3C recommendation was published in 1999 together with XPath
XPath
XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

 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
Saxon XSLT
Saxon is an XSLT and XQuery processor created by Michael Kay. There are open-source and also closed-source commercial versions. Versions exist for Java and .NET.The current version, as of December 2010, is 9.3.- Versions :...

 are already available.
XQuery: XQuery
XQuery
- Features :XQuery provides the means to extract and manipulate data from XML documents or any data source that can be viewed as XML, such as relational databases or office documents....

 is a full functional language, despite having "query" in the name. It is a de-facto standard used by Microsoft, Oracle, DB2, Mark Logic, etc., is the foundation for the XRX
XRX (web application architecture)
In software development XRX is a web application architecture based on XForms, REST and XQuery. XRX applications store data on both the web client and on the web server in XML format and do not require a translation between data formats...

 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. XQuery programs cannot have side-effects
Side effect (computer science)
In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world...

, 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
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 Validate...

 is an XML Pipeline language. The XProc 1.0 W3C Recommendation was published in May 2010.
STX: STX
Streaming Transformations for XML
Streaming Transformations for XML is an XML transformation language intended as a high-speed, low memory consumption alternative to XSLT version 1.0 and 2.0. Current work on XSLT 3.0 includes Streaming capabilities.- Overview :...

 (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
XML Script and XML-Script are two unrelated XML technologies. The former is an XML transformation language, while the latter is a preview for scripting web browsers - think of it as an XML version of ECMA JavaScript. Microsoft is expected to rename their XML-Script as Atlas Script before first...

 is an imperative scripting language inspired by Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

 that uses the XML syntax. XML Script supports XPath
XPath
XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

 and its proprietary DSLPath for selecting nodes from the input tree.
FXT: FXT is a functional XML transformation tool, implemented in Standard ML.
XDuce: XDuce is a typed language with a lightweight syntax, compared to XSLT. It is written in ML.
CDuce: CDuce
CDuce
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...

 extends XDuce to a general-purpose functional programming language, see CDuce homepage.
XStream: XStream
XStream
XStream is a Java library to serialize objects to XML 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...

 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
CeCILL 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....

 free software license.
Xtatic: Xtatic applies methods from XDuce to C#, see Xtatic homepage.
HaXml: 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,* an XML validator,...

 is a library and collection of tools to write XML transformations in Haskell
Haskell (programming language)
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...

. Its approach is very consistent and powerful. Also see this paper about HaXml published in 1999 and this IBM developerWorks article. See also the more recent 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
Erik Meijer (computer scientist)
Erik Meijer is a Dutch computer scientist who is currently a software architect for Microsoft SQL Server, Visual Studio and the .NET Framework. At Microsoft he heads the Cloud Programmability Team....

 and Mark Shields. No implementation is available. See XMLambda home page.
FleXML: 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...

 is an XML processing language first implemented by Kristofer Rose. Its approach is to add actions to an XML DTD
Document Type Definition
Document Type Definition is a set of markup declarations that define a document type for SGML-family markup languages...

 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 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)
    Filter (software)
    A filter is a computer program to process a data stream. Some operating systems such as Unix are rich with filter programs. Even Windows has some simple filters built into its command shell, most of which have significant enhancements relative to the similar filter commands that were available in...

  • Filter (Unix)
    Filter (Unix)
    In Unix and Unix-like operating systems, a filter is a program that gets most of its data from its standard input and writes its main results to its standard output . Unix filters are often used as elements of pipelines...

  • Web template
    Web template
    A web template is a tool used to separate content from presentation in web design, and for mass-production of web documents. It is a basic component of a web template system.Web templates can be used to set up any type of website...

  • Web template system
    Web template system
    A Web template system describes the software and methodologies used to produce web pages and for deployment on websites and delivery over the Internet. Such systems process web templates, using a template engine...

  • Template engine (web)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK