|
Home >Online Product Documentation >Table of Contents >Design Approaches Design ApproachesStylus Studio supports bottom-up and top-down approaches to designing XML pipelines. The approach you take depends largely on personal preference, but it can also be influenced by factors such as whether, for example, your XML pipeline will use existing transformations (like XQuery or XSLT) or you will build them specifically for use in the XML pipeline. The following section is intended to give you some ideas for XML pipeline design. Understand the RequirementsRegardless of which approach you choose, you should understand the goal of the XML pipeline before you start building it. For example, you should know For the purposes of describing bottom-up and top-down design approaches in this section, imagine that the requirement for our XML pipeline is to reder data in a text file as PDF. Bottom-Up DesignIn a bottom-up design approach, you already have the individual components, or most of them, that you will link together to form your XML pipeline. If we were using a bottom-up design approach to create an XML pipeline for the use case described in Understand the Requirements, we would: Using a bottom-up design approach, we would then use these source files to build our XML pipeline using the following steps:
1. Create a new XML pipeline document.
2. Create a ConvertToXML node to handle the conversion of CSV to XML. We would specify the source .txt file as the ConvertToXML node's input, and choose the Comma-Separated Values built-in converter to convert the text to XML.
3. Drag our XQuery document from the File Explorer or Project window and drop it on the XML pipeline canvas. This would automatically create and specify the XML pipeline's XQuery node for our XML pipeline. Also, because the XQuery was defined to perform XSL-FO post-processing, Stylus Studio automatically would create an XSL-FO node in the XML pipeline.
4. Connect the output port from the ConvertToXML node to the input port of the XQuery node. This instructs the XML pipeline to use the converted text file (now XML) as input for the XQuery transformation.
5. Specify a URL for the XSL-FO node's output port.
When you use a bottom-up approach, Stylus Studio leverages as much of the existing information in the documents you use to build the XML pipeline as possible. Depending on your design environment, you might need to alter the paths specified for input and output nodes, source documents, and so on, and you will typically have to link the nodes in your XML pipeline by creating pipes between appropriate output and input nodes. Top-Down DesignWhen you use a top-down design approach, you do not have any pre-existing components - XSLT or XQuery documents, for example - or they might not be completely specified. In this situation, you use the XML Pipeline Editor to sketch a design, and then fill in the details once you have them. Returning to the use case described in Understand the Requirements, we would sketch our XML pipeline by:
1. Creating a new XML pipeline document.
2. Dragging a ConvertToXML icon from the Toolbox pane and dropping it on the canvas.
3. Dragging an XQuery icon from the Toolbox pane and dropping it on the canvas.
4. Dragging an XSL-FO icon from the Toolbox pane and dropping it on the canvas.
5. Connecting the ConvertToXML's output port to the input port of the XQuery node.
6. Connecting the XQuery node's output port to the input port of the XSL-FO node.
The top-down approach results in a rough outline of placeholder nodes of the desired XML pipeline - an abstract or conceptual representation of the code we want to generate to perform XML processing. The next steps would be to:
1. Identify the source document for the ConvertToXML node, and selecting the built-in Stylus Studio converter to be used to convert that source file's data to XML.
2. Creating an XQuery document that
Once these documents are created, they can be used to define nodes that represent them in the XML pipeline. You can do this |
Java Web Services
Stylus Studio's Web Service Call Composer simplifies Java Web Service development by making it easy to find, invoke, and test any Java Web Service deployed on any popular Java Web Service framework, such as Apache AXIS.
DTD Parser
Learn about the powerful DTD parser technologies that are supported in Stylus Studio's DTD tools, including DOM and SAX based DTD parsing components.
XML-DEV Discussion Forum
XML-DEV is a leading technical forum for XML discussion and a valuable free XML learning resource. Subscribe to the XML-DEV email discussion forum today to help further your XML education.
Support for DataDirect SequeLink
Learn about Stylus Studio's support for DataDirect SequeLink, an end-to-end database middleware solution that provides a universal thin client for ODBC, JDBC, ADO or .NET, providing flexibility for both client- and server-based deployments.


