Aloha Snackbar

From ICO wiki
Jump to navigationJump to search

Meeskond ja rollid

  • Egert Aia - Kuri Näärivana - karjub, lõugab ja kamandab (loe: projektijuht)
  • Merit Ridaste - Kimbutav Grinch - kannab kaasas mappi, teab kõike, mis on seotud kuupäevadega(loe: kordinaator)
  • Ants-Kristjan Rooma - TO BE DETERMINED
  • Siim Ivask - TO BE DETERMINED

Idee

Kas teate seda tunnet, et teil pole arvutit ning sooviksite, et kusagilt oleks võimalik üheks õhtuks laenutada endale arvuti, et testida kas spetsifikatsioonid on teile kohased? Meie küll teame - ning sestap kannabki meie projekt nime Arvutirent. Põhimissioon on valmistada töötav veebirakendus kus kasutajal oleks võimalik rentida arvuti ning hiljem see ka endale soetada kui tegemist on tõepoolest hea arvutiga.

Rendi pikkusest ning lepingutest sõltuvalt esitatakse kliendile arve.

Adminniliidesest on võimalik arvuteid lisada/kustutada Kasutajaliidesest rentida/osta.

Kasutatav tehnoloogia

TO BE DETERMINED

Rakenduse sisu

Rakenduses on olemas järgmised võimalused (Must have):

  • Admin saab lisada süsteemi uusi arvuteid.
  • Admin saab muuta arvutite kohta käivat informatsiooni.
  • Admin saab kustutada olemasolevaid arvuteid.´
  • Adminil on võimalik näha tervet rentimisajalugu.
  • Adminil on võimalik näha tavakasutaja rentimisajalugu.
  • Adminil on võimalik näha nimistut tavakasutajatest, kes pole rendituid masinaid tagastanud.
  • Adminil on võimalik kustutada tavakasutajaid
  • Tavakasutajal on võimalik näha kõiki renditavaid arvuteid.
  • Tavakasutajal on võimalik otsida arvutit spetsiifiliste parameetrite järgi
  • Tavakasutajal on võimalik rentida üks kuni mitu arvutit mingiks kindlaks ajaks.
  • Tavakasutajal on võimalik näha enda renditud arvuteid ja nende tagastamistähtaegu.
  • Tavakasutajale esitatakse lisaarve, kui masin pole tähtajaks tagastatud.
  • Külalisel on võimalik registreedida, et saada tavakasutajaks
  • Külalisel on võimalik teha kõike mida tavakasutajal

Rakenduses võiksid olla lisavõimalused (Should have):

  • Tavakasutajal on võimalik hinnata arvuteid.
  • Tavakasutajal on võimalik lisada kommentaare pakutava arvuti kohta.
  • Väga kaunis UI mis on lihtsasti arusaadav

Andmebaasiskeem

Andmebaasi struktuuri edasiehitus

Esimene etapp

  • Luua XML fail vabalt valitud andmete edastamiseks
  • Luua sellele faili skeemifail
  • XSL fail(id) erinevate transformatsioonide tarvis

XML Fail

