Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3.
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <table border="0" width="700px">
- <tr bgcolor="#DDDDDD">
- <th>Naziv</th>
- <th>Redatelj</th>
- <th>Uloge</th>
- <th>Trajanje</th>
- </tr>
- <xsl:for-each select="Filmovi/Film">
- <xsl:sort select="Naziv"/>
- <xsl:if test="Trajanje > 130">
- <tr>
- <td>
- <xsl:value-of select="Naziv"/>
- </td>
- <td>
- <xsl:value-of select="Redatelj"/>
- </td>
- <td>
- <xsl:value-of select="Uloge"/>
- </td>
- <td>
- <xsl:value-of select="Trajanje"/>
- </td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </table>
- </xsl:template>
- </xsl:stylesheet>
- 4.
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <table border="0" width="700px">
- <tr bgcolor="#DCDCDC">
- <th>Prozivodac</th>
- <th>Model</th>
- <th>Cijena</th>
- <th>Motor</th>
- <th>Broj vrata</th>
- <th>Oprema za maglu</th>
- <th>Metalik boja</th>
- <th>Zaštitni jastuci</th>
- </tr>
- <xsl:for-each select="Automobil">
- <xsl:sort select="Cijena"/>
- <tr>
- <td>
- <xsl:value-of select="Proizvodi"/>
- </td>
- <td>
- <xsl:value-of select="Model"/>
- </td>
- <td>
- <xsl:value-of select="Cijena"/>
- </td>
- <td>
- <xsl:value-of select="Osobine/Motor"/>
- </td>
- <td>
- <xsl:value-of select="Osobine/BrojVrata"/>
- </td>
- <xsl:choose>
- <xsl:when test="DodatnaOprema/OpremaZaMaglu = 'DA'">
- <td bgcolor="green">
- <xsl:value-of select="DodatnaOprema/OpremaZaMaglu"/>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td bgcolor="red">
- <xsl:value-of select="DodatnaOprema/OpremaZaMaglu"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="DodatnaOprema/MetalikBoja = 'DA'">
- <td bgcolor="green">
- <xsl:value-of select="DodatnaOprema/MetalikBoja"/>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td bgcolor="red">
- <xsl:value-of select="DodatnaOprema/MetalikBoja"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="DodatnaOprema/ZasJastuci = 'DA'">
- <td bgcolor="green">
- <xsl:value-of select="DodatnaOprema/ZasJastuci"/>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td bgcolor="red">
- <xsl:value-of select="DodatnaOprema/ZasJastuci"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement