we have an output schema that has some repeating elements. There is some meta-data in the output XML that we are trying to filter out in the final output. Since this transformation is between the same input/output XML, I am trying to achieve this using transform activity. How can we use XSLT constructs in the transformation activity to achieve this. For example: Records (parent)
-->Record (child unbounded)
--> Id (attribute of Record element)
--> name (attribute of Record element)
If we have a list of record elements, we want to filter/remove all the record elements that starts with name="meta__" in the output XML
Okay, I was just waiting to see whether anyone has a similar scenario, but I already got it to work right after I posted here, but It doesn't look clean. We can filter elements with certain ids with XSL:IF & passing the keys for comparision in the condition. So lets say if we have 25 elements that start with given name with the same prefix, we have to write 25 XSL:IF conditions & give the element attribute key in the comparision condition.
What I am wondering is if there is anyway where we can specify the prefix in a single XSL:IF condition to remove all the elements starting with the same prefix.
Thanks for your time.
I have achieved the same using java API. This is the block of code, through which i achieved
This four API's will help us to communicate with OC4j instance and we can get relevant xml element, in my case i have retrieved input variable from audit instance data.
IBPELProcessHandle processHandle = connectOC4J();
IInstanceHandle instanceHandle = getInstanceHandle(processHandle,instanceID);
String Title = instanceHandle.getTitle();
String processId = instanceHandle.getParentId();
String Status = instanceHandle.getStatus();
HashMap AuditTrail = (HashMap)instanceHandle.getField("inputVariable");
Set keySet = AuditTrail.keySet();
Iterator it = keySet.iterator();
String key = (String)it.next();
Element value = (Element) AuditTrail.get(key); // Element contains input variable data..
Hope this helps you..