About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Question & Answer
Question
Advanced filter condition in XSLT for-each - Filtering specific set of nodes based on a condition
Answer
On Demand Consulting
Author: Vinoth Philominraaj
These steps provide details on how to filter a specific set of nodes from a list and map them using XSLT map.
1. In the XSLT map identify the list fields and map from source to target.
2. Select / make sure For-each is selected for the map
3. Click on For-each and open the properties
4. In properties tab, select Filter Inputs and provide the rule for filter.
5. Using Ctrl+Space appropriate XPath can be selected with correct variable tag.
Example:
In the sample below, the requirement is to filter and map Party details for roles Primary and Contact


Author: Vinoth Philominraaj
These steps provide details on how to filter a specific set of nodes from a list and map them using XSLT map.
1. In the XSLT map identify the list fields and map from source to target.
2. Select / make sure For-each is selected for the map
3. Click on For-each and open the properties
4. In properties tab, select Filter Inputs and provide the rule for filter.
5. Using Ctrl+Space appropriate XPath can be selected with correct variable tag.
Example:
In the sample below, the requirement is to filter and map Party details for roles Primary and Contact


[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQTW3","label":"IBM On Demand Consulting for Hybrid Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
More support for:
IBM On Demand Consulting for Hybrid Cloud
Software version:
All Versions
Document number:
776241
Modified date:
17 March 2019
UID
ibm10776241
Manage My Notification Subscriptions