Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. exclude-result-prefixes="xs"
  5. version="2.0">
  6.  
  7.  
  8. <xsl:output method="html" indent="yes"></xsl:output>
  9. <xsl:template match="/ReviewApplication">
  10.  
  11.  
  12. <html><head><title>ReviewApplication</title></head><body>
  13. <table border="1">
  14. <tr>
  15. <th>UserName</th>
  16. <th>Recommendations</th>
  17. </tr>
  18.  
  19.  
  20.  
  21. <xsl:for-each select="Users/User[UserName='username5']">
  22. <xsl:variable name="username" select="UserName"></xsl:variable>
  23.  
  24.  
  25. <tr>
  26. <td>
  27. <xsl:value-of select="$username/text()"></xsl:value-of>
  28. </td>
  29.  
  30.  
  31.  
  32. <td>
  33. <xsl:value-of select="count(/ReviewApplication/Recommendations/Recommendation/UserName/text()='username5')"></xsl:value-of>
  34. </td>
  35.  
  36.  
  37.  
  38. </tr>
  39. </xsl:for-each>
  40. </table>
  41. </body></html>
  42. </xsl:template>
  43.  
  44. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement