TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ani
169
11.2k
35.3k
sorting and sequencing in xslt transformation
Jan 4 2021 5:03 AM
Hi,
I have a service response like below xml and applying xslt, it is returning same first result details for all iterations. I have to sort the results based on sequenceNumber. Please help me.
Response XML
<resultsList>
<Accountdata>
<sequenceNumber>1</sequenceNumber>
<name>abc</name>
<country>usa</country>
</Accountdata>
<Accountdata>
<sequenceNumber>2</sequenceNumber>
<name>def</name>
<country>usa</country>
</Accountdata>
<Accountdata>
<sequenceNumber>3</sequenceNumber>
<name>ghi</name>
<country></country>
</Accountdata>
<Accountdata>
<sequenceNumber>4</sequenceNumber>
<name>xyz</name>
<country>france</country>
</Accountdata>
</resultsList>
transform xslt
<resultsList>
<xsl:for-each select="//resultsList/Accountdata">
<xsl:sort select="//resultsList/Accountdata/sequenceNumber" order="ascending"/>
<Accountdata>
<sequenceNumber>
<xsl:value-of select="//resultsList/Accountdata/sequenceNumber" />
</sequenceNumber>
<name>
<xsl:value-of select="resultsList/Accountdata/name" />
</name>
<country>
<xsl:value-of select="resultsList/Accountdata/country" />
</country>
</Accountdata>
</xsl:for-each>
</resultsList>
After transformation results xml
<resultsList>
<Accountdata>
<sequenceNumber>1</sequenceNumber>
<name>abc</name>
<country>usa</country>
</Accountdata>
<Accountdata>
<sequenceNumber>1</sequenceNumber>
<name>abc</name>
<country>usa</country>
</Accountdata>
<Accountdata>
<sequenceNumber>1</sequenceNumber>
<name>abc</name>
<country>usa</country>
</Accountdata>
<Accountdata>
<sequenceNumber>1</sequenceNumber>
<name>abc</name>
<country>usa</country>
</Accountdata>
</resultsList>
Reply
Answers (
1
)
Mail trigger to multiple members
error connecting: timeout expired.In iis ?