XProc
≈ 4 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
XProc is an XML transformation language for processing documents in pipelines: chaining conversions and other steps together to achieve the desired results. It can handle documents in XML, HTML, JSON, text and binary. The current (stable) version is 3.1. While XProc 1.0 is a W3C Recommendation, XProc 3.1 is a standard developed by the W3C XProc Next Community Group. Its main characteristics are: * XProc is a programming language, expressed in XML, in which you can write pipelines. * An XProc pipeline takes data as its input (often XML) and passes this through specialized steps to produce end results. * Steps range from simple ones, like adding attributes, to more complex stuff like splitting/combining/pruning, transformations with XSLT and XQuery, validations against schemas, etc. * Within a pipeline you can do things like working with variables, branching, looping, catch errors, etc. Everything is based on the data flowing through. * XProc pipelines are not limited to a linear succession of steps. They can fork and merge. * XProc allows you to create custom steps by combining other steps. These custom steps can be used just like any other. Therefore, pipelines and steps are interchangeable concepts in XProc. * Custom steps can be collected into libraries.…
XProc is an XML transformation language for processing documents in pipelines: chaining conversions and other steps together to achieve the desired results. It can handle documents in XML, HTML, JSON, text and binary. The current (stable) version is 3.1. While XProc 1.0 is a W3C Recommendation, XProc 3.1 is a standard developed by the W3C XProc Next Community Group. Its main characteristics are: XProc is a programming language, expressed in XML, in which you can write pipelines. An XProc pipeline takes data as its input (often XML) and passes this through specialized steps to produce end results. Steps range from simple ones, like adding attributes, to more complex stuff like splitting/combining/pruning, transformations with XSLT and XQuery, validations against schemas, etc. Within a pipeline you can do things like working with variables, branching, looping, catch errors, etc. Everything is based on the data flowing through. XProc pipelines are not limited to a linear succession of steps. They can fork and merge. XProc allows you to create custom steps by combining other steps. These custom steps can be used just like any other. Therefore, pipelines and steps are interchangeable concepts in XProc. Custom steps can be collected into libraries. XProc aids in the housekeeping surrounding the processing, like inspecting directories, reading documents from zip files, writing things to disk, etc There is software that can execute these pipelines, the so-called XProc processors. It declares two ports: An input port called source . This is where the original document flows in. An output port called result . This is where the resulting document flows out. The document that comes in through the source port automatically flows into the first step of the pipeline. This p:add-attribute step adds an attribute called timestamp with the current date and time. The result of this flows through the p:delete step that removes all attributes called data . Since p:delete is the last step, the resulting document flows out through the output result port. So if you supply the following XML document to this pipeline: Some data... It comes out as: Some data... The exact date and time recorded in the timestamp attribute is of course dependent on the date and time the pipeline is executed. ==References==
Text derived from https://en.wikipedia.org/w/index.php?oldid=1353073229 under CC BY-SA 4.0; modifications have been made.