We would like to get your comment and feedback on one of our suggestions with regard to improving the performance through WTX for XPath handling over Java. Below are the functionalities that we currently do in Java.
Two inputs: XML message and a metadata with XPaths which will be evaluated in the XML message
1. Detect if all XML elements exist:
a. E.g: The element Message/patAdmission/patient[*]/patIDList/identity/idNum needs to be checked for all instances of Patient.
2. Remove some XML nodes(collection of elements) in the XML:
a. E.g: the element tree Message/pharmDrugOrdUpdCan/pharmOrder[*]/finTrans shoul be removed at all instances of pharmOrder but all other children under pharmOrder should remain.
3. Create new XML elements with concatenating string values:
a. E.g: Enhance the same XML message with inserting a new element Message/clinicalLabOrderMsg/clinicalLabOrder[*]/orders[*]/commOrd[*]/ordAppID/ordBusKey with values from other elements like Message/clinicalLabOrderMsg/clinicalLabOrder[*]/orders[*]/commOrd[*]/ordAppID[*]/placerID/entityID, Message/clinicalLabOrderMsg/encounter/eocNum/idNum and Message/clinicalLabOrderMsg/patient/patIDList/identity/idNum with or w/o some conditions.
In the Java implementations , we do use EvaluateXPath and “//” so that we get the all the instances of the element and evaluate the XPath we create for above functionalities.
So we are trying to see if it is possible to get above functionalities working in WTX as expected. This is where i need your inputs to share with us if this is possible to get all iterations of an XPath and do the EvaluateXpath in WTX and if so how complex it would be.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies Latest Post - 2013-03-14T18:13:33Z by SystemAdmin
Pinned topic XPath Processing in WTX
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-03-14T18:13:33Z at 2013-03-14T18:13:33Z by SystemAdmin
Re: XPath Processing in WTX2013-02-04T20:55:24Z in response to SystemAdminYes, You can accomplish your requirements using WTX.
1. Detect if all XML elements exist:
A schema validation should allow you to do what you are looking for. If additional checks are needed you can use Map rules
2) Remove some XML nodes and create new XML elements with concatenating string values -
Map Rules & your output schema should reflect on how you want to generate the output and you can also use WTX XPATH function to accomplish the same, if you choose to
3 ) This is where i need your inputs to share with us if this is possible to get all iterations of an XPath and do the EvaluateXpath in WTX and if so how complex it would be. -
WTX has concept called functional map that allows you to do a iteration (like for-each). The Design Tool has capability to generate functional maps through wizards and mapping is a simple Drag and Drop approach. So there is no coding involved in WTX all is accomplished through UI
Re: XPath Processing in WTX2013-03-14T18:13:33Z in response to SystemAdmindtx_usr,
Thanks for your reply.
1. All the metadata(source and target) that has XPath entries are coming from database. So all these metadata are dynamic, not static.
2. I can use XPath function to evaluate the XPath metadata coming from database.
3. I am aware of functional map in WTX which i think i have to use anyway.
But the question is more on dynamic mapping. How we can have the source and target xpaths coming from database and do the evaluation of the source xpaths and create the target xpath dynamically.