|
Home >Online Product Documentation >Table of Contents >XML Pipeline Components XML Pipeline ComponentsEvery XML pipeline consists of a number of components that represent some aspect of XML processing. Typically, an XML pipeline will contain components that represent
l XML transformations (such as XQuery or XSLT)
l Source documents and data (an XML, or XML data provided by a Web service, for example)
l A flow that identifies the processing stages performed in the XML pipeline (whether XML output goes directly to an XSLT transformation for processing, or is first validated using XML Schema, for example)
You also specify values for the input and output ports on these nodes, which determines the flow of the processing defined in the XML pipeline. This section reviews the components you can include in an XML pipeline. TransformationsA transformation is an operation that takes an input, performs an action on it, and returns an output. Examples of XML transformations include XQuery and XSLT. Transformation output can be a finished product - XSLT that creates an HTML report, for example - or it can be something that is passed along to another operation for additional processing - XQuery that specifies FO post-processing of the XML it generates, or output passed to an XML Schema for validation, for example. You can include the following transformations in an XML pipeline in Stylus Studio:
l XQuery - standard XQuery query, including scenario properties
l XSLT - standard XSLT transformation, including scenario properties
l XSL-FO - XSL-FO processing of XML using Apache FOP or RenderX XEP
l Pipeline - include one pipeline in another
l XML Parser - converts text input to XML
l XML Serializer - converts XML input to text
Flow ControlFlow control nodes control the flow of an XML pipeline. For example, you might choose to use a Stop node to display a message when the XML pipeline encounters an error condition - such as when it requires an XML document fails validation against its XML Schema. You can use the following nodes to control the flow of an XML pipeline in Stylus Studio
l Choose - one or more IF conditions, and an ELSE condition
l Stop - stops XML pipeline processing, if, for example, generated XML does not validate against a given XML Schema
l Validate - uses XML Schema to validate XML
l Warning - displays a warning message in output, but allows XML pipeline processing to continue
Data SourcesData source nodes are used to specify the XML data that is to be processed. For example, your XML pipeline might begin by processing raw XML, or it might require that non-XML data (such as a text file or a relational table) first be converted to XML prior to additional processing. You can use the following nodes to specify data sources in an XML pipeline:
l ConvertToXML - specifies an operation that converts a flat file (CSV, binary, and so on) or EDI message type to XML.
l ConvertFromXML - specifies an operation that converts XML to some other format (CSV, binary, and so on).
l Pipeline Input - specifies an external input to an XML pipeline that includes the XML pipeline in which this node is defined.
l Pipeline Output - specifies an external outout to an XML pipeline that includes the XML pipeline in which this node is defined.
Input and Output PortsXML pipeline nodes are connected to each other by one or more pipes. The pipes represent the flow of XML data from one operation or transformation in the XML pipeline to another. Pipes connect to a node's input and output ports, which are found on most nodes representing XML pipeline components. (Not all nodes have both input and output ports.)
l You use the input port to specify the expected source for the node. You can specify a default value, or you can connect another node's output port to it with a pipe. For example, you might specify the input port for an XQuery node using the URL for an XML document, or as the output from a ConvertToXML node. If a pipe is connected to an input port, any default value is ignored.
l You use the output port to specify what to do with result from the node's processing. You can also specify output ports explicitly or implicitly. For example, you might specify the URL to which you want the output of a node be copied, you might link the output to a Validate node's input port, or you might do both.
You specify the flow of an XML pipeline's processing by linking one node's output port to another node's input port. |