The new XML pipeline is essentially a chain of XML operations that control data transformations of XML and non-XML data. XML pipelining seems to be the counterpart to SQL stored procedures.
Unlike procedures that use code to process data flows, Stylus Studio uses graphical map diagrams to elegantly control many data sources using validations and conditions based on XML Schemas, XSLT and XQuery. Stylus uses six graphical icons to describe XML piping between nodes and ports. Like process flows, pipeline outputs can be diverted to multiple sources and can be stopped if necessary. Stylus provides an additional pipeline step called XSL-FO using XQuery that can transform XML documents into a PDF output.
Undoubtedly, XQuery is the most powerful operation used in the new Stylus XML pipelines. Perhaps the easiest way to build XQueries is by using the Stylus Mapper, which combines source and target documents graphically. Mapper also can use XSD or DTD to build XQueries as long as XML documents are collected by the tool. XSD or DTD sources are used to generate XPath document functions in XQuery code.
Once an XML document is uploaded, Mapper provides all document details, including connections between source elements and Schemas. In addition to linking source and target elements, developers also can add source document nodes as child elements or by copying entire nodes into target structures. Mapper can help create new structures by simply connecting source and target elements with FLOWR (For, Flow, Where, Order, Return) operations.
FLOWR operations are the most powerful and direct procedures for building new structures from source documents. Like SQL Select statements, FLOWR expressions can massage multiple XML nodes into uniformed output structures. Developers also can enforce data types in FLOWR outputs to detect errors when linking nodes.
In addition, Stylus Studio provides some extensions such as Distinct, which are not well defined by the standards committee. Many of these non-standard functions are increasingly important because they cover many SQL functions that are not addressed by the W3C.
Besides FLOWR, Mapper provides conditional statements and special XQuery functions to access external data sources. For instance, the XQuery collection function can process data from relational databases as if it were XML documents inside Stylus Studio. XQuery also embeds Web service calls.