Iread: Difference between revisions
(33 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Meeskonna Liikmed== | ==Meeskonna Liikmed== | ||
*Talis Tammearu | *Talis Tammearu | ||
*Silver Vanamets | |||
=XML= | =XML= | ||
<source lang="xml"> | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<autod> | |||
<mark name="Audi"> | |||
<mudel name="A8"> | |||
<kere id="D4" type="4H" yearsactive="2009-present"> | |||
<mootorid> | |||
<mootor type="Bensiin" size="2,0" design="R4" mark="TFSI"></mootor> | |||
<mootor type="Bensiin" size="2,5" design="V6" mark="FSI"></mootor> | |||
<mootor type="Bensiin" size="3,0" design="V6" mark="TFSI"></mootor> | |||
<mootor type="Bensiin" size="4,0" design="V8" mark="TFSI"></mootor> | |||
<mootor type="Bensiin" size="4,2" design="V8" mark="FSI"></mootor> | |||
<mootor type="Bensiin" size="6,3" design="W12" mark="FSI"></mootor> | |||
<mootor type="Diisel" size="3,0" design="V6" mark="TDI"></mootor> | |||
<mootor type="Diisel" size="4,2" design="V8" mark="TDI"></mootor> | |||
</mootorid> | |||
</kere> | |||
</mudel> | |||
</mark> | |||
<mark name="Volkswagen"> | |||
<mudel name="Phaeton"> | |||
<kere id="D1" type="F" yearsactive="2003-present"> | |||
<mootorid> | |||
<mootor type="Bensiin" size="3,2" design="VR6" mark="N/A"></mootor> | |||
<mootor type="Bensiin" size="3,6" design="VR6" mark="N/A"></mootor> | |||
<mootor type="Bensiin" size="4,2" design="V8" mark="N/A"></mootor> | |||
<mootor type="Bensiin" size="6,0" design="W12" mark="N/A"></mootor> | |||
<mootor type="Diisel" size="3,0" design="V6" mark="TDI"></mootor> | |||
<mootor type="Diisel" size="5,0" design="V10" mark="TDI"></mootor> | |||
</mootorid> | |||
</kere> | |||
</mudel> | |||
</mark> | |||
<mark name="Skoda"> | |||
<mudel name="Superb"> | |||
<kere id="B6" type="3T" yearsactive="2008-present"> | |||
<mootorid> | |||
<mootor type="Bensiin" size="1,4" design="R4" mark="TSI"></mootor> | |||
<mootor type="Bensiin" size="1,8" design="R4" mark="TSI"></mootor> | |||
<mootor type="Bensiin" size="2,0" design="R4" mark="TSI"></mootor> | |||
<mootor type="Bensiin" size="3,6" design="VR6" mark="N/A"></mootor> | |||
<mootor type="Diisel" size="1,6" design="R4" mark="TDI CR"></mootor> | |||
<mootor type="Diisel" size="1,9" design="R4" mark="TDI PD"></mootor> | |||
<mootor type="Diisel" size="2,0" design="R4" mark="TDI PD"></mootor> | |||
<mootor type="Diisel" size="2,0" design="R4" mark="TDI CR"></mootor> | |||
</mootorid> | |||
</kere> | |||
</mudel> | |||
</mark> | |||
<mark name="Mercedes-Benz"> | |||
<mudel name="E-Klass"> | |||
<kere id="W212" type="N/A" yearsactive="2009-present"> | |||
<mootorid> | |||
<mootor type="Bensiin" size="1,8" design="R4" mark="Turbocharged"></mootor> | |||
<mootor type="Bensiin" size="3,0" design="V6" mark="N/A"></mootor> | |||
<mootor type="Bensiin" size="3,5" design="V6" mark="N/A"></mootor> | |||
<mootor type="Bensiin" size="4,7" design="V8" mark="Turbocharged"></mootor> | |||
<mootor type="Bensiin" size="5,5" design="V8" mark="Turbocharged"></mootor> | |||
<mootor type="Bensiin" size="6,2" design="V8" mark="N/A"></mootor> | |||
<mootor type="Diisel" size="2,1" design="R4" mark="N/A"></mootor> | |||
<mootor type="Diisel" size="3,0" design="V6" mark="N/A"></mootor> | |||
</mootorid> | |||
</kere> | |||
</mudel> | |||
</mark> | |||
<mark name="BMW"> | |||
<mudel name="7-Seeria"> | |||
<kere id="F01" type="N/A" yearsactive="2008-present"> | |||
<mootorid> | |||
<mootor type="Hübriid" size="N/A" design="E" mark="Twin Turbo ActiveHybrid"></mootor> | |||
<mootor type="Bensiin" size="5,0" design="V8" mark="Twin Turbo"></mootor> | |||
<mootor type="Bensiin" size="6,0" design="V12" mark="Twin Turbo"></mootor> | |||
<mootor type="Diisel" size="3,0" design="R6" mark="Twin Turbo"></mootor> | |||
<mootor type="Diisel" size="5,0" design="R6" mark="Triple Turbo"></mootor> | |||
</mootorid> | |||
</kere> | |||
</mudel> | |||
</mark> | |||
</autod> | |||
</source> | |||
== XSLT == | |||
<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>Saksa lippulaevad</title> | |||
<body> | |||
<xsl:for-each select="autod/mark"> | |||
<h1> | |||
<xsl:value-of select="@name"/> | |||
</h1> | |||
<table border="1"> | |||
<tr> | |||
<td>Mudel</td> | |||
<td>Kere</td> | |||
<td>Tüüp</td> | |||
<td>Tootmisaastad</td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<xsl:value-of select="mudel/@name"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@id"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@type"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@yearsactive"/> | |||
</td> | |||
</tr> | |||
</table> | |||
<table border="1"> | |||
<tr> | |||
<td>Kütus</td> | |||
<td>Kubatuur</td> | |||
<td>Ehitus</td> | |||
<td>Tähis</td> | |||
</tr> | |||
<xsl:for-each select="mudel/kere/mootorid/mootor"> | |||
<tr> | |||
<td> | |||
<xsl:value-of select="@type"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@size"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@design"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@mark"/> | |||
</td> | |||
</tr> | |||
</xsl:for-each> | |||
</table> | |||
</xsl:for-each> | |||
</body> | |||
</head> | |||
</html> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
=== XSLT 2=== | |||
Kuvatakse ainult Diiselmudelid | |||
<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>Saksa lippulaevad</title> | |||
<body> | |||
<xsl:for-each select="autod/mark"> | |||
<h1> | |||
<xsl:value-of select="@name"/> | |||
</h1> | |||
<table border="1"> | |||
<tr> | |||
<td>Mudel</td> | |||
<td>Kere</td> | |||
<td>Tüüp</td> | |||
<td>Tootmisaastad</td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<xsl:value-of select="mudel/@name"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@id"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@type"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@yearsactive"/> | |||
</td> | |||
</tr> | |||
</table> | |||
<table border="1"> | |||
<tr> | |||
<td>Kütus</td> | |||
<td>Kubatuur</td> | |||
<td>Ehitus</td> | |||
<td>Tähis</td> | |||
</tr> | |||
<xsl:for-each select="mudel/kere/mootorid/mootor"> | |||
<xsl:if test="@type='Diisel'"> | |||
<tr> | |||
<td> | |||
<xsl:value-of select="@type"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@size"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@design"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@mark"/> | |||
</td> | |||
</tr> | |||
</xsl:if> | |||
</xsl:for-each> | |||
</table> | |||
</xsl:for-each> | |||
</body> | |||
</head> | |||
</html> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
=== XSLT 3 === | |||
Kuvatakse ainult Bensiinimootoriga mudelid | |||
<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>Saksa lippulaevad</title> | |||
<body> | |||
<xsl:for-each select="autod/mark"> | |||
<h1> | |||
<xsl:value-of select="@name"/> | |||
</h1> | |||
<table border="1"> | |||
<tr> | |||
<td>Mudel</td> | |||
<td>Kere</td> | |||
<td>Tüüp</td> | |||
<td>Tootmisaastad</td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<xsl:value-of select="mudel/@name"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@id"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@type"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="mudel/kere/@yearsactive"/> | |||
</td> | |||
</tr> | |||
</table> | |||
<table border="1"> | |||
<tr> | |||
<td>Kütus</td> | |||
<td>Kubatuur</td> | |||
<td>Ehitus</td> | |||
<td>Tähis</td> | |||
</tr> | |||
<xsl:for-each select="mudel/kere/mootorid/mootor"> | |||
<xsl:if test="@type='Bensiin'"> | |||
<tr> | |||
<td> | |||
<xsl:value-of select="@type"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@size"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@design"/> | |||
</td> | |||
<td> | |||
<xsl:value-of select="@mark"/> | |||
</td> | |||
</tr> | |||
</xsl:if> | |||
</xsl:for-each> | |||
</table> | |||
</xsl:for-each> | |||
</body> | |||
</head> | |||
</html> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
== XSD == | |||
<source lang="xml"> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |||
<xs:element name="autod"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="mark"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="mudel"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="kere"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="mootorid"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="mootor"> | |||
<xs:complexType> | |||
<xs:attribute name="type" type="xs:string" use="required" /> | |||
<xs:attribute name="size" type="xs:string" use="required" /> | |||
<xs:attribute name="design" type="xs:string" use="required" /> | |||
<xs:attribute name="mark" type="xs:string" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
<xs:attribute name="id" type="xs:string" use="required" /> | |||
<xs:attribute name="type" type="xs:string" use="required" /> | |||
<xs:attribute name="yearsactive" type="xs:string" 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="name" type="xs:string" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:schema> | |||
</source> | |||
=Veebiteenuse analüüs= | |||
==Kirjeldus== | ==Kirjeldus== | ||
Veebiteenus | Veebiteenus kuhu saab listida oma loetud raamatud, lugemisel olevad raamatud ja raamatud mida on soov lugeda. | ||
Iga kasutaja saab anda oma loetud raamatutele hinnanguid ning ülevaateid. | |||
Loetud raamatute list on avalik, ehk teenuse eesmärk on luua profiil oma loetud raamatutest. | |||
==Must have Funktsioonid== | ==Must have Funktsioonid== | ||
* Kasutajate autentimine | * Kasutajate autentimine | ||
* Kasutajate registreerimine | * Kasutajate registreerimine (avalik) | ||
* Raamatute lisamine | * Raamatute lisamine (ainult autenditud kasutajad) | ||
* Kasutaja raamatute lisamine/vaatamine | * Raamatu info vaatamine (avalik?) | ||
* Raamatu hinnangute lisamine | * Kasutaja raamatu listi vaatamine (avalik) | ||
* Raamatu ülevaadete lisamine | * Raamatute lisamine oma listi (ainult autenditud kasutajad) | ||
* Kasutaja raamatute lisamine/vaatamine (avalik) | |||
* Raamatu hinnangute lisamine (ainult autenditud kasutajad) | |||
* Raamatu ülevaadete lisamine (ainult autenditud kasutajad) | |||
* Raamatu ülevaadete lugemine (avalik või osaliselt piiratud) | |||
* Kasutaja info vaatamine (avalik) | |||
==Nice to have Funktsioonid== | ==Nice to have Funktsioonid== | ||
* | * Raamatute lisamine / info täiendamine Google Books API abil? | ||
* Sõbralist? | |||
* If you liked this book, maybe you like this book funktsionaalsus ? | |||
* profiili / raamatute pildid (url nendele) ? | |||
* filmide lisamise võimalus jms | |||
Olemite struktuur | ==Olemite struktuur== | ||
[[File:IRead.png]] | [[File:IRead.png]] | ||
Book -> BookInCategory ühendus valepidi | |||
=Veebiteenus= | =Veebiteenus= | ||
Olemas: | |||
* Kasutajate autentimine (/token) | |||
* Kasutajate registreerimine (avalik) (/api/account/register POST) | |||
* Raamatute lisamine (/api/books POST ainult admin) | |||
* Raamatu info vaatamine (avalik?) (/api/books/xxxxxxxxxxxxx GET) | |||
* Kasutaja raamatu listi vaatamine (avalik) (/api/users/username GET) | |||
* Raamatute lisamine oma listi (ainult autenditud kasutajad) (/api/mybooks POST) | |||
* Raamatu ülevaadete lisamine (ainult autenditud kasutajad) (/api/books/reviews POST) | |||
* Raamatu ülevaadete lugemine (avalik või osaliselt piiratud) (/api/books/reviews?isbn=xxxxxxxxxxxxx GET) | |||
* Kasutaja info vaatamine (avalik) (/api/users/username GET) | |||
* Raamatute lisamine / info täiendamine Google Books API abil, kui raamatut andmebaasist ei leitud (/api/books/xxxxxxxxxxxxx/ GET) | |||
* Raamatu keskmine hinnang (/api/books/xxxxxxxxxxxxx andmetes) | |||
* Raamatute eemaldamine enda listist (/api/mybooks/xxxxxxxxxxxxx DELETE) | |||
* Raamatute eemaldamine (/api/books/xxxxxxxxxxxxx DELETE, ainult admin) | |||
* Kasutaja kustutamine (/api/users/username DELETE, ainult admin) | |||
* Hinnangute lisamine (/api/books/ratings POST) | |||
* reviewde listimine by user (/api/users/reviews?username=username) | |||
* Statistika, üldine ja by User /statistics ja /statistics/username | |||
* Päringute piirang ajaühikus | |||
Dokumentatsioon /help | |||
Klientrakendus RaamatApp.sln | |||
Source: (veebiteenus ja klientrakendus) | |||
[http://enos.itcollege.ee/~ttammear/Raamat.zip Raamat.zip] | |||
=Klientrakendus= | =Klientrakendus= | ||
Klientrakendus täiendamisel 12. juuniks. | |||
[http://enos.itcollege.ee/~ttammear/RaamatApp.zip Klientrakendus] | |||
=Logi= | |||
24.04.2015 - Projekti idee genereeritud, Andmestruktuur välja mõeldud, TFS projekt loodud | |||
25.04.2015 - Andmestruktuuri klassid, Entity Framework lisatud, Repod loodud, Ninject lisatud, Analüüs kirjutatud | |||
05.05.2015 - Osa nõutud esimesest XML kodutööst lisatud. Puudu veel kaks erinevat kolmest XSLT vormindusfailist. | |||
11.05.2015 - Veebiteenuse struktuur ja olemasolevad osad välja toodud. Kaks viimast XSLT variatsiooni lisatud. | |||
28.05.2015 - Link veebiteenuse ja klientrakenduse lähtekoodile. |
Latest revision as of 07:32, 11 June 2015
Meeskonna Liikmed
- Talis Tammearu
- Silver Vanamets
XML
<?xml version="1.0" encoding="utf-8" ?>
<autod>
<mark name="Audi">
<mudel name="A8">
<kere id="D4" type="4H" yearsactive="2009-present">
<mootorid>
<mootor type="Bensiin" size="2,0" design="R4" mark="TFSI"></mootor>
<mootor type="Bensiin" size="2,5" design="V6" mark="FSI"></mootor>
<mootor type="Bensiin" size="3,0" design="V6" mark="TFSI"></mootor>
<mootor type="Bensiin" size="4,0" design="V8" mark="TFSI"></mootor>
<mootor type="Bensiin" size="4,2" design="V8" mark="FSI"></mootor>
<mootor type="Bensiin" size="6,3" design="W12" mark="FSI"></mootor>
<mootor type="Diisel" size="3,0" design="V6" mark="TDI"></mootor>
<mootor type="Diisel" size="4,2" design="V8" mark="TDI"></mootor>
</mootorid>
</kere>
</mudel>
</mark>
<mark name="Volkswagen">
<mudel name="Phaeton">
<kere id="D1" type="F" yearsactive="2003-present">
<mootorid>
<mootor type="Bensiin" size="3,2" design="VR6" mark="N/A"></mootor>
<mootor type="Bensiin" size="3,6" design="VR6" mark="N/A"></mootor>
<mootor type="Bensiin" size="4,2" design="V8" mark="N/A"></mootor>
<mootor type="Bensiin" size="6,0" design="W12" mark="N/A"></mootor>
<mootor type="Diisel" size="3,0" design="V6" mark="TDI"></mootor>
<mootor type="Diisel" size="5,0" design="V10" mark="TDI"></mootor>
</mootorid>
</kere>
</mudel>
</mark>
<mark name="Skoda">
<mudel name="Superb">
<kere id="B6" type="3T" yearsactive="2008-present">
<mootorid>
<mootor type="Bensiin" size="1,4" design="R4" mark="TSI"></mootor>
<mootor type="Bensiin" size="1,8" design="R4" mark="TSI"></mootor>
<mootor type="Bensiin" size="2,0" design="R4" mark="TSI"></mootor>
<mootor type="Bensiin" size="3,6" design="VR6" mark="N/A"></mootor>
<mootor type="Diisel" size="1,6" design="R4" mark="TDI CR"></mootor>
<mootor type="Diisel" size="1,9" design="R4" mark="TDI PD"></mootor>
<mootor type="Diisel" size="2,0" design="R4" mark="TDI PD"></mootor>
<mootor type="Diisel" size="2,0" design="R4" mark="TDI CR"></mootor>
</mootorid>
</kere>
</mudel>
</mark>
<mark name="Mercedes-Benz">
<mudel name="E-Klass">
<kere id="W212" type="N/A" yearsactive="2009-present">
<mootorid>
<mootor type="Bensiin" size="1,8" design="R4" mark="Turbocharged"></mootor>
<mootor type="Bensiin" size="3,0" design="V6" mark="N/A"></mootor>
<mootor type="Bensiin" size="3,5" design="V6" mark="N/A"></mootor>
<mootor type="Bensiin" size="4,7" design="V8" mark="Turbocharged"></mootor>
<mootor type="Bensiin" size="5,5" design="V8" mark="Turbocharged"></mootor>
<mootor type="Bensiin" size="6,2" design="V8" mark="N/A"></mootor>
<mootor type="Diisel" size="2,1" design="R4" mark="N/A"></mootor>
<mootor type="Diisel" size="3,0" design="V6" mark="N/A"></mootor>
</mootorid>
</kere>
</mudel>
</mark>
<mark name="BMW">
<mudel name="7-Seeria">
<kere id="F01" type="N/A" yearsactive="2008-present">
<mootorid>
<mootor type="Hübriid" size="N/A" design="E" mark="Twin Turbo ActiveHybrid"></mootor>
<mootor type="Bensiin" size="5,0" design="V8" mark="Twin Turbo"></mootor>
<mootor type="Bensiin" size="6,0" design="V12" mark="Twin Turbo"></mootor>
<mootor type="Diisel" size="3,0" design="R6" mark="Twin Turbo"></mootor>
<mootor type="Diisel" size="5,0" design="R6" mark="Triple Turbo"></mootor>
</mootorid>
</kere>
</mudel>
</mark>
</autod>
XSLT
<?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>Saksa lippulaevad</title>
<body>
<xsl:for-each select="autod/mark">
<h1>
<xsl:value-of select="@name"/>
</h1>
<table border="1">
<tr>
<td>Mudel</td>
<td>Kere</td>
<td>Tüüp</td>
<td>Tootmisaastad</td>
</tr>
<tr>
<td>
<xsl:value-of select="mudel/@name"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@id"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@type"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@yearsactive"/>
</td>
</tr>
</table>
<table border="1">
<tr>
<td>Kütus</td>
<td>Kubatuur</td>
<td>Ehitus</td>
<td>Tähis</td>
</tr>
<xsl:for-each select="mudel/kere/mootorid/mootor">
<tr>
<td>
<xsl:value-of select="@type"/>
</td>
<td>
<xsl:value-of select="@size"/>
</td>
<td>
<xsl:value-of select="@design"/>
</td>
<td>
<xsl:value-of select="@mark"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</body>
</head>
</html>
</xsl:template>
</xsl:stylesheet>
XSLT 2
Kuvatakse ainult Diiselmudelid
<?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>Saksa lippulaevad</title>
<body>
<xsl:for-each select="autod/mark">
<h1>
<xsl:value-of select="@name"/>
</h1>
<table border="1">
<tr>
<td>Mudel</td>
<td>Kere</td>
<td>Tüüp</td>
<td>Tootmisaastad</td>
</tr>
<tr>
<td>
<xsl:value-of select="mudel/@name"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@id"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@type"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@yearsactive"/>
</td>
</tr>
</table>
<table border="1">
<tr>
<td>Kütus</td>
<td>Kubatuur</td>
<td>Ehitus</td>
<td>Tähis</td>
</tr>
<xsl:for-each select="mudel/kere/mootorid/mootor">
<xsl:if test="@type='Diisel'">
<tr>
<td>
<xsl:value-of select="@type"/>
</td>
<td>
<xsl:value-of select="@size"/>
</td>
<td>
<xsl:value-of select="@design"/>
</td>
<td>
<xsl:value-of select="@mark"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:for-each>
</body>
</head>
</html>
</xsl:template>
</xsl:stylesheet>
XSLT 3
Kuvatakse ainult Bensiinimootoriga mudelid
<?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>Saksa lippulaevad</title>
<body>
<xsl:for-each select="autod/mark">
<h1>
<xsl:value-of select="@name"/>
</h1>
<table border="1">
<tr>
<td>Mudel</td>
<td>Kere</td>
<td>Tüüp</td>
<td>Tootmisaastad</td>
</tr>
<tr>
<td>
<xsl:value-of select="mudel/@name"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@id"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@type"/>
</td>
<td>
<xsl:value-of select="mudel/kere/@yearsactive"/>
</td>
</tr>
</table>
<table border="1">
<tr>
<td>Kütus</td>
<td>Kubatuur</td>
<td>Ehitus</td>
<td>Tähis</td>
</tr>
<xsl:for-each select="mudel/kere/mootorid/mootor">
<xsl:if test="@type='Bensiin'">
<tr>
<td>
<xsl:value-of select="@type"/>
</td>
<td>
<xsl:value-of select="@size"/>
</td>
<td>
<xsl:value-of select="@design"/>
</td>
<td>
<xsl:value-of select="@mark"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:for-each>
</body>
</head>
</html>
</xsl:template>
</xsl:stylesheet>
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="autod">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="mark">
<xs:complexType>
<xs:sequence>
<xs:element name="mudel">
<xs:complexType>
<xs:sequence>
<xs:element name="kere">
<xs:complexType>
<xs:sequence>
<xs:element name="mootorid">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="mootor">
<xs:complexType>
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute name="size" type="xs:string" use="required" />
<xs:attribute name="design" type="xs:string" use="required" />
<xs:attribute name="mark" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute name="yearsactive" type="xs:string" 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="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Veebiteenuse analüüs
Kirjeldus
Veebiteenus kuhu saab listida oma loetud raamatud, lugemisel olevad raamatud ja raamatud mida on soov lugeda.
Iga kasutaja saab anda oma loetud raamatutele hinnanguid ning ülevaateid.
Loetud raamatute list on avalik, ehk teenuse eesmärk on luua profiil oma loetud raamatutest.
Must have Funktsioonid
- Kasutajate autentimine
- Kasutajate registreerimine (avalik)
- Raamatute lisamine (ainult autenditud kasutajad)
- Raamatu info vaatamine (avalik?)
- Kasutaja raamatu listi vaatamine (avalik)
- Raamatute lisamine oma listi (ainult autenditud kasutajad)
- Kasutaja raamatute lisamine/vaatamine (avalik)
- Raamatu hinnangute lisamine (ainult autenditud kasutajad)
- Raamatu ülevaadete lisamine (ainult autenditud kasutajad)
- Raamatu ülevaadete lugemine (avalik või osaliselt piiratud)
- Kasutaja info vaatamine (avalik)
Nice to have Funktsioonid
- Raamatute lisamine / info täiendamine Google Books API abil?
- Sõbralist?
- If you liked this book, maybe you like this book funktsionaalsus ?
- profiili / raamatute pildid (url nendele) ?
- filmide lisamise võimalus jms
Olemite struktuur
Book -> BookInCategory ühendus valepidi
Veebiteenus
Olemas:
- Kasutajate autentimine (/token)
- Kasutajate registreerimine (avalik) (/api/account/register POST)
- Raamatute lisamine (/api/books POST ainult admin)
- Raamatu info vaatamine (avalik?) (/api/books/xxxxxxxxxxxxx GET)
- Kasutaja raamatu listi vaatamine (avalik) (/api/users/username GET)
- Raamatute lisamine oma listi (ainult autenditud kasutajad) (/api/mybooks POST)
- Raamatu ülevaadete lisamine (ainult autenditud kasutajad) (/api/books/reviews POST)
- Raamatu ülevaadete lugemine (avalik või osaliselt piiratud) (/api/books/reviews?isbn=xxxxxxxxxxxxx GET)
- Kasutaja info vaatamine (avalik) (/api/users/username GET)
- Raamatute lisamine / info täiendamine Google Books API abil, kui raamatut andmebaasist ei leitud (/api/books/xxxxxxxxxxxxx/ GET)
- Raamatu keskmine hinnang (/api/books/xxxxxxxxxxxxx andmetes)
- Raamatute eemaldamine enda listist (/api/mybooks/xxxxxxxxxxxxx DELETE)
- Raamatute eemaldamine (/api/books/xxxxxxxxxxxxx DELETE, ainult admin)
- Kasutaja kustutamine (/api/users/username DELETE, ainult admin)
- Hinnangute lisamine (/api/books/ratings POST)
- reviewde listimine by user (/api/users/reviews?username=username)
- Statistika, üldine ja by User /statistics ja /statistics/username
- Päringute piirang ajaühikus
Dokumentatsioon /help Klientrakendus RaamatApp.sln
Source: (veebiteenus ja klientrakendus) Raamat.zip
Klientrakendus
Klientrakendus täiendamisel 12. juuniks.
Logi
24.04.2015 - Projekti idee genereeritud, Andmestruktuur välja mõeldud, TFS projekt loodud
25.04.2015 - Andmestruktuuri klassid, Entity Framework lisatud, Repod loodud, Ninject lisatud, Analüüs kirjutatud
05.05.2015 - Osa nõutud esimesest XML kodutööst lisatud. Puudu veel kaks erinevat kolmest XSLT vormindusfailist.
11.05.2015 - Veebiteenuse struktuur ja olemasolevad osad välja toodud. Kaks viimast XSLT variatsiooni lisatud.
28.05.2015 - Link veebiteenuse ja klientrakenduse lähtekoodile.