Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <xsl:stylesheet
  2. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:functx="http://www.functx.com"
  4. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  5. version="2.0">
  6.  
  7. <xsl:output method="xml" indent="yes" />
  8.  
  9. <xsl:template match="/">
  10. <xsl:apply-templates select="legi32/utas" />
  11. </xsl:template>
  12.  
  13. <xsl:template match="utas[@element-type='recordset']">
  14. <table>
  15. <tr>
  16. <th>Név</th>
  17. <th>Születés</th>
  18. </tr>
  19. <xsl:apply-templates />
  20. </table>
  21. </xsl:template>
  22.  
  23. <xsl:template match="utas[@element-type='recordset']/record">
  24. <tr>
  25. <xsl:apply-templates select="nev" />
  26. <xsl:apply-templates select="szuletes" />
  27. </tr>
  28. </xsl:template>
  29.  
  30. <!-- process an empty field -->
  31. <xsl:template match="record/*[@is-null='True']" priority="0.8">
  32. <td/>
  33. </xsl:template>
  34.  
  35. <!-- process a non-empty field -->
  36. <xsl:template match="record/*" priority="0.4">
  37. <td>
  38. <xsl:value-of select="." />
  39. </td>
  40. </xsl:template>
  41. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement