XML transformation language: Difference between revisions

Content deleted Content added
Mikaey (talk | contribs)
Mikaey (talk | contribs)
Reverted to revision 451073380 by Mandarax: finalizing histmerge. (TW)
Line 1:
{{Citations missing|date=July 2011}}
'''XML transformation languages''' are [[programming language]]s designed specifically to create an ''output XML document'' based on an ''input XML document''.
{{Data transformation}}
[[Image:XML To XML Transformation.png|thumb|right|300px|An XML to XML transformation]]
<!-- TODO: ImageNode -->
An '''XML transformation languageslanguage''' areis a [[programming language]]s designed specifically to createtransform an ''outputinput'' [[XML]] document'' based oninto an ''inputoutput'' XML document''. which satisfies some specific goal.
 
There are two special cases of transformation:
== Existing languages ==
* '''XML to XML''': the ''output document'' is an XML document.
* '''XML to Data''': the ''output document'' is a byte stream.
 
==XML to XML==
; '''[[XSLT]]''' : XSLT is the best known XML transformation language. The XSLT 1.0 W3C recommendation was published in 1999 and it has been widely implemented since then. XSLT 2.0 is expected to be released soon as a W3C recommendation and early implementations of the specification like [http://saxon.sourceforge.net/ SAXON 7] are already available.
As '''XML to XML''' transformation outputs an XML document, '''XML to XML''' transformation chains form [[XML pipeline]]s.
; '''[[XML_query_language|XQuery]]''' : XQuery is also bound to become a W3C standard. XQuery is not an XML application, like XSLT. Consequently its syntax is much lighter. The language is based on XPath 2.0. XQuery programs cannot have [[side-effect]]s, 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. In addition to the syntax, the main difference between XSLT and XQuery is the XSLT push processing model, where certain conditions of the input document trigger the execution of templates, which is not shared with XQuery.
 
; '''[[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 ([http://joost.sourceforge.net/ Joost]) and Perl ([http://stx.gingerall.cz/stx/xml-stx/index.html XML::STX]).
==XML to Data==
; '''[[FTX]]''' A Functional XML Transformation Tool, implementated in [[ML_programming_language|Standard ML]].
The '''XML to Data''' transformation contains some important cases. The most notable one is '''XML to HTML''', as an [[HTML]] document ''is not'' an XML document.
; '''[[XDuce]]''' : A typed language with a lightweight syntax (compared to XSLT). The implementation is written in [[ML_programming_language|ML]].
 
; '''[[HaXml]]''' : A library and collection of tools to write XML transformations in Haskell. Its approach is very consistent and powerful. Also see [http://www.cs.york.ac.uk/fp/HaXml/ this paper about HaXml published in 1999] and [http://www-106.ibm.com/developerworks/xml/library/x-matters14.html this IBM developerWorks article].
== Existing languages ==
; '''[[XMLLambda]]''' : XMLLambda is described in a paper by Erik Meijer and Mark Shields. The paper was written in 1999 no implementation is available.
; '''[[XSLT]]''' : [[XSL Transformations|XSLT]] is the best known XML transformation language. The XSLT 1.0 W3C recommendation was published in 1999 together with [[XPath]] 1.0, and it has been widely implemented since then. XSLT 2.0 is expected to be releasedhas soon asbecome a W3C recommendation andsince earlyJanuary 2007 and implementations of the specification like [http://saxon.sourceforge.net/[Saxon SAXONXSLT|Saxon 78]] are already available.
; '''[[XML_query_language|XQuery]]''' : [[XQuery]] is alsoa boundfull tofunctional becomelanguage, despite having "query" in the name. It is a W3Cde-facto standard used by Microsoft, Oracle, DB2, Mark Logic, etc., is the foundation for the [[XRX (web application architecture)|XRX]] web programming model, and has a W3C recommendation for versions 1.0. XQuery is not anwritten in XML application,itself like XSLT. Consequentlyis, so its syntax is much lighter. The language is based on XPath 2.0. XQuery programs cannot have [[Side effect (computer science)|side-effecteffects]]s, 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. In additionXQuery tois thelogic syntaxdriven, theusing mainFOR, differenceWHERE betweenand XSLTfunction andcomposition XQuery(e.g. isfn:concat("<html>", thegenerate-body(), "</html>")). In contrast, XSLT is data-driven (push processing model,) where certain conditions of the input document trigger the execution of templates, whichrather isthan notthe sharedcode withexecuting XQueryin the order in which it is written.
; '''XProc''': [[XProc]] is an XML Pipeline language. The XProc 1.0 W3C Recommendation was published in May 2010.
; '''[[STX]]''' : [[Streaming Transformations for XML|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 ([http://joost.sourceforge.net/ Joost]) and Perl ([http://stxwww.gingerall.czcom/stxcharlie/ga/xml-stx/indexp_stx.htmlxml?s=org XML::STX]).
; '''XML Script''': [[XML Script]] is an imperative scripting language inspired by [[Perl]] that uses the XML syntax. XML Script supports [[XPath]] and its proprietary DSLPath for selecting nodes from the input tree.
; '''FXT''': [[FXT]] is a functional XML transformation tool, implemented in [[ML (programming language)|Standard ML]].
; '''XDuce''': [[XDuce]]''' :is Aa typed language with a lightweight syntax, (compared to XSLT). The implementationIt is written in [[ML_programming_language|ML]].
; '''CDuce''': [[CDuce]] extends [[XDuce]] to a general-purpose [[functional programming language]], see [http://www.cduce.org/ CDuce homepage].
; '''XStream''': [[XStream]] 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]] [[free software license]].
; '''Xtatic''': [[Xtatic]] applies methods from [[XDuce]] to [[C Sharp (programming language)|C#]], see [http://www.cis.upenn.edu/~bcpierce/xtatic/ Xtatic homepage].
; '''HaXml''': [[HaXml]]''' :is Aa library and collection of tools to write XML transformations in [[Haskell (programming language)|Haskell]]. Its approach is very consistent and powerful. Also see [http://www.cs.york.ac.uk/fp/HaXml/ this paper about HaXml published in 1999] and [http://www-106.ibm.com/developerworks/xml/library/x-matters14.html this IBM developerWorks article]. See also the more recent [http://www.flightlab.com/~joe/hxml/ HXML] and Haskell XML Toolbox ([http://www.fh-wedel.de/~si/HXmlToolbox/ 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 (computer scientist)|Erik Meijer]] and [[Mark Shields (computer scientist)|Mark Shields]]. No implementation is available. See [http://www.cartesianclosed.com/pub/xmlambda/ XMLambda home page].
; '''FleXML''': [[FleXML]] is an XML processing language first implemented by Kristofer Rose. Its approach is to add actions to an XML [[Document Type Definition|DTD]] specifying processing instructions for any subset of the DTD's rules.
; '''Scala''': [[Scala (programming language)|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 (Unix)]]
* [[Web template]]
* [[Web template system]]
* [[Template engine (web)]]
 
{{DEFAULTSORT:Xml Transformation Language}}
[[Category:XML-based standards]]
[[Category:Transformation languages|*]]
 
[[fr:Langage de transformation XML]]
[[ja:XML変換言語]]