Ravindar, Biztalk Developer and Administrator

Just another BizTalk blog

Grouping in xslt


for multilevel grouping concate the fields to create unique key like here

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)



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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: