fork download
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <xsl:stylesheet version="1.0" xmlns:xsl="http://w...content-available-to-author-only...3.org/1999/XSL/Transform">
  4.  
  5.  
  6. <xsl:template match="/">
  7. <html>
  8. <head>
  9. <link rel="stylesheet" href="style.css" type="text/css" />
  10. <title>Kino</title>
  11. </head>
  12. <body>
  13. <nav>
  14. <h1>Kinematografia</h1>
  15. <ol>
  16. <xsl:apply-templates select="kinematografia/serial | kinematografia/film" mode="header"/>
  17. </ol>
  18. </nav>
  19. <section>
  20. <div id="seans">
  21. <table id="seans">
  22. <tr>
  23. <th>Tytuł</th>
  24. <th>Dzień</th>
  25. <th>Miesiąc</th>
  26. <th>Godzina</th>
  27. <th>Sala</th>
  28. <th>Wolne Miejsca</th>
  29. <th>Cena</th>
  30. </tr>
  31. <xsl:apply-templates select="kinematografia/serial | kinematografia/film" mode="seans"/>
  32. </table>
  33. </div>
  34. <div id="kinoImg">
  35. <xsl:apply-templates select="kinematografia/kinoImg"/>
  36. </div>
  37. <div>
  38. <h2>Produkcje familijne</h2>
  39. <xsl:apply-templates select="kinematografia/film[@dlaDzieci='tak'] | kinematografia/serial[@dlaDzieci='tak']" mode="prom"/>
  40. </div>
  41. <div id="prom">
  42. <h4>Szcególnie Polecamy</h4>
  43. </div>
  44. <div>
  45. <h3>Nasze Filmy</h3>
  46. <ol>
  47. <xsl:apply-templates select="kinematografia/film" mode="listaFilmy"/>
  48. </ol>
  49. </div>
  50. <div>
  51. <h3>Nasze Seriale</h3>
  52. <ol>
  53. <xsl:apply-templates select="kinematografia/serial" mode="listaSeriale"/>
  54. </ol>
  55. </div>
  56. <div>
  57. <h3>Wielce wyróżnione</h3>
  58. <ol>
  59. <xsl:apply-templates select="kinematografia/film/ocena/profesjonaliści[oskary>0]" mode="perły"/>
  60. </ol>
  61. </div>
  62. </section>
  63. </body>
  64. </html>
  65.  
  66. </xsl:template>
  67. <xsl:template match="serial | film" mode="header">
  68. <ol>
  69. <li>
  70. <xsl:value-of select="tytuł"/>
  71. </li>
  72. <li>
  73. <xsl:value-of select="ocena/internauci/filmweb"/>
  74. </li>
  75. </ol>
  76. </xsl:template>
  77. <xsl:template match="serial | film" mode="seans">
  78. <tr>
  79. <td>
  80. <xsl:value-of select="tytuł"/>
  81. </td>
  82. <td>
  83. <xsl:value-of select="seans/data/dzień"/>
  84. </td>
  85. <td>
  86. <xsl:value-of select="seans/data/miesiąc"/>
  87. </td>
  88. <td>
  89. <xsl:value-of select="seans/data/godzina"/>
  90. </td>
  91. <td>
  92. <xsl:value-of select="seans/sala"/>
  93. </td>
  94. <td>
  95. <xsl:value-of select="seans/wolneMiejsca"/>
  96. </td>
  97. <td>
  98. <xsl:value-of select="seans/cena/normalny"/>
  99. </td>
  100.  
  101. <td></td>
  102. </tr>
  103. </xsl:template>
  104. <xsl:template match="kinoImg">
  105. <xsl:element name="img">
  106. <xsl:attribute name="src">
  107. <xsl:value-of select="."/>
  108. </xsl:attribute>
  109. </xsl:element>
  110. </xsl:template>
  111. <xsl:template match="film[@dlaDzieci='tak'] | serial[@dlaDzieci='tak']">
  112. <h4>
  113. <xsl:value-of select="tytuł"/>
  114. </h4>
  115. <xsl:element name="img">
  116. <xsl:attribute name="src">
  117. <xsl:value-of select="zdjęcie"/>
  118. </xsl:attribute>
  119. </xsl:element>
  120. </xsl:template>
  121. <xsl:template match="film" mode="listaFilmy">
  122. <li>
  123. <ol>
  124. <li>
  125. <xsl:value-of select="tytuł"/>
  126. </li>
  127. <li>
  128. <xsl:value-of select="produkcja/reżyser"/>
  129. </li>
  130. </ol>
  131. </li>
  132. </xsl:template>
  133. <xsl:template match="serial" mode="listaSeriale">
  134. <li>
  135. <ol>
  136. <li>
  137. <xsl:value-of select="tytuł"/>
  138. </li>
  139. <li>
  140. <xsl:value-of select="produkcja/reżyser"/>
  141. </li>
  142. </ol>
  143. </li>
  144. </xsl:template>
  145. <xsl:template match="profesjonaliści" mode="perły">
  146. <li>
  147. <xsl:value-of select="oskary"/>
  148. </li>
  149. </xsl:template>
  150. </xsl:stylesheet>
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
<?xml version="1.0" encoding="UTF-8"?>
^
Main.java:1: error: class, interface, or enum expected
<?xml version="1.0" encoding="UTF-8"?>
 ^
Main.java:1: error: class, interface, or enum expected
<?xml version="1.0" encoding="UTF-8"?>
  ^
3 errors
stdout
Standard output is empty