Alt + Tab: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Mroots (talk | contribs)
Created page with "= Team Echo Võrgurakendused II = * Mihkel Roots * Roland Soosaar * Krista Norak ==XML== <source lang="xml"> <?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet ty..."
 
Mroots (talk | contribs)
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Team Echo Võrgurakendused II =
= Meeskond Alt + Tab Võrgurakendused II =


* Mihkel Roots
* Mihkel Roots
Line 5: Line 5:
* Krista Norak
* Krista Norak


==Esimene Osa==
==XML==
==XML==
<source lang="xml">
<source lang="xml">
   <?xml version="1.0" encoding="utf-8" ?>
   <?xml version="1.0" encoding="utf-8" ?>
   <?xml-stylesheet type="text/xsl" href="Echo-html.xslt"?>
   <?xml-stylesheet type="text/xsl" href="Echo-html.xslt"?>
   <echo>
   <Carshop>
     <videos>
     <Shop>
       <video id="1" view-count="69" author-id="1">
       <Name>United Motors</Name>
        <title>Mihkli rännak</title>
      <Address>
         <streams>
         <Country>Estonia</Country>
          <stream type="primary">
        <City>Tallinn</City>
            <stream-url mime-type="video/webm">https://u.wut.ee/ookutsu.webm</stream-url>
        <MobileNumber>7777777</MobileNumber>
            <stream-url mime-type="audio/mp3">https://media/id/audio.mp3</stream-url>
      </Address>
            <stream-url mime-type="video/mp4">https://media/id/video.mp4</stream-url>
    </Shop>
          </stream>
    <Cars>
          <stream type="secondary">
     
            <stream-url mime-type="audio/*">https://media/id/audio2</stream-url>
      <Car type="saloon">
          </stream>
        <CarMake Name="BMW">
        </streams>
           <CarModel ModelName="X1" Year="2011">
        <metadata>
             <Mileage>1000</Mileage>
          <description>
            <Price>
            Väga kurb
              <Amount>20000</Amount>
          </description>
              <Currency>EUR</Currency>
        </metadata>
             </Price>
        <comments>
             <Image><![CDATA[http://bmw.co.uk/dam/brandBM/common/newvehicles/x-series/x1/2015/flash/f48_x1_highlights_assets/lines_slider/img/digital/sport-line-front.jpg]]></Image>
           <comment author-id="1" post-timestamp="1489683470">
           </CarModel>
             Norm värk
         </CarMake>
          </comment>
       </Car>
        </comments>
     
      </video>
       <Car type="SUV">
      <video id="2" view-count="69" author-id="2">
         <CarMake Name="BMW">
        <title>Lahe video</title>
          <CarModel ModelName="X5" Year="2010">
        <streams>
             <Mileage>500</Mileage>
          <stream type="primary">
            <Price>
             <stream-url mime-type="video/webm">https://u.wut.ee/youfuckedup.webm</stream-url>
              <Amount>25000</Amount>
             <stream-url mime-type="audio/mp3">https://media/id/audio.mp3</stream-url>
              <Currency>EUR</Currency>
            <stream-url mime-type="video/mp4">https://media/id/video.mp4</stream-url>
             </Price>
          </stream>
             <Image><![CDATA[http://www.bmw.com.au/content/dam/bmw/common/all-models/x-series/x5/2015/at-a-glance/x5_at-a-glance_stagepresentation.jpg/jcr:content/renditions/cq5dam.resized.img.1680.large.time1448008829330.jpg]]></Image>
          <stream type="secondary">
           </CarModel>
            <stream-url mime-type="audio/*">https://media/id/audio2</stream-url>
         </CarMake>
          </stream>
      </Car>
        </streams>
        
        <metadata>
       <Car type="saloon">
          <description>
         <CarMake Name="BMW">
            See on väga äge video on see
          <CarModel ModelName="X3" Year="2012">
          </description>
             <Mileage>700</Mileage>
        </metadata>
            <Price>
        <comments>
              <Amount>15000</Amount>
          <comment author-id="1" post-timestamp="1489683470">
              <Currency>EUR</Currency>
            Norm värk
             </Price>
          </comment>
             <Image><![CDATA[http://s3.caradvice.com.au/thumb/1000/562/wp-content/uploads/2014/08/2015-BMW-X3-36.jpg]]></Image>
          <comment author-id="2" post-timestamp="1489683470">
           </CarModel>
            Norm värk 2
         </CarMake>
           </comment>
      </Car>
         </comments>
     
       </video>
      <Car type="SUV">
 
         <CarMake Name="BMW">
       <video id="3" view-count="69" author-id="3">
           <CarModel ModelName="X6" Year="2009">
         <title>Nalja kah</title>
             <Mileage>800</Mileage>
        <streams>
            <Price>
          <stream type="primary">
              <Amount>23000</Amount>
            <stream-url mime-type="video/webm">https://u.wut.ee/perlvspython.webm</stream-url>
              <Currency>EUR</Currency>
            <stream-url mime-type="audio/mp3">https://media/id/audio.mp3</stream-url>
            </Price>
             <stream-url mime-type="video/mp4">https://media/id/video.mp4</stream-url>
            <Image><![CDATA[https://i.ytimg.com/vi/a6hjQDtYSnM/maxresdefault.jpg]]></Image>
          </stream>
          </CarModel>
          <stream type="secondary">
         </CarMake>
            <stream-url mime-type="audio/*">https://media/id/audio2</stream-url>
      </Car>
          </stream>
        
        </streams>
     </Cars>
        <metadata>
   </Carshop>
          <description>
             Väga hea huumor
          </description>
        </metadata>
        <comments>
          <comment author-id="1" post-timestamp="1489683470">
             Norm värk
          </comment>
        </comments>
      </video>
 
      <video id="4" view-count="69" author-id="1">
        <title>Arti areng</title>
        <streams>
          <stream type="primary">
            <stream-url mime-type="video/webm">https://u.wut.ee/sittmissitt.webm</stream-url>
            <stream-url mime-type="audio/mp3">https://media/id/audio.mp3</stream-url>
            <stream-url mime-type="video/mp4">https://media/id/video.mp4</stream-url>
          </stream>
          <stream type="secondary">
            <stream-url mime-type="audio/*">https://media/id/audio2</stream-url>
          </stream>
        </streams>
        <metadata>
          <description>
            Väga kurb
           </description>
         </metadata>
        <comments>
          <comment author-id="1" post-timestamp="1489683470">
            Imelik oli
          </comment>
        </comments>
       </video>
 
       <video id="4" view-count="69" author-id="4">
         <title>Oldja laulud</title>
        <streams>
          <stream type="primary">
            <stream-url mime-type="video/webm">https://u.wut.ee/healtscare.webm</stream-url>
            <stream-url mime-type="audio/mp3">https://media/id/audio.mp3</stream-url>
             <stream-url mime-type="video/mp4">https://media/id/video.mp4</stream-url>
          </stream>
          <stream type="secondary">
            <stream-url mime-type="audio/*">https://media/id/audio2</stream-url>
          </stream>
        </streams>
        <metadata>
          <description>
             Draama Queen
          </description>
        </metadata>
        <comments>
          <comment author-id="1" post-timestamp="1489683420">
             Norm värk
          </comment>
        </comments>
      </video>
 
      <video id="4" view-count="69" author-id="5">
        <title>Osa 13 ehk Oolo kadumine</title>
        <streams>
          <stream type="primary">
            <stream-url mime-type="video/webm">https://u.wut.ee/healtscare.webm</stream-url>
            <stream-url mime-type="audio/mp3">https://media/id/audio.mp3</stream-url>
            <stream-url mime-type="video/mp4">https://media/id/video.mp4</stream-url>
          </stream>
          <stream type="secondary">
            <stream-url mime-type="audio/*">https://media/id/audio2</stream-url>
           </stream>
         </streams>
        <metadata>
          <description>
            Lihtsalt kadus ära
          </description>
         </metadata>
        <comments>
           <comment author-id="1" post-timestamp="1489683470">
             Norm värk
          </comment>
        </comments>
      </video>
 
    </videos>
    <users>
      <user id="1">
        <username>admin</username>
        <full-name>Admin</full-name>
      </user>
      <user id="2">
        <username>oolo</username>
        <full-name>Oolo</full-name>
      </user>
      <user id="3">
        <username>zirk</username>
        <full-name>Hr. Zirk</full-name>
      </user>
    </users>
    <lists>
      <list owner-id="1">
         <video id="1" timestamp-added="1489684373"></video>
        <video id="3" timestamp-added="1489684379"></video>
       </list>
     </lists>
   </echo>
</source>
</source>
==XSLT XML==
<source lang="xml">
  <?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:output method="xml" indent="yes"/>
    <xsl:template match="/">
      <videos>
        <xsl:for-each select="echo/videos/video">
          <video>
            <xsl:variable name="author-id" select="@author-id"/>
            <title>
              <xsl:value-of select="title"/>
            </title>
            <xsl:copy-of select="streams/stream[@type='primary']" />
            <autor>
              <xsl:copy-of select="/echo/users/user[@id=$author-id]" />
            </autor>
            <description>
              <xsl:value-of select="metadata/description"/>
            </description>
            <comments>
              <xsl:for-each select="comments/comment">
                <xsl:variable name="comment-author-id" select="@author-id"/>
                <comment>
                  <text>
                    <xsl:value-of select="." />
                  </text>
                  <xsl:copy-of select="/echo/users/user[@id=$comment-author-id]/username" />
                  <xsl:copy-of select="/echo/users/user[@id=$comment-author-id]/full-name" />
                </comment>
              </xsl:for-each>
            </comments>
          </video>
        </xsl:for-each>
      </videos>
    </xsl:template>
  </xsl:stylesheet>
</source>
==XSLT HTML==
<pre>
<nowiki>
  <?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:output method="html" indent="yes"/>
    <xsl:template match="/">
      <html>
        <title>Media Kogumik</title>
        <link rel="stylesheet" type="text/css" href="https://d.arti.ee/media.css"/>
        <xsl:for-each select="echo/videos/video">
          <div>
            <xsl:variable name="author-id" select="@author-id"/>
            <h3>
              <xsl:value-of select="title"/>
            </h3>
            <h4>
              <xsl:value-of select="/echo/users/user[@id=$author-id]/full-name" />
            </h4>
            <video controls="" loop="">
              <xsl:for-each select="streams/stream[@type='primary']">
                <xsl:for-each select="stream-url">
                  <source>
                    <xsl:attribute name="type">
                      <xsl:value-of select="@mime-type"/>
                    </xsl:attribute>
                    <xsl:attribute name="src">
                      <xsl:value-of select="."/>
                    </xsl:attribute>
                  </source>
                </xsl:for-each>
              </xsl:for-each>
            </video>
            <p>
              <xsl:value-of select="metadata/description"/>
            </p>
            <div>
              <h4>Komentaarid:</h4>
              <ol>
                <xsl:for-each select="comments/comment">
                  <li>
                    <xsl:variable name="comment-author-id" select="@author-id"/>
                    <div>
                      <xsl:value-of select="." />
                    </div>
                    <div>
                      <b>Autor:</b>
                      <xsl:value-of select="/echo/users/user[@id=$comment-author-id]/full-name" />
                    </div>
                  </li>
                </xsl:for-each>
              </ol>
            </div>
          </div>
          <hr/>
        </xsl:for-each>
      </html>
    </xsl:template>
  </xsl:stylesheet>
</nowiki>
</pre>
[[File:Echoxmlxstlhtml.png|320px]]


==XSD==
==XSD==
Line 294: Line 81:
   <?xml version="1.0" encoding="utf-8"?>
   <?xml version="1.0" encoding="utf-8"?>
   <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:element name="echo">
     <xs:element name="Carshop">
       <xs:complexType>
       <xs:complexType>
         <xs:sequence>
         <xs:sequence>
           <xs:element name="videos">
           <xs:element name="Shop">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Name" type="xs:string" />
                <xs:element name="Address">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element name="Country" type="xs:string" />
                      <xs:element name="City" type="xs:string" />
                      <xs:element name="MobileNumber" type="xs:unsignedInt" />
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="Cars">
             <xs:complexType>
             <xs:complexType>
               <xs:sequence>
               <xs:sequence>
                 <xs:element maxOccurs="unbounded" name="video">
                 <xs:element maxOccurs="unbounded" name="Car">
                   <xs:complexType>
                   <xs:complexType>
                     <xs:sequence>
                     <xs:sequence>
                       <xs:element name="title" type="xs:string" />
                       <xs:element name="CarMake">
                      <xs:element name="streams">
                         <xs:complexType>
                         <xs:complexType>
                           <xs:sequence>
                           <xs:sequence>
                             <xs:element maxOccurs="unbounded" name="stream">
                             <xs:element name="CarModel">
                               <xs:complexType>
                               <xs:complexType>
                                 <xs:sequence>
                                 <xs:sequence>
                                   <xs:element maxOccurs="unbounded" name="stream-url">
                                   <xs:element name="Mileage" type="xs:unsignedShort" />
                                  <xs:element name="Price">
                                     <xs:complexType>
                                     <xs:complexType>
                                       <xs:simpleContent>
                                       <xs:sequence>
                                         <xs:extension base="xs:string">
                                         <xs:element name="Amount" type="xs:unsignedShort" />
                                          <xs:attribute name="mime-type" type="xs:string" use="required" />
                                        <xs:element name="Currency" type="xs:string" />
                                        </xs:extension>
                                       </xs:sequence>
                                       </xs:simpleContent>
                                     </xs:complexType>
                                     </xs:complexType>
                                   </xs:element>
                                   </xs:element>
                                  <xs:element name="Image" type="xs:string" />
                                 </xs:sequence>
                                 </xs:sequence>
                                 <xs:attribute name="type" type="xs:string" use="required" />
                                 <xs:attribute name="ModelName" type="xs:string" use="required" />
                              </xs:complexType>
                                 <xs:attribute name="Year" type="xs:unsignedShort" use="required" />
                            </xs:element>
                          </xs:sequence>
                        </xs:complexType>
                      </xs:element>
                      <xs:element name="metadata">
                        <xs:complexType>
                          <xs:sequence>
                            <xs:element name="description" type="xs:string" />
                          </xs:sequence>
                        </xs:complexType>
                      </xs:element>
                      <xs:element name="comments">
                        <xs:complexType>
                          <xs:sequence>
                            <xs:element maxOccurs="unbounded" name="comment">
                              <xs:complexType>
                                 <xs:simpleContent>
                                  <xs:extension base="xs:string">
                                    <xs:attribute name="author-id" type="xs:unsignedInt" use="required" />
                                    <xs:attribute name="post-timestamp" type="xs:unsignedInt" use="required" />
                                  </xs:extension>
                                </xs:simpleContent>
                               </xs:complexType>
                               </xs:complexType>
                             </xs:element>
                             </xs:element>
                           </xs:sequence>
                           </xs:sequence>
                          <xs:attribute name="Name" type="xs:string" use="required" />
                         </xs:complexType>
                         </xs:complexType>
                       </xs:element>
                       </xs:element>
                     </xs:sequence>
                     </xs:sequence>
                     <xs:attribute name="id" type="xs:unsignedInt" use="required" />
                     <xs:attribute name="type" type="xs:string" use="required" />
                    <xs:attribute name="view-count" type="xs:unsignedInt" use="required" />
                    <xs:attribute name="author-id" type="xs:unsignedInt" use="required" />
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="users">
            <xs:complexType>
              <xs:sequence>
                <xs:element maxOccurs="unbounded" name="user">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element name="username" type="xs:string" />
                      <xs:element name="full-name" type="xs:string" />
                    </xs:sequence>
                    <xs:attribute name="id" type="xs:unsignedInt" use="required" />
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="lists">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="list">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element maxOccurs="unbounded" name="video">
                        <xs:complexType>
                          <xs:attribute name="id" type="xs:unsignedInt" use="required" />
                          <xs:attribute name="timestamp-added" type="xs:unsignedInt" use="required" />
                        </xs:complexType>
                      </xs:element>
                    </xs:sequence>
                    <xs:attribute name="owner-id" type="xs:unsignedInt" use="required" />
                   </xs:complexType>
                   </xs:complexType>
                 </xs:element>
                 </xs:element>
Line 397: Line 143:
   </xs:schema>
   </xs:schema>
</source>
</source>
==XSLT HTML==
<source lang="xml">
  <?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:output method="html" indent="yes"/>
      <xsl:template match="/">
        <html>
          <head>
            <title>Autopood</title>
          </head>
          <body>
            <xsl:variable name="Shop" select="/Carshop/Shop"/>
            <xsl:variable name="ShopName" select="$Shop/Name"/>
            <xsl:variable name="Country" select="$Shop/Address/Country"/>
            <xsl:variable name="City" select="$Shop/Address/City"/>
            <xsl:variable name="MobileNumber" select="$Shop/Address/MobileNumber"/>
            <xsl:variable name="ShopAddress" select="concat($Country,', ',$City,', ', $MobileNumber)"/>
            <h1>
              <xsl:value-of select="$ShopName"/>   
            </h1>
            <h4>
              <xsl:value-of select="$ShopAddress"/>
            </h4>
            <ul>
              <xsl:for-each select="Carshop/Cars/Car">
                <li>
                  <h4>
                    <xsl:value-of select="concat(CarMake/@Name, ' ', CarMake/CarModel/@ModelName)"/>
                  </h4>
                  <div>
                    <xsl:variable name="CarModelPath" select="CarMake/CarModel"/>
                   
                    Release year:
                    <xsl:value-of select="$CarModelPath/@Year"/>
                    <br/>
                    Body type:
                    <xsl:value-of select="@type"/>
                    <br/>
                    Mileage:
                    <xsl:value-of select="$CarModelPath/Mileage"/>
                    <br/>
                    Price:
                    <xsl:value-of select="concat($CarModelPath/Price/Amount, ' ', $CarModelPath/Price/Currency)"/>
                    <p>
                      <xsl:variable name="ImageUrl" select="$CarModelPath/Image"/>
                      <img src="{$ImageUrl}" style="width: 500px;"/>
                    </p>                       
                  </div>         
                </li>
              </xsl:for-each>
            </ul>
           
          </body>
        </html>
      </xsl:template>
  </xsl:stylesheet>
</source>
==XSLT XML==
<source lang="xml">
  <?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:output method="xml" indent="yes"/>
      <xsl:template match="/">
        <Carshop>
          <CarType>
            <xsl:for-each select="Carshop/Cars">
              <xsl:variable name="Counter" select="count(Car/CarMake/@Name)"/>
              <Type amount="{$Counter}">
                <xsl:value-of select="Car/CarMake/@Name"/>
              </Type>
            </xsl:for-each>
          </CarType>
          <xsl:for-each select="Carshop/Cars/Car">
            <Cars>
              <xsl:variable name="CarName" select="CarMake/@Name"/>
              <xsl:variable name="CarModelName" select="CarMake/CarModel/@ModelName"/>
              <xsl:variable name="CarModelPath" select="CarMake/CarModel"/>
              <xsl:variable name="Currency" select="$CarModelPath/Price/Currency"/>
              <Name CarName="{$CarName}">
                <xsl:value-of select="$CarModelName"/>
              </Name>
              <ReleaseYear>
                <xsl:value-of select="$CarModelPath/@Year"/>
              </ReleaseYear>
              <Mileage>
                <xsl:value-of select="$CarModelPath/Mileage"/>
              </Mileage>
              <CarBodyType>
                <xsl:value-of select="@type"/>
              </CarBodyType>
              <Price Currency="{$Currency}">
                <xsl:value-of select="$CarModelPath/Price/Amount"/>
              </Price>
              <Image>
                <xsl:value-of select="$CarModelPath/Image"/>
              </Image> 
            </Cars>
          </xsl:for-each>
        </Carshop>
      </xsl:template>
  </xsl:stylesheet>
</source>
==Analüüs==
Travel to space - Team Musk
Analüüs
Üldine kirjeldus
Eesmärk on luua veebirakendus, mis võimaldab kasutajatel broneerida reisi kosmosesse. Peale reisi broneerimist siseneb Elon Musk või muu tema poolt administraatori õigused saanud kasutaja admin vaatesse ning saab vaadata reisi broneerijaid. Teadagi reklaamis Elon Musk, et kingib tasuta reise kosmosesse neile, kes on arvamusel, et maakera on lapik. Kuidas küll kõik need illuminati organisatsiooni liikmed sinna reisile registreerivad? Seda saab nimelt teha läbi meie veebirakenduse, mis võimaldab seda! Ideaalis äriks selle veebi Elonile mõninga miljoni eest maha küll, tal ju neid niikunii liiga palju.
Pakume klientidele kolm reisimis sihtkohta:
<ul>
<li>Mars</li>
<li>Kuu</li>
<li>Lõõgastav reis ümber maa</li>
</ul>
===Rakenduse sisu===
<b>MUST HAVE:</b>
<ul>
<li>Planeedi valimine</li>
<li>Kosmoseraketi valimine</li>
<li>Broneerimise võimalus(ankeedi täitmine)</li>
<li>Broneeringute vaatamine planeedi järgi</li>
<li>Broneeringute vaatamine kosmoseraketi järgi</li>
<li>Broneeringu staatused (tagasilükatud, aktsepteeritud)</li>
<li>Arvete koostamine</li>
<li>Admini vaade (broneeringute ülevaatamine, muutmine, aktsepteerimine jne)</li>
</ul>
<b>NICE TO HAVE:</b>
<ul>
<li>Broneeringute muutmine</li>
</ul>

Latest revision as of 08:37, 27 April 2017

Meeskond Alt + Tab Võrgurakendused II

  • Mihkel Roots
  • Roland Soosaar
  • Krista Norak

Esimene Osa

XML

  <?xml version="1.0" encoding="utf-8" ?>
  <?xml-stylesheet type="text/xsl" href="Echo-html.xslt"?>
  <Carshop>
    <Shop>
      <Name>United Motors</Name>
      <Address>
        <Country>Estonia</Country>
        <City>Tallinn</City>
        <MobileNumber>7777777</MobileNumber>
      </Address>
    </Shop>
    <Cars>
      
      <Car type="saloon">
        <CarMake Name="BMW">
          <CarModel ModelName="X1" Year="2011">
            <Mileage>1000</Mileage>
            <Price>
              <Amount>20000</Amount>
              <Currency>EUR</Currency>
            </Price>
            <Image><![CDATA[http://bmw.co.uk/dam/brandBM/common/newvehicles/x-series/x1/2015/flash/f48_x1_highlights_assets/lines_slider/img/digital/sport-line-front.jpg]]></Image>
          </CarModel>
        </CarMake>
      </Car>
      
      <Car type="SUV">
        <CarMake Name="BMW">
          <CarModel ModelName="X5" Year="2010">
            <Mileage>500</Mileage>
            <Price>
              <Amount>25000</Amount>
              <Currency>EUR</Currency>
            </Price>
            <Image><![CDATA[http://www.bmw.com.au/content/dam/bmw/common/all-models/x-series/x5/2015/at-a-glance/x5_at-a-glance_stagepresentation.jpg/jcr:content/renditions/cq5dam.resized.img.1680.large.time1448008829330.jpg]]></Image>
          </CarModel>
        </CarMake>
      </Car>
      
      <Car type="saloon">
        <CarMake Name="BMW">
          <CarModel ModelName="X3" Year="2012">
            <Mileage>700</Mileage>
            <Price>
              <Amount>15000</Amount>
              <Currency>EUR</Currency>
            </Price>
            <Image><![CDATA[http://s3.caradvice.com.au/thumb/1000/562/wp-content/uploads/2014/08/2015-BMW-X3-36.jpg]]></Image>
          </CarModel>
        </CarMake>
      </Car>
      
      <Car type="SUV">
        <CarMake Name="BMW">
          <CarModel ModelName="X6" Year="2009">
            <Mileage>800</Mileage>
            <Price>
              <Amount>23000</Amount>
              <Currency>EUR</Currency>
            </Price>
            <Image><![CDATA[https://i.ytimg.com/vi/a6hjQDtYSnM/maxresdefault.jpg]]></Image>
          </CarModel>
        </CarMake>
      </Car>
      
    </Cars>
  </Carshop>

XSD

  <?xml version="1.0" encoding="utf-8"?>
  <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Carshop">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="Shop">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="Name" type="xs:string" />
                <xs:element name="Address">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element name="Country" type="xs:string" />
                      <xs:element name="City" type="xs:string" />
                      <xs:element name="MobileNumber" type="xs:unsignedInt" />
                    </xs:sequence>
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <xs:element name="Cars">
            <xs:complexType>
              <xs:sequence>
                <xs:element maxOccurs="unbounded" name="Car">
                  <xs:complexType>
                    <xs:sequence>
                      <xs:element name="CarMake">
                        <xs:complexType>
                          <xs:sequence>
                            <xs:element name="CarModel">
                              <xs:complexType>
                                <xs:sequence>
                                  <xs:element name="Mileage" type="xs:unsignedShort" />
                                  <xs:element name="Price">
                                    <xs:complexType>
                                      <xs:sequence>
                                        <xs:element name="Amount" type="xs:unsignedShort" />
                                        <xs:element name="Currency" type="xs:string" />
                                      </xs:sequence>
                                    </xs:complexType>
                                  </xs:element>
                                  <xs:element name="Image" type="xs:string" />
                                </xs:sequence>
                                <xs:attribute name="ModelName" type="xs:string" use="required" />
                                <xs:attribute name="Year" type="xs:unsignedShort" use="required" />
                              </xs:complexType>
                            </xs:element>
                          </xs:sequence>
                          <xs:attribute name="Name" type="xs:string" use="required" />
                        </xs:complexType>
                      </xs:element>
                    </xs:sequence>
                    <xs:attribute name="type" type="xs:string" use="required" />
                  </xs:complexType>
                </xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:schema>

XSLT HTML

  <?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:output method="html" indent="yes"/>

      <xsl:template match="/">
        <html>
          <head>
            <title>Autopood</title>
          </head>
          <body>
            <xsl:variable name="Shop" select="/Carshop/Shop"/>
            <xsl:variable name="ShopName" select="$Shop/Name"/>
            <xsl:variable name="Country" select="$Shop/Address/Country"/>
            <xsl:variable name="City" select="$Shop/Address/City"/>
            <xsl:variable name="MobileNumber" select="$Shop/Address/MobileNumber"/>
            <xsl:variable name="ShopAddress" select="concat($Country,', ',$City,', ', $MobileNumber)"/>

            <h1>
              <xsl:value-of select="$ShopName"/>    
            </h1>
            <h4>
              <xsl:value-of select="$ShopAddress"/>
            </h4>

            <ul>
              <xsl:for-each select="Carshop/Cars/Car"> 
                <li>
                  <h4>
                    <xsl:value-of select="concat(CarMake/@Name, ' ', CarMake/CarModel/@ModelName)"/>
                  </h4>
                  <div>
                    <xsl:variable name="CarModelPath" select="CarMake/CarModel"/>
                    
                    Release year:
                    <xsl:value-of select="$CarModelPath/@Year"/>
                    <br/>
                    Body type:
                    <xsl:value-of select="@type"/>
                    <br/>
                    Mileage:
                    <xsl:value-of select="$CarModelPath/Mileage"/>
                    <br/>
                    Price:
                    <xsl:value-of select="concat($CarModelPath/Price/Amount, ' ', $CarModelPath/Price/Currency)"/>
                    <p>
                      <xsl:variable name="ImageUrl" select="$CarModelPath/Image"/>
                      <img src="{$ImageUrl}" style="width: 500px;"/>
                    </p>                        
                  </div>          
                </li>
              </xsl:for-each>
            </ul>
            
          </body>
        </html>
      </xsl:template>
  </xsl:stylesheet>

XSLT XML

  <?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:output method="xml" indent="yes"/>

      <xsl:template match="/">
        <Carshop>
          <CarType>
            <xsl:for-each select="Carshop/Cars">
              <xsl:variable name="Counter" select="count(Car/CarMake/@Name)"/>
              <Type amount="{$Counter}">
                <xsl:value-of select="Car/CarMake/@Name"/>
              </Type>
            </xsl:for-each>
          </CarType>
          <xsl:for-each select="Carshop/Cars/Car">
            <Cars>

              <xsl:variable name="CarName" select="CarMake/@Name"/>
              <xsl:variable name="CarModelName" select="CarMake/CarModel/@ModelName"/>
              <xsl:variable name="CarModelPath" select="CarMake/CarModel"/>
              <xsl:variable name="Currency" select="$CarModelPath/Price/Currency"/>

              <Name CarName="{$CarName}">
                <xsl:value-of select="$CarModelName"/>
              </Name>
              <ReleaseYear>
                <xsl:value-of select="$CarModelPath/@Year"/>
              </ReleaseYear>
              <Mileage>
                <xsl:value-of select="$CarModelPath/Mileage"/>
              </Mileage>
              <CarBodyType>
                <xsl:value-of select="@type"/>
              </CarBodyType>
              <Price Currency="{$Currency}">
                <xsl:value-of select="$CarModelPath/Price/Amount"/>
              </Price>
              <Image>
                <xsl:value-of select="$CarModelPath/Image"/>
              </Image>  
            </Cars>
          </xsl:for-each>
        </Carshop>
      </xsl:template>
  </xsl:stylesheet>

Analüüs

Travel to space - Team Musk Analüüs Üldine kirjeldus Eesmärk on luua veebirakendus, mis võimaldab kasutajatel broneerida reisi kosmosesse. Peale reisi broneerimist siseneb Elon Musk või muu tema poolt administraatori õigused saanud kasutaja admin vaatesse ning saab vaadata reisi broneerijaid. Teadagi reklaamis Elon Musk, et kingib tasuta reise kosmosesse neile, kes on arvamusel, et maakera on lapik. Kuidas küll kõik need illuminati organisatsiooni liikmed sinna reisile registreerivad? Seda saab nimelt teha läbi meie veebirakenduse, mis võimaldab seda! Ideaalis äriks selle veebi Elonile mõninga miljoni eest maha küll, tal ju neid niikunii liiga palju.

Pakume klientidele kolm reisimis sihtkohta:

  • Mars
  • Kuu
  • Lõõgastav reis ümber maa

Rakenduse sisu

MUST HAVE:

  • Planeedi valimine
  • Kosmoseraketi valimine
  • Broneerimise võimalus(ankeedi täitmine)
  • Broneeringute vaatamine planeedi järgi
  • Broneeringute vaatamine kosmoseraketi järgi
  • Broneeringu staatused (tagasilükatud, aktsepteeritud)
  • Arvete koostamine
  • Admini vaade (broneeringute ülevaatamine, muutmine, aktsepteerimine jne)

NICE TO HAVE:

  • Broneeringute muutmine