Laenutajad: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Vlaats (talk | contribs)
Ktonisma (talk | contribs)
No edit summary
Line 7: Line 7:


Eesmärk on luua kodune filmide laenutus.
Eesmärk on luua kodune filmide laenutus.
== Kirjeldus ==
Vaade meie hetkelisele tulemusele asub [http://enos.itcollege.ee/~ktonisma/vorgurakendused%20II/moviestore1.htm siin].


=== XML fail ===
=== XML fail ===

Revision as of 01:17, 24 March 2013

Meeskond

  • Kristjan Tõnismäe
  • Veiko Lääts

Kirjeldus

Eesmärk on luua kodune filmide laenutus.

Kirjeldus

Vaade meie hetkelisele tulemusele asub siin.

XML fail

  <?xml version="1.0" encoding="UTF-8" ?> 
- <movieStore>
  - <movies>
    - <žanr>
      - <action>
        - <movie id="1" year="2012" language="en">
            <title>Skyfall</title> 
            <description>Bond's loyalty to M is tested when her past comes back to haunt her. Whilst MI6 comes under attack, 007 must track down and 
             destroy the threat, no matter how personal the cost.</description> 
            <director>Sam Mendes</director> 
          - <subtitles>
              <subtitle value="ru">ru</subtitle> 
              <subtitle value="fin">fin</subtitle> 
              <subtitle value="est">est</subtitle> 
            </subtitles>
          - <prices>
              <price-day value="4,5€" /> 
              <price-week value="7€" /> 
            </prices>
          </movie>
        - <movie id="2" year="2013" language="en">
            <title>Kick-Ass 2</title> 
            <description>The costumed high-school hero Kick-Ass joins with a group of normal citizens who have been inspired to fight crime in costume.</description> 
            <director>Jeff Wadlow</director> 
          - <subtitles>
              <subtitle value="ru">ru</subtitle> 
              <subtitle value="est">est</subtitle> 
            </subtitles>
          - <prices>
              <price-day value="1,5€" /> 
              <price-week value="4,4€" /> 
            </prices>
          </movie>
        - <movie id="3" year="2013" language="en">
            <title>Iron Man 3</title> 
            <description>When Tony Stark's world is torn apart by a formidable terrorist called the Mandarin, Stark starts an odyssey of rebuilding and retribution.</description> 
            <director>Shane Black</director> 
          - <subtitles>
              <subtitle value="ru">ru</subtitle> 
              <subtitle value="est">est</subtitle> 
            </subtitles>
          - <prices>
              <price-day value="1,5€" /> 
              <price-week value="3,4€" /> 
            </prices>
          </movie>
        - <movie id="4" year="2012" language="en">
           <title>The Dark Knight Rises</title> 
           <description>Eight years on, a new evil rises from where the Batman and Commissioner Gordon tried to bury it, causing the Batman to resurface and fight to protect Gotham City...</description> 
           <director>Christopher Nolan</director> 
         - <subtitles>
             <subtitle value="ru">ru</subtitle> 
             <subtitle value="est">est</subtitle> 
           </subtitles>
         - <prices>
             <price-day value="0,5€" /> 
             <price-week value="4€" /> 
           </prices>
         </movie>
       - <movie id="5" year="2012" language="en">
           <title>The Avengers</title> 
           <description>Nick Fury of S.H.I.E.L.D. brings together a team of super humans to form The Avengers to help save the Earth from Loki and his army.</description> 
           <director>Joss Whedon</director> 
         - <subtitles>
             <subtitle value="ru">ru</subtitle> 
             <subtitle value="est">est</subtitle> 
           </subtitles>
         - <prices>
             <price-day value="1,3€" /> 
             <price-week value="4,2€" /> 
           </prices>
         </movie>
       </action>
     - <horror>
       - <movie id="1" year="2013" language="en">
           <title>Evil Dead</title> 
           <description>Five friends head to a remote cabin, where the discovery of a Book of the Dead leads them to unwittingly summon up demons living in the nearby woods.</description> 
           <director>Fede Alvarez</director> 
         - <subtitles>
             <subtitle value="ru">ru</subtitle> 
             <subtitle value="est">est</subtitle> 
           </subtitles>
         - <prices>
             <price-day value="1€" /> 
             <price-week value="3€" /> 
           </prices>
         </movie>
       - <movie id="2" year="2013" language="en">
           <title>Mama</title> 
           <description>Annabel and Lucas are faced with the challenge of raising his young nieces that were left alone in the forest for 5 years....</description> 
           <director>Andrés Muschietti</director> 
         - <subtitles>
             <subtitle value="ru">ru</subtitle> 
             <subtitle value="est">est</subtitle> 
             <subtitle value="fin">fin</subtitle> 
           </subtitles>
         - <prices>
             <price-day value="3,5€" /> 
             <price-week value="6€" /> 
           </prices>
         </movie>
       - <movie id="3" year="2013" language="en">
           <title>Hansel and Gretel: Witch Hunters</title> 
           <description>In this spin on the fairy tale, Hansel and Gretel are now bounty hunters who track and kill witches all over the world.</description> 
           <director>Tommy Wirkola</director> 
         - <subtitles>
             <subtitle value="ru">ru</subtitle> 
             <subtitle value="est">est</subtitle> 
           </subtitles>
         - <prices>
             <price-day value="1,5€" /> 
             <price-week value="4€" /> 
           </prices>
         </movie>
       - <movie id="4" year="2012" language="en">
           <title>Comedown</title> 
           <description>Six friends who turn the deserted the tower block they lived in as kids into a pirate radio station soon learn they are not alone, as a resident psychopath begins hunting them down.</description> 
           <director>Menhaj Huda</director> 
         - <subtitles>
             <subtitle value="ru">ru</subtitle> 
             <subtitle value="est">est</subtitle> 
           </subtitles>
         - <prices>
             <price-day value="2,5€" /> 
             <price-week value="7€" /> 
           </prices>
         </movie>
       - <movie id="5" year="2007" language="ru">
           <title>Captivity</title> 
           <description>The film centers on two people who have been abducted and driven mad.</description> 
           <director>Roland Joffé</director> 
       - <subtitles>
           <subtitle value="en" /> 
           <subtitle value="es" /> 
         </subtitles>
       - <prices>
           <price-day value="1,5€" /> 
           <price-week value="4€" /> 
         </prices>
       </movie>
     </horror>
   - <comedy>
     - <movie id="1" year="2013" language="en">
         <title>Õnneteraapia</title> 
         <description>After a stint in a mental institution, former teacher Pat Solitano moves back in with his parents and tries to reconcile with his ex-wife.</description> 
         <director>David O. Russell</director> 
       - <subtitles>
           <subtitle value="ru">ru</subtitle> 
           <subtitle value="est">est</subtitle> 
         </subtitles>
       - <prices>
           <price-day value="1,5€" /> 
           <price-week value="4€" /> 
         </prices>
       </movie>
     - <movie id="2" year="2013" language="en">
         <title>Identity Thief</title> 
         <description>Mild-mannered businessman Sandy Patterson travels from Denver to Miami to confront the deceptively harmless-looking woman who has been living it up after stealing Sandy's identity.</description> 
         <director>Seth Gordon</director> 
       - <subtitles>
           <subtitle value="ru">ru</subtitle> 
           <subtitle value="est">est</subtitle> 
         </subtitles>
       - <prices>
           <price-day value="1,5€" /> 
           <price-week value="4€" /> 
         </prices>
       </movie>
     - <movie id="3" year="2013" language="en">
         <title>Kick-Ass 2</title> 
         <description>The costumed high-school hero Kick-Ass joins with a group of normal citizens who have been inspired to fight crime in costume.</description> 
         <director>Jeff Wadlow</director> 
       - <subtitles>
           <subtitle value="ru">ru</subtitle> 
           <subtitle value="est">est</subtitle> 
         </subtitles>
       - <prices>
           <price-day value="2€" /> 
           <price-week value="6,5€" /> 
         </prices>
       </movie>
     - <movie id="4" year="2013" language="en">
         <title>Warm Bodies</title> 
         <description>After R (a highly unusual zombie) saves Julie from an attack, the two form a relationship that sets in motion a sequence of events that might transform the entire lifeless world.</description> 
         <director>Jonathan Levine</director> 
       - <subtitles>
           <subtitle value="ru">ru</subtitle> 
           <subtitle value="est">est</subtitle> 
         </subtitles>
       - <prices>
           <price-day value="0,5€" /> 
           <price-week value="4€" /> 
         </prices>
       </movie>
     - <movie id="5" year="2009" language="en">
         <title>He's Just Not That Into You</title> 
         <description>The Baltimore-set movie of interconnecting story arcs deals with the challenges of reading or misreading human behavior.</description> 
         <director>Ken Kwapis</director> 
       - <subtitles>
           <subtitle value="ru">ru</subtitle> 
           <subtitle value="est">est</subtitle> 
         </subtitles>
       - <prices>
           <price-day value="4,5€" /> 
           <price-week value="9€" /> 
         </prices>
       </movie>
      </comedy>
    </žanr>
  </movies>
</movieStore>

Stiilifail

Siin kuvatakse kõik filmid

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:output method="html"/>
	
	<xsl:template match="/">
	<html>
	    <body>
		 <h1>Movie Store</h1>
	         <h4>Action Movies</h4>
		  <table border="1" width="70%" >
		      <tr bgcolor="#82B4B4">
			 <td>Title</td>
		         <td>Description</td>
			 <td>Subtitles</td>
			 <td>Director</td>
			 <td>Prices</td>
		      </tr>
		       <xsl:for-each select="movieStore/movies/žanr/action/movie">
		          <tr>
		            <td style="width:15%;">
			        <xsl:value-of select="title"/>
			    </td>
			    <td>
			        <xsl:value-of select="description"/>
		            </td>
		            <td>
			        <xsl:for-each select="subtitles/subtitle">
			        <li style="list-style-type: none; text-align:center;" ><xsl:value-of select="@value"/></li>
			        </xsl:for-each>
			    </td>
		            <td  style="width:10%;">
			        <li style="list-style-type: none;"><xsl:value-of select="director"/></li>
                            </td>
			    <td style="width:10%;" >
                              <xsl:for-each select="prices/price-day">
			        <em>For Day:</em>
			         <li style="list-style-type: none; text-align:center;"><xsl:value-of select="@value"/></li>
			      </xsl:for-each>
			     <xsl:for-each select="prices/price-week">
                                <em>For Week:</em>
                                <li style="list-style-type: none; text-align:center;" ><xsl:value-of select="@value"/></li>
		              </xsl:for-each>
                            </td>
	                  </tr>
                        </xsl:for-each>
		  </table>
                  <h4>Horror Movies</h4>
		  <table border="1" width="70%" >
		      <tr bgcolor="#82B4B4">
			 <td>Title</td>
		         <td>Description</td>
			 <td>Subtitles</td>
			 <td>Director</td>
			 <td>Prices</td>
		      </tr>
		       <xsl:for-each select="movieStore/movies/žanr/horror/movie">
		          <tr>
		            <td style="width:15%;">
			        <xsl:value-of select="title"/>
			    </td>
			    <td>
			        <xsl:value-of select="description"/>
		            </td>
		            <td>
			        <xsl:for-each select="subtitles/subtitle">
			        <li style="list-style-type: none; text-align:center;" ><xsl:value-of select="@value"/></li>
			        </xsl:for-each>
			    </td>
		            <td  style="width:10%;">
			        <li style="list-style-type: none;"><xsl:value-of select="director"/></li>
                            </td>
			    <td style="width:10%;" >
                              <xsl:for-each select="prices/price-day">
			        <em>For Day:</em>
			         <li style="list-style-type: none; text-align:center;"><xsl:value-of select="@value"/></li>
			      </xsl:for-each>
			     <xsl:for-each select="prices/price-week">
                                <em>For Week:</em>
                                <li style="list-style-type: none; text-align:center;" ><xsl:value-of select="@value"/></li>
		              </xsl:for-each>
                            </td>
	                  </tr>
                        </xsl:for-each>
		  </table>
	         <h4>Comedy Movies</h4>
		  <table border="1" width="70%" >
		      <tr bgcolor="#82B4B4">
			 <td>Title</td>
		         <td>Description</td>
			 <td>Subtitles</td>
			 <td>Director</td>
			 <td>Prices</td>
		      </tr>
		       <xsl:for-each select="movieStore/movies/žanr/comedy/movie">
		          <tr>
		            <td style="width:15%;">
			        <xsl:value-of select="title"/>
			    </td>
			    <td>
			        <xsl:value-of select="description"/>
		            </td>
		            <td>
			        <xsl:for-each select="subtitles/subtitle">
			        <li style="list-style-type: none; text-align:center;" ><xsl:value-of select="@value"/></li>
			        </xsl:for-each>
			    </td>
		            <td  style="width:10%;">
			        <li style="list-style-type: none;"><xsl:value-of select="director"/></li>
                            </td>
			    <td style="width:10%;" >
                              <xsl:for-each select="prices/price-day">
			        <em>For Day:</em>
			         <li style="list-style-type: none; text-align:center;"><xsl:value-of select="@value"/></li>
			      </xsl:for-each>
			     <xsl:for-each select="prices/price-week">
                                <em>For Week:</em>
                                <li style="list-style-type: none; text-align:center;" ><xsl:value-of select="@value"/></li>
		              </xsl:for-each>
                            </td>
	                  </tr>
                        </xsl:for-each>
		  </table>
	    </body>
       </html>
</xsl:template>
</xsl:stylesheet>

Skeemifail

<!ELEMENT movieStore  ( movies )>

<!ELEMENT movies  ( žanr )>

<!ELEMENT žanr  ( action , horror , comedy )>

<!ELEMENT comedy  ( movie+ )>

<!ELEMENT movie  ( title , description , director , subtitles , prices )>
<!ATTLIST movie
id CDATA #REQUIRED
year CDATA #REQUIRED
language CDATA #REQUIRED
>

<!ELEMENT prices  ( price-day+ , price-week? )>

<!ELEMENT price-week  EMPTY>
<!ATTLIST price-week
value CDATA #REQUIRED
>

<!ELEMENT price-day  EMPTY>
<!ATTLIST price-day
value CDATA #REQUIRED
>

<!ELEMENT subtitles  ( subtitle+ )>

<!ELEMENT subtitle  ( #PCDATA )>
<!ATTLIST subtitle
value CDATA #REQUIRED
>

<!ELEMENT director  ( #PCDATA )>

<!ELEMENT description  ( #PCDATA )>

<!ELEMENT title  ( #PCDATA )>

<!ELEMENT horror  ( movie+ )>

<!ELEMENT movie  ( title , description , director , subtitles , prices )>
<!ATTLIST movie
id CDATA #REQUIRED
year CDATA #REQUIRED
language CDATA #REQUIRED
>

<!ELEMENT prices  ( price-day , price-week )>

<!ELEMENT price-week  EMPTY>
<!ATTLIST price-week
value CDATA #REQUIRED
>

<!ELEMENT price-day  EMPTY>
<!ATTLIST price-day
value CDATA #REQUIRED
>

<!ELEMENT subtitles  ( subtitle+ )>

<!ELEMENT subtitle  ( #PCDATA )>
<!ATTLIST subtitle
value CDATA #REQUIRED
>

<!ELEMENT director  ( #PCDATA )>

<!ELEMENT description  ( #PCDATA )>

<!ELEMENT title  ( #PCDATA )>

<!ELEMENT action  ( movie+ )>

<!ELEMENT movie  ( title , description , director , subtitles , prices )>
<!ATTLIST movie
id CDATA #REQUIRED
year CDATA #REQUIRED
language CDATA #REQUIRED
>

<!ELEMENT prices  ( price-day , price-week )>

<!ELEMENT price-week  EMPTY>
<!ATTLIST price-week
value CDATA #REQUIRED
>

<!ELEMENT price-day  EMPTY>
<!ATTLIST price-day
value CDATA #REQUIRED
>

<!ELEMENT subtitles  ( subtitle+ )>

<!ELEMENT subtitle  ( #PCDATA )>
<!ATTLIST subtitle
value CDATA #REQUIRED
>

<!ELEMENT director  ( #PCDATA )>

<!ELEMENT description  ( #PCDATA )>

<!ELEMENT title  ( #PCDATA )>

Log

21.märts 2013

  • Kokkusaamine

23.märts 2013

  • Wiki lehe loomine, XML faili, stiilifaili ja skeemifaili lisamine.