BizTalk 2004 Map, Getting Distinct Values using an Inline XSLT Call Template
Posted: Wednesday, November 24, 2004 9:31 AM
by
matt
Filed under: Newsletter, BizTalk
Need to get a distinct list of items from an XML message.
For example the XML message containing Order Items is as below:

(Note: That the Order ids are not sorted)
From the above message produce a distinct list of order ids such as below:

The custom XSLT code to get the distinct list of values looks like this:

To use an Inline XSLT Call Template inside of a BizTalk 2004 Map,
a) Create a new Map inside of your BizTalk project
b) Choose the source and destination schemas
c) Drop a Scripting Functoid on the Map, then in the properties window with
the Scripting Functoid selected, press the -> Configure Functoid Script button.
d) For the Script type choose -> Inline XSLT Call Template. Place the XSLT into the Inline Script Buffer
window.
The map to get the distinct Order Ids looks like the below:

Note : The scripting functoid inside of the map has no incoming or outgoing links.
The Custom XSLT will handle the complete transformation. Ignore any warnings about no incoming
or outgoing links when building the project.
Download the Complete solution HERE