Adding an XQuery Node

Now that we understand how the XQuery code in createFullOrder.xquery uses a FLWOR expression to join data from our data sources, we can add it to our XML pipeline.

To add an XQuery node to an XML pipeline:
1. Drag the XQuery icon from the Toolbox pane and drop it on the XML pipeline canvas.

Stylus Studio creates an XQuery node and displays it in the XML pipeline diagram.

2. Display the Properties window ( View > Properties) if it is not already open.
3. Display the Project window ( View > Project) if it is not already open.
4. Drag createFullOrder.xquery and drop it on either
    • The XQuery node on the XML pipeline diagram
    • The Value field for the .xquery file property

The XQuery node now has two additional input ports, one named allBooks, and the other named ediOrder.

Figure 401. XQuery Node for createFullOrder.xquery

These input ports are colored green, indicating that each has a default value specified for it. These default values correspond to the two data sources we specified as source documents in the XQuery Mapper.

Tip

 

If you drop createFullOrder.xquery directly on the XML pipeline canvas, Stylus Studio automatically creates the ConvertToXML nodes that represent the data sources it uses. See An Alternate Way to Create ConvertToXML Nodes.

5. Change the XQuery node's default name, XQuery operator, to Extract full order information. (See Renaming Nodes if you need help with this step.)

Changes to Source Documents

XML pipelines reference external documents, like the createFullOrder.xquery document we just added. They do not create copies of these documents. Therefore, when changes to a source document are saved, the XML pipeline picks up these changes the next time it is executed.

XML to PDF

Convert XML to PDF using Stylus Studio's XML publishing tools - the easiest way to design beautiful document layouts for use in XSL:FO based multi-channel publishing and single source publishing applications.

XSD Documentation Generator

Stylus Studio®'s XSD Editor includes an integrated XSD documentation generator, allowing you to easily publish XML content models defined in XSD in a convenient, HTML format.

ADO to XML

The Stylus Studio ADO to XML data coversion wizard simplifies extracting of relational data into any XML format.

EDI Mapping

To transform EDI to XML, whether for X12 or EDIFACT, Stylus Studio provides the design tools and run-time support. EDIFACT, X12 and custom EDI formats can be translated, validated and mapped using the EDI Mapping adapter technology described here.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.