Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xml_tube>
- <utilizadores>
- <utilizador username="Guicky" password="futurama96">
- <nome>Guilherme Luís</nome>
- <birthday>1996-11-28</birthday>
- <foto href="guilhas.jpg"/>
- </utilizador>
- <utilizador username="Daisy" password="woofwoof11">
- <nome>Daisy Luís</nome>
- <birthday>2011-04-04</birthday>
- <foto href="daisy.png"/>
- </utilizador>
- <utilizador username="Anabela65" password="crumble65">
- <nome>Anabela Ribeiro</nome>
- <birthday>1965-04-02</birthday>
- <foto href="belinha.jpg"/>
- </utilizador>
- <utilizador username="Izzie" password="lagartixa">
- <nome>Isadora Luís</nome>
- <birthday>1988-06-27</birthday>
- <foto href="izzie.jpg"/>
- </utilizador>
- </utilizadores>
- <videos_pub>
- <video id="Vid1" publisher="Daisy" duracao="3:37" data="2016-02-29">
- <título>Who let the dogs out? - Baha Men</título>
- <thumb>http://i3.ytimg.com/vi/Qkuu0Lwb5EM/hqdefault.jpg</thumb>
- <descrição>My favorite song, lol.</descrição>
- <hyperlink>https://www.youtube.com/watch?v=Qkuu0Lwb5EM</hyperlink>
- <qualidade pixelization="1080p"/>
- <qualidade pixelization="480p"/>
- <likes liked="Guicky"/>
- <related></related>
- </video>
- <video id="Vid2" publisher="Guicky" duracao="4:01" data="2016-02-29">
- <título>Desiigner - Timmy Turner</título>
- <thumb>http://i3.ytimg.com/vi/JzmRt2VgKYQ/hqdefault.jpg</thumb>
- <descrição>Timmy Timmy Timmy Turner.</descrição>
- <hyperlink>https://www.youtube.com/embed/ProbPpO_8oo</hyperlink>
- <qualidade pixelization="720p"/>
- <qualidade pixelization="1080p"/>
- <likes liked="Anabela65"/>
- <likes liked="Daisy"/>
- <related></related>
- </video>
- <video id="Vid3" publisher="Guicky" duracao="3:47" data="2016-02-29">
- <título>I'm all the way up - Fat Joe</título>
- <thumb>https://www.youtube.com/watch?v=y2ak_oBeC-I</thumb>
- <descrição>Nothing can stop me, I'm all the way up.</descrição>
- <hyperlink>https://www.youtube.com/embed/y2ak_oBeC-I</hyperlink>
- <qualidade pixelization="480p"/>
- <qualidade pixelization="720p"/>
- <related></related>
- </video>
- <video id="Vid4" publisher="Anabela65" duracao="3:21" data="2016-02-29">
- <título>Putzgrilla - Sentadinha</título>
- <thumb>http://i3.ytimg.com/vi/QC4JbIvIhdI/hqdefault.jpg</thumb>
- <descrição>Dá uma sentadinha.</descrição>
- <hyperlink>https://www.youtube.com/watch?v=QC4JbIvIhdI</hyperlink>
- <qualidade pixelization="720p"/>
- <likes liked="Guicky"/>
- <likes liked="Daisy"/>
- <related></related>
- </video>
- <video data="2017-01-13" duracao="02:16" id="Vid5" publisher="Izzie">
- <título>Yann Tiersen - La Valse d'Amelie</título>
- <thumb>http://i3.ytimg.com/vi/uzurqBnALkw/hqdefault.jpg</thumb>
- <descrição>A minha música preferida.</descrição>
- <hyperlink>https://www.youtube.com/watch?v=uzurqBnALkw</hyperlink>
- <qualidade pixelization="720p"/>
- <likes liked="Guicky"/>
- <likes liked="Anabela65"/>
- <related></related>
- </video>
- </videos_pub>
- <playlist>
- <lista owner="Guicky" dataIns="2016-10-24" id="PV1">
- <titulo>BEST MUSIC.</titulo>
- <descricao>Compilation of my favourite music videos.</descricao>
- <gostosL gostouL="Guicky"/>
- <links_vid vid="Vid2"/>
- <links_vid vid="Vid3"/>
- <administradores>
- <admin ref="Guicky"/>
- <admin ref="Daisy"/>
- </administradores>
- <editores>
- <editor ref="Guicky"/>
- </editores>
- <subscritores>
- <subs ref="Daisy"/>
- <subs ref="Anabela65"/>
- </subscritores>
- <thumbnail link="http://i3.ytimg.com/vi/QC4JbIvIhdI/hqdefault.jpg"/>
- </lista>
- <lista owner="Anabela65" dataIns="2016-02-29" id="PV2">
- <titulo>Sentadinha!</titulo>
- <descricao>Siting lesson's with Guicky's mom!</descricao>
- <links_vid vid="Vid4"/>
- <administradores>
- <admin ref="Anabela65"/>
- <admin ref="Guicky"/>
- </administradores>
- <editores>
- <editor ref="Anabela65"/>
- </editores>
- <subscritores>
- <subs ref="Guicky"/>
- <subs ref="Daisy"/>
- </subscritores>
- <thumbnail link="http://i3.ytimg.com/vi/uMK0prafzw0/hqdefault.jpg"/>
- </lista>
- </playlist>
- <comentarios>
- <comentario id="C1" refV="Vid1" user="Guicky" data="2016-10-23">
- <text>AHAHAHAHA, bom vídeo.</text>
- <gosto gostou="Daisy"/>
- <respostas>
- <texto autor="Daisy">Grande clássico!</texto>
- </respostas>
- </comentario>
- <comentario id="C2" refL="Vid2" user="Anabela65" data="2016-10-22">
- <text>Timmy timmy timmy turner...</text>
- <gosto gostou="Guicky"/>
- <gosto gostou="Daisy"/>
- <respostas>
- <texto autor="Guicky">U know it.</texto>
- <resposta autor="Daisy">LOL!</resposta>
- </respostas>
- </comentario>
- </comentarios>
- </xml_tube>
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:output doctype-public="-//W3C//DTD XHTML 1.1//EN"
- doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
- <xsl:template match="/">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="eng">
- <head>
- <title>My XML Tube</title>
- <link rel="stylesheet" type="text/css" href="XML_Tube.css" charset="UTF-8"/>
- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"/>
- <link rel="icon"
- type="image.png"
- href="favicon-16.png"/>
- </head>
- <body>
- <div class="spacer"/>
- <a href="https://www.youtube.com">
- <img id="img" src="img/logos/logo.png"/>
- </a>
- <nav>
- <ul>
- <li><a href="home.html">Playlists</a>
- <ul>
- <li><a href="../XMLTube.xml#body">Playlist</a></li>
- <li><a href="">Playlists</a></li>
- </ul>
- </li>
- <li><a href="portfolio.html">Utilizadores</a>
- <ul>
- <li><a href="Portfolio.html#NOSLeague">Um utilizador</a></li>
- <li><a href="Portfolio.html#PremierLeague">Lista geral de utilizadores</a></li>
- </ul>
- </li>
- <li><a href="contacts.html">Vídeos</a>
- <ul>
- <li><a href="Contacts.html#gui">Vídeo</a></li>
- <li><a href="Contacts.html#rodri">Lista geral de vídeos</a></li>
- </ul>
- </li>
- </ul>
- </nav>
- <h1>Lista de Utilizadores</h1>
- <xsl:for-each select="xml_tube/utilizadores">
- <xsl:for-each select="utilizador">
- <xsl:for-each select="foto">
- <xsl:element name="img">
- <xsl:attribute name="src">
- <xsl:value-of select="@href"/>
- </xsl:attribute>
- <xsl:attribute name="width">20%</xsl:attribute>
- <xsl:attribute name="height">auto</xsl:attribute>
- </xsl:element>
- </xsl:for-each>
- <xsl:variable name="utilizadores" select="@username"/>
- <p><strong>Username: </strong><xsl:value-of select="@username"/></p>
- <p><strong>Nome: </strong> <xsl:value-of select="nome"/></p>
- <p><strong>Birthday: </strong> <xsl:value-of select="birthday"/></p>
- <p><strong>Vídeos Publicados:</strong> <xsl:value-of select="xml_tube/videos_pub/video[@publisher=$utilizadores]/título"/></p>
- </xsl:for-each>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- <xsl:variable name="utilizadores" select="@username"/>
- <p><strong>Username: </strong><xsl:value-of select="@username"/></p>
- <p><strong>Nome: </strong> <xsl:value-of select="nome"/></p>
- <p><strong>Birthday: </strong> <xsl:value-of select="birthday"/></p>
- <p><strong>Vídeos Publicados:</strong> <xsl:value-of select="xml_tube/videos_pub/video[@publisher=$utilizadores]/título"/></p>
- </xsl:for-each>
- Videos publicados: Vid1Vid3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement