Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
- <xsl:template match="/">
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>pasja</title>
- <link rel="stylesheet" href="style.css"/>
- </head>
- <body>
- <div id="chinczyk">
- <h3>Chinczyk-co to?</h3>
- <xsl:apply-templates select="projekcik/pasja/strona[@part='koszykowka']"/>
- </div>
- <div id="zasady">
- <h3>Zasady</h3>
- <xsl:apply-templates select="projekcik/pasja/strona[@part='zasady']"/>
- </div>
- <br />
- <div id="linki">
- <h3>Linki</h3>
- <xsl:apply-templates select="projekcik/pasja/strona[@part='linki']"/>
- </div>
- <footer>
- <xsl:apply-templates select="projekcik/autor"/>
- </footer>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="img">
- <xsl:choose>
- <xsl:when test="@source = 'img/plan.jpg'">
- <img class="right">
- <xsl:attribute name="src">
- <xsl:value-of select="@source"/>
- </xsl:attribute>
- </img>
- </xsl:when>
- <xsl:otherwise>
- <img class="left">
- <xsl:attribute name="src">
- <a href="{@href}"><xsl:value-of select="."/></a>
- </xsl:attribute>
- </img>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="autor">
- <div class="autor">
- <xsl:text>Stworzone przez: </xsl:text>
- <xsl:for-each select="*">
- <xsl:value-of select="."/>
- </xsl:for-each>
- </div>
- </xsl:template>
- <xsl:template match="linki"> //git
- <xsl:apply-templates select="link[1]"/>
- <xsl:apply-templates select="link[2]"/>
- <xsl:apply-templates select="link[3]"/>
- </xsl:template>
- <xsl:template match="link">
- <li>
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="@href"/>
- </xsl:attribute>
- <xsl:value-of select="."/>
- </a>
- </li>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement