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;
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
RETURN orig_value + 100;
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.
- 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.
4 фрилансеров(-а) готовы выполнить эту работу в среднем за $205
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