Ravindar, Biztalk Developer and Administrator

Just another BizTalk blog

Grouping in xslt

http://blogs.msdn.com/b/chrisromp/archive/2008/07/31/muenchian-grouping-and-sorting-in-biztalk-maps.aspx
http://blogs.msdn.com/b/skaufman/archive/2005/12/19/505654.aspx

for multilevel grouping concate the fields to create unique key like here
http://www.biglist.com/lists/xsl-list/archives/200101/msg00070.html

while creating keys in xsl, if you want to create keys based on some filed value, use like below

 <xsl:key name="UniquePhoneHomeGroups" match="HorizonEdExtract[PhoneHome/text() != '']" use="concat(ID,PhoneHome)"/>

the above key matches againt all non empty PhoneHome nodes under HorizonEdExtract record.
if you want compare attribute of a node you can use below

<xsl:key name="bookByLanguage" match="book[@isenglish="Yes"]" use="id"/>
or you can use multiple conditions like below 
<xsl:key name="booksEnglishNoPub" match="book[@isenglish='Yes' and @pub-id='']" use="id"/>
(This multiple condition is not tested)

http://p2p.wrox.com/xslt/66290-giving-two-conditions-match-xsl-key.html

Advertisements

July 2, 2011 - Posted by | Biztalk Server

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: