Complete the following steps to design a node to transform the availability list (created as a result of iteration through the For Each loop) to a variable whose data type is typed-XML. To do so, you use methods on the priceAvailTransformations control.
To Design the Interaction With the Transformation Control
AvailQuoteDocument convertAvailListToXML(com.bea.xml.XmlObjectList _XmlObjectListDoc)
AvailQuoteDocument convertAvailListToXML(com.bea.xml.XmlObjectList _XmlObjectListDoc)
The Control Expects field is populated with XmlObjectList, which is the data type expected by the convertAvailListToXML() method on the priceAvailTransformations control.
The Control Returns field is populated with AvailQuoteDocument, which is the data type returned by the convertAvailListToXML() method on the priceAvailTransformations control.
This step completes the design of the Convert AvailList to AvailQuote XML node. At run time, the availability quote data in XML format are assigned to the availQuote variable.
Note About the Transformation on This Node
The convertAvailListToXML() method on the priceAvailTransformations control does the work of creating the availability quote XML data. The input to convertAvailListToXML() is the availability data returned by the availProcessor control after the iterations in the For Each node complete.
You can double-click PriceAvailTransformations.dtf in the Application pane to display the Transformation control in Design View. Right click on convertAvailListToXML method, and select Go to XQuery Document to open the Transformation tool. The following figure shows the map for the convertAvailListToXML() method:
The preceding figure shows the transformation of the data in a variable of type XmlObjectList, which contains a repeating set of untyped XML data, to the repeating element in an XML-typed variable. Note that to achieve this transformation, the repeating element in the target schema must be the single child of a root element. In this case, availRequest is the repeating element, and it is the single child of the availQuote element. Click the Source View tab in the Transformation tool to see the corresponding XQuery.
![]() |
![]() |