BizTalk 2004 Map, Getting Distinct Values using an Inline XSLT Call Template

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

Comments

  • matt December 13, 2004 3:17 AM

    Hi Matt,

    I've recently had to do something similar - basically extract a hierarchical structure from a set of denormalised relational data. I'd come to much the same conclusion with XSLT in an inline call template, before I realised you could set a "Custom XSLT Path" property on the map. If your inline code does the entire transformation anyway, I don't think you lose much by removing the script object - it fixes the compiler warnings and the code's a lot easier to edit if it's stored outside of that non-resizable script dialog!

  • matt March 3, 2005 7:09 AM

    dfsa

  • TrackBack December 15, 2005 9:30 PM

  • TrackBack December 15, 2005 9:39 PM

  • matt October 30, 2006 6:16 PM

    hi

    your posting seems to be so interesting. can you give me the XSLT code for creating two new nodes under a record in destination schema using scripting functoid?

    Thanks

Leave a Comment

(required) 
(optional)
(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS