By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,818 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,818 IT Pros & Developers. It's quick & easy.

How to remove 2 same blocks of xslt and make it dynamic?

P: 1
I am new to XSLT so need help from you guys!
XML file :
Expand|Select|Wrap|Line Numbers
  1. <Employees>
  2.  <Employee ID="1">
  3.    <Name>Shweta</Name>
  4.  <Employee ID="2">
  5.    <Name>Ashish</Name>
  6.  <Employee ID="3">
  7.    <Name>Shikha</Name>
  8. </Employees>
So I want based on employee IDs it should pick employee data.
But ID value should not be hardcoded.

But currently I am using "xsl:choose and when" and "xsl:if" to pick data based on ID which is becoming redundant and XSL is becoming bulky.
So I want to optimize my code.
Please suggest any way of doing the same.
1 Week Ago #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.