<?xml version="1.0" encoding="utf-8"?>
<Computers>
	<!--Example of laptop: gaming-->
	<Computer id ="1" type="laptop" purpose ="gaming">
		<Generals>
			<General property="color"><![CDATA[Silver]]></General>
			<General property="release"><![CDATA[2016]]></General>
			<General property="os" type ="64-bit"><![CDATA[Windows 10, Home]]></General>
			<General property="manufactorer"><![CDATA[AlienWare]]></General>
		</Generals>
		<Parameters>
			<parameter property="battery" unit="h"><![CDATA[6,5]]></parameter>
			<parameter property="weight" unit="kg"><![CDATA[3,78]]></parameter>
			<parameter property="depth" unit ="cm"><![CDATA[29,19]]></parameter>
			<parameter property="width" unit="cm"><![CDATA[43]]></parameter>
			<parameter property="height" unit ="cm"><![CDATA[3,44]]></parameter>
		</Parameters>
		<components>
			<component property="processor" type="i7" speed ="2-3Gz" manufactorer="Intel®"><![CDATA[Core™ 6700HQ]]></component>
			<component property="videocard" type="GDDR5" manufactorer="NVIDIA®" serie="GeForce™" vram="3072" vram_unit="MB"><![CDATA[GTX 970M]]></component>
			<component property="storage" type="SSD" unit="GB"><![CDATA[256]]></component>
			<component property="storage" type="HDD" speed="7200 p/m" unit="GB"><![CDATA[1000]]></component>
			<component property="ram" type ="DDR4" unit="GB"><![CDATA[16]]></component>
		</components>
		<interfaces>
			<inputs>
				<input amount="3"><![CDATA[USB 3.0]]></input>
				<input amount="1"><![CDATA[HDMI]]></input>
				<input amount="1"><![CDATA[Mini-DP]]></input>
				<input amount="1"><![CDATA[Microphone]]></input>
			</inputs>
			<outputs>
				<output amount="1"><![CDATA[Headset]]></output>
			</outputs>
		</interfaces>
		<communications>
			<communication type="Wifi"> <![CDATA[IEEE 802.11bc, IEEE 802.11gc, IEEE 802.11nc, IEEE 802.11a]]></communication>
			<communication type="Bluetooth" version="4.1"><![CDATA[Bluetooth]]></communication>
		</communications>
		<screeninfos>
			<monitor number="1">
				<screeninfo property="resolution" type="FullHD"><![CDATA[1920x1080]]></screeninfo>
				<screeninfo property="size" unit="inch"><![CDATA[17,3]]></screeninfo>
				<screeninfo property="surface"><![CDATA[matt]]></screeninfo>
				<screeninfo property="screen type"><![CDATA[LED IPS]]></screeninfo>
				<screeninfo property="touchscreen"><![CDATA[Yes]]></screeninfo>
			</monitor>
		</screeninfos>
		<gears>
			<gear property="bag" type="laptop"><![CDATA[Yes]]></gear>
			<gear property="charger" cells="8" W="240"><![CDATA[Yes]]></gear>
		</gears>
		<Informations>
			<information type="price" unit="EUR"><![CDATA[2340]]></information>
			<information type="rent price" unit="EUR/day"><![CDATA[50]]></information>
		</Informations>
	</Computer>

	<!--Example of laptop: home-->
	<Computer id ="2" type="laptop" purpose ="home">
		<Generals>
			<General property="color"><![CDATA[White]]></General>
			<General property="release"><![CDATA[2015]]></General>
			<General property="os" type ="64-bit"><![CDATA[Windows 8, Home]]></General>
			<General property="manufactorer"><![CDATA[HP]]></General>
		</Generals>
		<Parameters>
			<parameter property="battery" unit="h"><![CDATA[5,5]]></parameter>
			<parameter property="weight" unit="kg"><![CDATA[1,68]]></parameter>
			<parameter property="depth" unit ="cm"><![CDATA[24,4]]></parameter>
			<parameter property="width" unit="cm"><![CDATA[34]]></parameter>
			<parameter property="height" unit ="cm"><![CDATA[1,99]]></parameter>
		</Parameters>
		<components>
			<component property="processor" type="i5" speed ="2,3-2,8Gz" manufactorer="Intel®"><![CDATA[Core™ 6200U]]></component>
			<component property="videocard" type="DDR3" manufactorer="Intel®" serie="HD"><![CDATA[520]]></component>
			<component property="storage" type="SSD" unit="GB"><![CDATA[128]]></component>
			<component property="ram" type ="DDR3" unit="GB"><![CDATA[16]]></component>
		</components>
		<interfaces>
			<inputs>
				<input amount="2"><![CDATA[USB 3.0]]></input>
				<input amount="1"><![CDATA[USB 2.0]]></input>
				<input amount="1"><![CDATA[HDMI]]></input>
				<input amount="1"><![CDATA[VGA]]></input>
				<input amount="1"><![CDATA[Microphone]]></input>
			</inputs>
			<outputs>
				<output amount="1"><![CDATA[Headset]]></output>
			</outputs>
		</interfaces>
		<communications>
			<communication type="Wifi"> <![CDATA[IEEE 802.11bc, IEEE 802.11gc, IEEE 802.11nc, IEEE 802.11a]]></communication>
			<communication type="Bluetooth" version="4.0"><![CDATA[Bluetooth]]></communication>
		</communications>
		<screeninfos>
			<monitor number="1">
				<screeninfo property="resolution" type="HD"><![CDATA[1366x768]]></screeninfo>
				<screeninfo property="size" unit="inch"><![CDATA[14]]></screeninfo>
				<screeninfo property="surface"><![CDATA[matt]]></screeninfo>
				<screeninfo property="screen type"><![CDATA[LED]]></screeninfo>
				<screeninfo property="touchscreen"><![CDATA[No]]></screeninfo>
			</monitor>
		</screeninfos>
		<gears>
			<gear property="bag" type="laptop"><![CDATA[Yes]]></gear>
			<gear property="charger" cells="4" W="45"><![CDATA[Yes]]></gear>
		</gears>
		<extras>
			<extra><![CDATA[Id-card reader]]></extra>
			<extra><![CDATA[CD-Drive]]></extra>
			<extra type="Multi-in-1" supports="SD, SDHC, SDXC"><![CDATA[Memory-card reader]]></extra>
		</extras>
		<Informations>
			<information type="price" unit="EUR"><![CDATA[720]]></information>
			<information type="rent price" unit="EUR/day"><![CDATA[30]]></information>
		</Informations>
	</Computer>

	<!--Example of laptop: office-->
	<Computer id ="3" type="laptop" purpose ="office">
		<Generals>
			<General property="color"><![CDATA[Red]]></General>
			<General property="release"><![CDATA[2015]]></General>
			<General property="os" type ="64-bit"><![CDATA[Windows 8.1]]></General>
			<General property="manufactorer"><![CDATA[Dell]]></General>
		</Generals>
		<Parameters>
			<parameter property="battery" unit="h"><![CDATA[6,5]]></parameter>
			<parameter property="weight" unit="kg"><![CDATA[2,11]]></parameter>
			<parameter property="depth" unit ="cm"><![CDATA[29,12]]></parameter>
			<parameter property="width" unit="cm"><![CDATA[37,78]]></parameter>
			<parameter property="height" unit ="cm"><![CDATA[1,99]]></parameter>
		</Parameters>
		<components>
			<component property="processor" type="i7" speed ="2,4-3,0Gz" manufactorer="Intel®"><![CDATA[Core™ 5500U]]></component>
			<component property="videocard" type="GDDR5" manufactorer="AMD" serie="Radeon" vram="4096" vram_unit="MB"><![CDATA[R7 M270]]></component>
			<component property="storage" type="SSD" unit="GB"><![CDATA[256]]></component>
			<component property="ram" type ="DDR4" unit="GB"><![CDATA[16]]></component>
		</components>
		<interfaces>
			<inputs>
				<input amount="2"><![CDATA[USB 3.0]]></input>
				<input amount="1"><![CDATA[USB 2.0]]></input>
				<input amount="1"><![CDATA[HDMI]]></input>
				<input amount="1"><![CDATA[Microphone]]></input>
			</inputs>
			<outputs>
				<output amount="1"><![CDATA[Headset]]></output>
			</outputs>
		</interfaces>
		<communications>
			<communication type="Wifi"> <![CDATA[IEEE 802.11bc, IEEE 802.11gc, IEEE 802.11nc, IEEE 802.11a]]></communication>
			<communication type="Bluetooth" version="4.0"><![CDATA[Bluetooth]]></communication>
		</communications>
		<screeninfos>
			<monitor number="1">
				<screeninfo property="resolution" type="UltraHD"><![CDATA[3840x2160]]></screeninfo>
				<screeninfo property="size" unit="inch"><![CDATA[15,6]]></screeninfo>
				<screeninfo property="surface"><![CDATA[shiny]]></screeninfo>
				<screeninfo property="screen type"><![CDATA[LED IPS]]></screeninfo>
				<screeninfo property="touchscreen"><![CDATA[No]]></screeninfo>
			</monitor>
		</screeninfos>
		<gears>
			<gear property="bag" type="laptop"><![CDATA[Yes]]></gear>
			<gear property="charger" cells="4" W="65"><![CDATA[Yes]]></gear>
		</gears>
		<extras>
			<extra><![CDATA[Id-card reader]]></extra>
			<extra><![CDATA[CD-Drive]]></extra>
			<extra type="Multi-in-1" supports="SD, SDHC, SDXC"><![CDATA[Memory-card reader]]></extra>
		</extras>
		<Informations>
			<information type="price" unit="EUR"><![CDATA[1700]]></information>
			<information type="rent price" unit="EUR/day"><![CDATA[40]]></information>
		</Informations>
	</Computer>

	<!--Example of PC: gaming-->
	<Computer id ="4" type="PC" purpose ="gaming">
		<Generals>
			<General property="color"><![CDATA[Black]]></General>
			<General property="release"><![CDATA[2015]]></General>
			<General property="os" type ="64-bit"><![CDATA[Windows 10, Home]]></General>
			<General property="manufactorer"><![CDATA[AlienWare]]></General>
		</Generals>
		<Parameters>
			<parameter property="weight" unit="kg"><![CDATA[3,6]]></parameter>
			<parameter property="depth" unit ="cm"><![CDATA[20,32]]></parameter>
			<parameter property="width" unit="cm"><![CDATA[20,32]]></parameter>
			<parameter property="height" unit ="cm"><![CDATA[7,62]]></parameter>
		</Parameters>
		<components>
			<component property="processor" type="i7" speed ="2,0-3,0Gz" manufactorer="Intel®"><![CDATA[Core™ 4765T]]></component>
			<component property="videocard" type="GDDR5" manufactorer="NVIDIA®" serie="GeForce™" vram="3072" vram_unit="MB"><![CDATA[GTX 970M]]></component>
			<component property="storage" type="SSD" unit="GB"><![CDATA[256]]></component>
			<component property="storage" type="HDD" speed="7200 p/m" unit="TB"><![CDATA[1]]></component>
			<component property="ram" type ="DDR4" unit="GB"><![CDATA[16]]></component>
		</components>
		<interfaces>
			<inputs>
				<input amount="4"><![CDATA[USB 3.0]]></input>
				<input amount="2"><![CDATA[USB 2.0]]></input>
				<input amount="1"><![CDATA[HDMI]]></input>
				<input amount="1"><![CDATA[Mini-DP]]></input>
				<input amount="1"><![CDATA[Microphone]]></input>
			</inputs>
			<outputs>
				<output amount="1"><![CDATA[Headset]]></output>
			</outputs>
		</interfaces>
		<communications>
			<communication type="Wifi"> <![CDATA[IEEE 802.11bc, IEEE 802.11gc, IEEE 802.11nc, IEEE 802.11a]]></communication>
			<communication type="Bluetooth" version="4.1"><![CDATA[Bluetooth]]></communication>
		</communications>
		<gears>
			<gear property="cables"><![CDATA[Yes]]></gear>
		</gears>
		<extras>
			<extra><![CDATA[Id-card reader]]></extra>
			<extra><![CDATA[DVD-Drive]]></extra>
			<extra type="Multi-in-1" supports="SD, SDHC, SDXC"><![CDATA[Memory-card reader]]></extra>
		</extras>
		<Informations>
			<information type="price" unit="EUR"><![CDATA[2340]]></information>
			<information type="rent price" unit="EUR/day"><![CDATA[75]]></information>
		</Informations>
	</Computer>
</Computers>

XML Validaator

        static void Main(string[] args)
        {
            XmlSchemaSet schemas = new XmlSchemaSet();
            //Change this line for your own place of the file
            schemas.Add("", "C:/Users/Egert/Dropbox/programming/VISUALSPACE/arvutirent/WebApi.Arvutirent/XML_Data/Arvutirent.xsd");

            Console.WriteLine("Attempting to validate");
            //Change this line for your own place of the file
            XDocument custOrdDoc = XDocument.Load("C:/Users/Egert/Dropbox/programming/VISUALSPACE/arvutirent/WebApi.Arvutirent/XML_Data/Arvutirent.xml");
            bool errors = false;
            custOrdDoc.Validate(schemas, (o, e) =>
            {
                Console.WriteLine("{0}", e.Message);
                errors = true;
            });
            Console.WriteLine("custOrdDoc {0}", errors ? "did not validate" : "validated");

            Console.WriteLine();
        }

XSD Fail

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="Computers">
		<xs:complexType>
			<xs:sequence>
				<xs:element maxOccurs="unbounded" name="Computer">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Generals">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="General">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="property" type="xs:string" use="required" />
														<xs:attribute name="type" type="xs:string" use="optional" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Parameters">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="parameter">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="property" type="xs:string" use="required" />
														<xs:attribute name="unit" type="xs:string" use="required" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="components">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="component">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="property" type="xs:string" use="required" />
														<xs:attribute name="type" type="xs:string" use="required" />
														<xs:attribute name="speed" type="xs:string" use="optional" />
														<xs:attribute name="manufactorer" type="xs:string" use="optional" />
														<xs:attribute name="serie" type="xs:string" use="optional" />
														<xs:attribute name="vram" type="xs:unsignedShort" use="optional" />
														<xs:attribute name="vram_unit" type="xs:string" use="optional" />
														<xs:attribute name="unit" type="xs:string" use="optional" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="interfaces">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="inputs">
											<xs:complexType>
												<xs:sequence>
													<xs:element maxOccurs="unbounded" name="input">
														<xs:complexType>
															<xs:simpleContent>
																<xs:extension base="xs:string">
																	<xs:attribute name="amount" type="xs:unsignedByte" use="required" />
																</xs:extension>
															</xs:simpleContent>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
										<xs:element name="outputs">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="output">
														<xs:complexType>
															<xs:simpleContent>
																<xs:extension base="xs:string">
																	<xs:attribute name="amount" type="xs:unsignedByte" use="required" />
																</xs:extension>
															</xs:simpleContent>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="communications">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="communication">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="type" type="xs:string" use="required" />
														<xs:attribute name="version" type="xs:decimal" use="optional" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element minOccurs="0" name="screeninfos">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="monitor">
											<xs:complexType>
												<xs:sequence>
													<xs:element maxOccurs="unbounded" name="screeninfo">
														<xs:complexType>
															<xs:simpleContent>
																<xs:extension base="xs:string">
																	<xs:attribute name="property" type="xs:string" use="required" />
																	<xs:attribute name="type" type="xs:string" use="optional" />
																	<xs:attribute name="unit" type="xs:string" use="optional" />
																</xs:extension>
															</xs:simpleContent>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
												<xs:attribute name="number" type="xs:int" use="required"/>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="gears">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="gear">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="property" type="xs:string" use="required" />
														<xs:attribute name="type" type="xs:string" use="optional" />
														<xs:attribute name="cells" type="xs:unsignedByte" use="optional" />
														<xs:attribute name="W" type="xs:unsignedByte" use="optional" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element minOccurs="0" name="extras">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="extra">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="type" type="xs:string" use="optional" />
														<xs:attribute name="supports" type="xs:string" use="optional" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Informations">
								<xs:complexType>
									<xs:sequence>
										<xs:element maxOccurs="unbounded" name="information">
											<xs:complexType>
												<xs:simpleContent>
													<xs:extension base="xs:string">
														<xs:attribute name="type" type="xs:string" use="required" />
														<xs:attribute name="unit" type="xs:string" use="required" />
													</xs:extension>
												</xs:simpleContent>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="id" type="xs:unsignedInt" use="required" />
						<xs:attribute name="type" type="xs:string" use="required" />
						<xs:attribute name="purpose" type="xs:string" use="required" />
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>

