Advertisement
lukusm

Untitled

Jan 8th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.66 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <!--
  4.     Document   : newstylesheet.xsl
  5.     Created on : 8 styczeń 2015, 01:05
  6.     Author     : Lukasz
  7.     Description:
  8.         Purpose of transformation follows.
  9. -->
  10.  
  11. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  12.     <xsl:output method="html"/>
  13.  
  14.     <!-- TODO customize transformation rules
  15.          syntax recommendation http://www.w3.org/TR/xslt
  16.     -->
  17.     <xsl:template match="/">
  18.     <html>
  19.       <head><link rel="styesheet" type="text/css" href="style.css"/></head>
  20.       <title>newstylesheet.xsl</title>
  21.       <body>
  22.            <xsl:apply-templates/><br/>
  23.            testowo
  24.                     <img src="image/virtuspro.jpg" />
  25.       </body>
  26.     </html>
  27.   </xsl:template>
  28.     <xsl:template match="druzyna">
  29.                 <h1>
  30.                     Informacje turniejowe
  31.                 </h1>
  32.                 <div class="info">
  33.                     <xsl:for-each select="druzyna">
  34.                     <div class="druzyna">
  35.                         <div class="kraj">
  36.                             Kraj: <xsl:value-of select="@kraj" /><br />
  37.                             Decyzja: <xsl:value-of select="@decyzja" />
  38.                         </div>
  39.                         <div id="nazwa">
  40.                             <xsl:value-of select="nazwa" />
  41.                         </div>
  42.                         <div id="nazwa">
  43.                             <xsl:value-of select="kapitan" />
  44.                         </div>
  45.                         <div id="nazwa">
  46.                             <xsl:value-of select="data_przyjazdu" />
  47.                         </div>
  48.                         <div id="nazwa">
  49.                             test
  50.                             <xsl:value-of select="kod_druzyny" />
  51.                         </div>
  52.                         <div id="image">
  53.                             <!--img src="../image/virtuspro.jpg" /--> (TEST - to nie wyświetla)
  54.                             <xsl:element name="img">
  55.                                 <xsl:attribute name="src">
  56.                                     ../<xsl:value-of select="image" />
  57.                                 </xsl:attribute>
  58.                             </xsl:element>
  59.                             <!--img src="{//turniej/druzyna/image}"/-->  (TEST - to nie działa)
  60.                         </div>
  61.                         <div id="status">
  62.                             <xsl:value-of select="dyskwalifikacja" />
  63.                         </div>
  64.                     </div>
  65.                     </xsl:for-each>
  66.                 </div>
  67.                 <xsl:apply-templates />
  68.     </xsl:template>
  69.  
  70. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement