XML pipeline

from Wikipedia, the free encyclopedia

An XML pipeline is formed when multiple Extensible Markup Language ( XML ) processes such as transformations and validations are linked together. For example, two transformations, T 1 and T 2 , can be connected to one another in such a way that the input document of T 1 is transformed and then the output of T 1 is considered to be the input document of T 2 .

Linear operations

Simple pipelines such as those described above are said to be linear ; a single input document always goes through the same steps of a transformation in order to ultimately create a single output document.

Here are some examples of operations that can occur in a linear pipeline:

  • Identity Transformation - creates an identical copy of the input as an output
  • Transform - performs a transformation of the input document using a specific XSLT file. Version 1.0 or 2.0 should be specified.
  • Rename - renames elements or attributes without modifying the content
  • Replace - replaces elements or attributes
  • Insert - adds a new data item to the output stream at a specific point
  • Delete - removes an element or attribute
  • Split - splits a single XML document into individual documents
  • Wrap - wraps elements in additional elements
  • Reorder - changes the order of items

Non-linear

Non-linear operations of pipelines are for example:

  • Conditionals - a given transformation is carried out when a certain condition is met, otherwise another transformation is carried out
  • Loops - a transformation is carried out at each node of a node set selected from a document or a transformation until a certain condition becomes false.
  • Tees - several transformations are carried out on a document, which potentially run in parallel
  • Aggregations - several documents are merged into a single document
  • Exception handling - errors during the process result in an alternate pipeline running

Some standards also categorize transformations as macro (changes that affect the entire file) or micro transformations (those that affect only one element or attribute)

XML pipeline languages

XML pipeline languages ​​are used to define pipelines. A program written in an XML pipeline language is implemented by software also known as the XML Pipeline Engine. This creates the processes, connects them with one another and finally executes the entire pipeline. Existing XML pipeline languages ​​are for example:

  • XProc : An XML Pipeline Language is a W3C recommendation.
  • W3C XML Pipeline Definition Language is specified in a W3C Note; Sun provides the implementation.
  • W3C XML Pipeline Language (XPL) Version 1.0 (draft) is specified in a W3C submission and in a component of the Orbeon Presentation Server OPS (now called Orbeon Forms). This specification provides an implementation of an earlier version of the language. XPL allows the declaration of complex pipelines with conditionals, loops, trees, aggregations and sub-pipelines.
  • Cocoon sitemaps provide, among other functions, the declaration of XML pipelines. Cocoon sitemaps are one of the earlier implementations of the XML pipeline concept.
  • smallx XML pipelines are used by the smallx project
  • ServingXML defines vocabulary for representing flat-XML, XML-flat, flat-flat and XML-XML transformations in pipelines.

Pipe granularity

Different XML pipeline implementations support different flow granularities:

  • Document: Complete documents pass through the pipe as atomic units. A document can only be in one place at a time, although sometimes several documents can be in a pipe at the same time.
  • Event: Individual parts of the document can, triggered by events , run in parallel and simultaneously through different paths.

See also

Web links

Individual evidence

  1. XProc at w3.org
  2. XPL: Submission and TR at w3.org