XLST: Näita kõiki arvuteid

<?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>All Computers</title>
			</head>
			<body>
				<h1> All computers in our project</h1>
				<ul>

					<xsl:for-each select="/Computers/Computer">
						<!-- All computers-->
						<li>
							<h2><xsl:value-of select= "concat(@type, '.', @purpose, ' id:', @id )"/></h2>
							General Info:
							<ul>
								<xsl:for-each select="Generals/General">
									<li>
										<xsl:value-of select="concat(@property, ': ', ., ' ',@type)"/>
									</li>
								</xsl:for-each>
							</ul>
							Parameters:
							<ul>
								<xsl:for-each select="Parameters/parameter">
									<li>
										<xsl:value-of select="concat(@property, ': ', ., @unit)"/>
									</li>
								</xsl:for-each>
							</ul>
							Components:
							<ul>
								<xsl:for-each select="components/component">
									<li>
										<xsl:if test="@property = 'processor'">
											<xsl:value-of select="concat(@property, ': ', @manufactorer, ' ', @type, ' ', .,' ', @speed) "/>
										</xsl:if>

										<xsl:if test="@property = 'videocard'">
											<xsl:value-of select="concat(@property, ': ', @manufactorer, ' ', @serie, ' ', .,' ', @type, ' ', @vram, @vram_unit) "/>
										</xsl:if>

										<xsl:if test="@property = 'storage' or @property = 'ram'">
											<xsl:value-of select="concat(@property, ': ', ., @unit,' ', @type) "/>
										</xsl:if>


									</li>
								</xsl:for-each>
							</ul>

							Interfaces:
							<ul>
								<xsl:for-each select="interfaces">
								<li>
								<b>INPUTS</b><br/>
									<ul>
										<xsl:for-each select="inputs/input">
											<xsl:value-of select="concat(@amount,' x ',.)"/>
											<br/>
										</xsl:for-each>
									</ul>
								</li>
								<li>
								<b>OUTPUTS</b><br/>
									<ul>
										<xsl:for-each select="outputs/output">
											<xsl:value-of select="concat(@amount,' x ', . )"/><br/>
										</xsl:for-each>
									</ul>
								</li>
								</xsl:for-each>
							</ul>
							Communications:
							<ul>
								<xsl:for-each select="communications/communication">
									<li>
										<xsl:value-of select="concat(@type, @version,': ', .)"/>
									</li>
								</xsl:for-each>
							</ul>
							
								<xsl:for-each select="screeninfos">
								<xsl:choose>
									<xsl:when test="monitor">
									Screen Information:
									<ul>
									<xsl:for-each select="monitor">
									<li>
									<xsl:value-of select="concat('Monitor', @number)"/>
										<br/>
										<ul>
										<xsl:for-each select="screeninfo">
											<xsl:value-of select="concat(@property, ': ', . ,' ', @type, @unit)"/><br/>
										</xsl:for-each>
										</ul>
									</li>
									</xsl:for-each>
									</ul>
									</xsl:when>

								</xsl:choose>
								</xsl:for-each>

							Gear Information:
							<xsl:for-each select="gears">
							<xsl:choose>
								<xsl:when test="count(gear) > 0">
									<ul>
									<xsl:for-each select="gear">
									<li>
										<xsl:value-of select="@property"/>
										<br/></li>
									</xsl:for-each>
									</ul>
								</xsl:when>
								<xsl:otherwise>
									<ul>No Gear information available</ul>
								</xsl:otherwise>
							</xsl:choose>
							</xsl:for-each>
							Informations:
							<ul>
								<xsl:for-each select="Informations/information">
									<xsl:value-of select="concat(@type, ' ', ., ' ', @unit)"/><br/>
								</xsl:for-each>
							</ul>
						</li>
						<br/>
					</xsl:for-each>

				</ul>

			</body>
		</html>


	</xsl:template>
