Get Uniques values from a list through XSLT
Get Unique values for a list of values
xxxx
yyyy
xxxx
The desired output is:
xxxx
yyyy
so use this
<xsl:variable name="unique-list" select="//state[not(.=following::state)]" /> for example like below <xsl:variable name="unique-list" select="s4:AdTermID[not(.=following::s4:AdTermID)]" />
the above statement will get the unique values in to that variable (just like it is an array)
if you want to make a for each loop based on this unique values use below code
<xsl:for-each select="$unique-list"> your logic here </xsl:for-each>
if you want to compare any value to this array element use below code where AdTermID is the elemnt
<xsl:if test="your elment here=s4:AdTermID[not(.=following::s4:AdTermID/text())]">
when you try to compare a value with thes values in the array you should use /text()
source of article
http://www.bernzilla.com/item.php?id=333
see the comments of Abhinav Maheshwari
No comments yet.
Leave a Reply
-
Recent
- Microsoft.BizTalk.ExplorerOM.dll is different from version to version
- Using EXSLT in BizTalk
- For loop in xslt
- Reset Outlook Connection
- Validate incoming message in xml default pipeline
- Biztalk orchestration patterns
- Grouping in xslt
- why do we need to call pipeline from orchestration and how do we do it?
- BizTalk Aggregation Pattern for Large Batches
- Get Uniques values from a list through XSLT
- Virtual PC console not showing up
- Directly querying the BizTalk database for suspended messages
-
Links
-
Archives
- May 2012 (1)
- January 2012 (2)
- November 2011 (1)
- July 2011 (3)
- June 2011 (12)
- May 2011 (1)
- April 2011 (1)
- March 2011 (1)
- November 2010 (1)
- October 2010 (10)
- September 2010 (7)
- July 2010 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS