XML XQuery transform with call to PL/SQL

Completed Posted 3 years ago Paid on delivery
Completed Paid on delivery

I need to transform some values in XML records using calls to a PL/SQL function.

I require this functionality to be contained in a PL/SQL function called fn_fe() whose prototype is as follows:

FUNCTION fn_fe( var_xpath VARCHAR2, var_rec XMLTYPE ) RETURN XMLTYPE;

Where:

var_xpath = A string representing an XPath of all matching elements whose value/attribute is to be modified.

var_rec = The original XML record

Return = The modified XML record

From within fn_fe(), it is expected that XQuery is used to parse the XML record for matching paths. At some point, you must call the PL/SQL function my_transform(), supplied below, to obtain the transformed value for each matching element original value. Note: Do not rewrite the my_transform() as XQuery code. The whole point of this requirement is for fn_fe() to call a PL/SQL function (i.e. my_transform()) to perform the transformation on each element value that matches the path.

CREATE OR REPLACE FUNCTION my_transform( orig_value INT) RETURN INT

IS

BEGIN

RETURN orig_value + 100;

END;

OTHER REQUIREMENTS & CONSIDERATIONS:

- It is expected that on each call to this function fn_fe(), approximately 0 - 20 paths will match. i.e. that many values will need to be updated per XML record. Please mention the word "stereo" in your bid so that I know you have read this spec. The XML test record shown in attachment is a much smaller fictitious example for clarity and test purposes. The real XML records will typically contain between 100 and 500 elements, some may be larger.

- It is expected that this function will be used to process 5 million XML records on a periodic basis, so this must be as efficient as possible.

DELIVERABLE:

- The complete PL/SQL function fn_fe() as described. I should be able to just compile the supplied my_transform() and your fn_fe(), and then calling fn_fe() should return XML records matching those shown in Test1 and Test2 of attachment.

XML XQuery Oracle

Project ID: #27572959

About the project

4 proposals Remote project Active 3 years ago

Awarded to:

dohungnd94

Dear employer. stereo. I have read your requirements carefully. With over 5 years experience working as plsql developer. I will help you create a function which return an updated xmltype value. I am working for ban More

$140 AUD in 3 days
(0 Reviews)
0.8

4 freelancers are bidding on average $205 for this job

adeeladeel1234

Hi i am expert programmer for sql plsql xml xslt xquery , i can do this task proficiently please do review my profile and send me message to discuss your requirements in details

$278 AUD in 1 day
(55 Reviews)
6.0
wahmad1983

Hi Team, Hope you are doing good. I am having around 11 years of IT experience which Includes mainly in the area of Database development,Design,Maintenance,Management along with worked on many data Warehouse projects. More

$250 AUD in 7 days
(0 Reviews)
0.0