</xsl:stylesheet>

XLST: Näita arvuteid millel on rohkem või täpselt kolm USB 3.0 porti

<?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>All Computers with 3 or more usb3.0 ports</title>
			</head>
			<body>
				<h1> Computers with 3 or more USB 3.0 ports</h1>
				<ul>
					<xsl:for-each select="/Computers/Computer">
						<!-- All computers-->
						<xsl:if test="interfaces/inputs/input/@amount >= 3 and interfaces/inputs/input/. = 'USB 3.0'">
							<h2>
								<xsl:value-of select= "concat(@type, '.', @purpose, ' id:', @id )"/>
							</h2>
							General Info:
							<ul>
							<xsl:for-each select="Generals/General">
								<li>
									<xsl:value-of select="concat(@property, ': ', ., ' ',@type)"/>
								</li>
							</xsl:for-each>
						</ul>
							Parameters:
							<ul>
								<xsl:for-each select="Parameters/parameter">
									<li>
										<xsl:value-of select="concat(@property, ': ', ., @unit)"/>
									</li>
								</xsl:for-each>
							</ul>
							Components:
							<ul>
								<xsl:for-each select="components/component">
									<li>
										<xsl:if test="@property = 'processor'">
											<xsl:value-of select="concat(@property, ': ', @manufactorer, ' ', @type, ' ', .,' ', @speed) "/>
										</xsl:if>
										<xsl:if test="@property = 'videocard'">
											<xsl:value-of select="concat(@property, ': ', @manufactorer, ' ', @serie, ' ', .,' ', @type, ' ', @vram, @vram_unit) "/>
										</xsl:if>
										<xsl:if test="@property = 'storage' or @property = 'ram'">
											<xsl:value-of select="concat(@property, ': ', ., @unit,' ', @type) "/>
										</xsl:if>
									</li>
								</xsl:for-each>
							</ul>
							Interfaces:
							<ul>
								<xsl:for-each select="interfaces">
									<li>
										<b>INPUTS</b>
										<br/>
										<ul>
											<xsl:for-each select="inputs/input">

												<xsl:value-of select="concat(@amount,' x ',.)"/>


												<br/>
											</xsl:for-each>
										</ul>
									</li>
									<li>
										<b>OUTPUTS</b>
										<br/>
										<ul>
											<xsl:for-each select="outputs/output">
												<xsl:value-of select="concat(@amount,' x ', . )"/>
												<br/>
											</xsl:for-each>
										</ul>
									</li>
								</xsl:for-each>
							</ul>
							Communications:
							<ul>
								<xsl:for-each select="communications/communication">
									<li>
										<xsl:value-of select="concat(@type, @version,': ', .)"/>
									</li>
								</xsl:for-each>
							</ul>
							<xsl:for-each select="screeninfos">
								<xsl:choose>
									<xsl:when test="monitor">
										Screen Information:
										<ul>
											<xsl:for-each select="monitor">
												<li>
													<xsl:value-of select="concat('Monitor', @number)"/>
													<br/>
													<ul>
														<xsl:for-each select="screeninfo">
															<xsl:value-of select="concat(@property, ': ', . ,' ', @type, @unit)"/>
															<br/>
														</xsl:for-each>
													</ul>
												</li>
											</xsl:for-each>
										</ul>
									</xsl:when>
								</xsl:choose>
							</xsl:for-each>
							Gear Information:
							<xsl:for-each select="gears">
								<xsl:choose>
									<xsl:when test="count(gear) > 0">
										<ul>
											<xsl:for-each select="gear">
												<li>
													<xsl:value-of select="@property"/>
													<br/>
												</li>
											</xsl:for-each>
										</ul>
									</xsl:when>
									<xsl:otherwise>
										<ul>No Gear information available</ul>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:for-each>
							Informations:
							<ul>
								<xsl:for-each select="Informations/information">
									<xsl:value-of select="concat(@type, ' ', ., ' ', @unit)"/>
									<br/>
								</xsl:for-each>
							</ul>
							<br/>
						</xsl:if>
					</xsl:for-each>
				</ul>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>

