Quantcast
Channel: Indrayan's SOA Blog
Viewing all articles
Browse latest Browse all 62

To Pass Complex element as parameter in xslt

$
0
0

1.Introduction

Objective is to pass a parameter which is itself of complex type through xslt.

This document will provide a detailed implementation of the steps to be followed to perform this activity.

2.Execution Approach:

Below are the steps to pass a parameter value(which is a complex element) through xslt:

A..First we have created one param variable and assign its name as ”order”.

B. After that we have assigned input variable to the value part of the param variable.We used ora:getContentAsString() to convert the value of input variable to string.

C.We passed the param variable as a parameter to xslt.

D.In xslt we have first assigned the value of param variable in a temporary variable(name: varParentAccounts).After that we used orcl:parseEscapedXML() function on the temporary variable to get the parsed values and mapped the values to the output variable accordingly.

Sample BPEL Project attached herewith given below.

3.Purpose of using Functions:

a.ora:getContentAsString() takes structured XML data as a parameter and returns a string.Without using ora:getContentAsString() one will get the below error:

“oracle.xml.parser.v2.XMLParseException: Start of root element expected”.

Where xmlns:ora=http://schemas.oracle.com/xpath/extension

b.orcl:parseEscapedXML() function converts the string data into proper

XML format.Without using orcl:parseEscapedXML()one will get the below error:

“XML-22036: (Error) Cannot convert string to NodeSet”

Where xmlns:orcl=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc


Viewing all articles
Browse latest Browse all 62

Trending Articles