XLST: Näita arvuteid millel on i7 protsessor

<?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="@* | node()">
      <html>
        <head>
          <title>Computers with i7</title>
        </head>

        <body>
          <h1>Computers with i7 processor</h1>
          
          <xsl:for-each select="/Computers/Computer">
            <xsl:variable name="compName" select="concat(@purpose, ' ', @type, ' id:', @id )"></xsl:variable>
            
            <xsl:if test="components/component/@type='i7'">
              <p>
                <xsl:value-of select="$compName"/>
              </p>
            </xsl:if>
          </xsl:for-each>
        </body>
      </html>
    </xsl:template>
</xsl:stylesheet>

Workload

18.02.2016

  • Meeskond sai kokku ning arutati ühiselt tehtava töö üle
  • Kokkulepet ei saavutatud ning järgmisel kohtumisel pidavat igaüks tulema uue ideega

25.02.2016

  • Ühiselt vaieldes jõudsime mõttele teha miskit seotud rendiga
  • Naljatlesime variantide üle ja leppisime kokku idees

03.03.2016

  • Loodi github repo, jaotati ära tööülesanded. Repo leiab SIIT
  • Merit pidi looma xml faili
  • Egert pidi valmimisel teostama kontrolli
  • Siim ja Kristjan mõtlesid XLST failide võimalikuse üle

10.03.2016

  • Egert muutis XML faili inglisekeelseks ning lisas mõningad tagid

17.03.2016

  • Lepiti kokku meeskonnanimes 'Aloha Snackbar'

19.03.2016

  • Egert lõi Wiki lehe, sest Siim ütles, et talle ei meeldi wiki lehti teha
  • Egert nokitses koodi kallal
  • Egert pani viimse projekti kokku

24.03.2016

  • Meeskond sai kokku ning leppis kokku järgnevas:
    • Siim otsib retsenseeritava tiimi
    • Merit loob dokumendi kuhu kõik saavad oma retsensioonid pista
    • Kõik kirjutavad rentsensiooni lauppäevaks.
    • Ants loob andmebaasimudeli
    • Merit otsib Poskaga kontakti, et leppida kokku meeting

13.04.2016

  • Meeskond lõi kaks nädalat lulli *
  • Merit ja Egert said kokku ning genereerisid uue andmebaasimudeli
  • Merit teeb ka ilusa pildi andmebaasimudelist, mida wikisse kuvada
  • Egert kontrollis kogu asja üle ning jagas välja ülesanded, mida inimesed ise saavad teha
  • Pühapäevaks võiks serviced, factoryd ja DTOd valmis olla

17.04.2016

  • Egert lisas wikisse Kristjani tehtud analüüsipunktid ning muutis neid ka natuke ise