Maagikud: Difference between revisions
From ICO wiki
Jump to navigationJump to search
No edit summary |
|||
Line 21: | Line 21: | ||
Administraatori kasutaja on admin@eesti.ee ja parooliks Foobar.foobar1 | Administraatori kasutaja on admin@eesti.ee ja parooliks Foobar.foobar1 | ||
==XML== | |||
===XML=== | |||
<source> | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<people_in_seats> | |||
<person_in_seat person_in_seat_id="3"> | |||
<!--Number between tags show actual seat number--> | |||
<person person_id="3"> | |||
<firstname>Peeter</firstname> | |||
<lastname>Pakiraam</lastname> | |||
<personal_code>345678912</personal_code> | |||
</person> | |||
<!--Number between tags shows actual seat number--> | |||
<seat seat_id="2" type="regular" plane_id="3">1</seat> | |||
<!--Number between tags shows flight_id--> | |||
<flight flight_line_id="2" takeoff="2017-03-13" landing="2017-03-13">2</flight> | |||
</person_in_seat> | |||
<person_in_seat person_in_seat_id="4"> | |||
<!--Number between tags show actual seat number--> | |||
<person person_id="4"> | |||
<firstname>Ants</firstname> | |||
<lastname>Pakk</lastname> | |||
<personal_code>312312321</personal_code> | |||
</person> | |||
<!--Number between tags shows actual seat number--> | |||
<seat seat_id="4" type="VIP" plane_id="4">4</seat> | |||
<!--Number between tags shows flight_id--> | |||
<flight flight_line_id="4" takeoff="2017-03-13" landing="2017-03-13">4</flight> | |||
</person_in_seat> | |||
<person_in_seat person_in_seat_id="5"> | |||
<!--Number between tags show actual seat number--> | |||
<person person_id="5"> | |||
<firstname>Tõnu</firstname> | |||
<lastname>Raamat</lastname> | |||
<personal_code>323123123</personal_code> | |||
</person> | |||
<!--Number between tags shows actual seat number--> | |||
<seat seat_id="5" type="regular" plane_id="5">5</seat> | |||
<!--Number between tags shows flight_id--> | |||
<flight flight_line_id="5" takeoff="2017-03-13" landing="2017-03-13">5</flight> | |||
</person_in_seat> | |||
</people_in_seats> | |||
</source> | |||
===XSD=== | |||
<source> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |||
<xs:element name="people_in_seats"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="person_in_seat"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="person"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="firstname" type="xs:string" /> | |||
<xs:element name="lastname" type="xs:string" /> | |||
<xs:element name="personal_code" type="xs:unsignedInt" /> | |||
</xs:sequence> | |||
<xs:attribute name="person_id" type="xs:unsignedInt" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
<xs:element name="seat"> | |||
<xs:complexType> | |||
<xs:simpleContent> | |||
<xs:extension base="xs:unsignedInt"> | |||
<xs:attribute name="seat_id" type="xs:unsignedInt" use="required" /> | |||
<xs:attribute name="type" type="xs:string" use="required" /> | |||
<xs:attribute name="plane_id" type="xs:unsignedInt" use="required" /> | |||
</xs:extension> | |||
</xs:simpleContent> | |||
</xs:complexType> | |||
</xs:element> | |||
<xs:element name="flight"> | |||
<xs:complexType> | |||
<xs:simpleContent> | |||
<xs:extension base="xs:unsignedInt"> | |||
<xs:attribute name="flight_line_id" type="xs:unsignedInt" use="required" /> | |||
<xs:attribute name="takeoff" type="xs:date" use="required" /> | |||
<xs:attribute name="landing" type="xs:date" use="required" /> | |||
</xs:extension> | |||
</xs:simpleContent> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
<xs:attribute name="person_in_seat_id" type="xs:unsignedInt" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:schema> | |||
</source> | |||
===XSLT1=== | |||
<source> | |||
<?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="/"> | |||
<people_in_seat> | |||
<xsl:for-each select="people_in_seat/person"> | |||
<person> | |||
<firstname> | |||
<xsl:value-of select="firstname"/> | |||
</firstname> | |||
<lastname> | |||
<xsl:value-of select="lastname"/> | |||
</lastname> | |||
<personalcode> | |||
<xsl:value-of select="personalcode"/> | |||
</personalcode> | |||
<seats> | |||
<xsl:for-each select="people_in_seat/seat"/> | |||
<seat> | |||
<xsl:value-of select ="@seat_id"/> | |||
<xsl:value-of select ="@type"/> | |||
<xsl:value-of select ="@plane_id"/> | |||
<xsl:value-of select ="."/> | |||
</seat> | |||
</seats> | |||
<flights> | |||
<xsl:for-each select="people_in_seat/flight"/> | |||
<flight> | |||
<xsl:value-of select ="@flight_line_id"/> | |||
<xsl:value-of select ="@takeoff"/> | |||
<xsl:value-of select ="@landing"/> | |||
<xsl:value-of select ="."/> | |||
</flight> | |||
</flights> | |||
</person> | |||
</xsl:for-each> | |||
</people_in_seat> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
===XSLT2=== | |||
<source> | |||
<?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="/people_in_seats"> | |||
<html> | |||
<head> | |||
<title>People in seats data</title> | |||
</head> | |||
<body> | |||
<xsl:for-each select="person_in_seat"> | |||
<h1> | |||
<xsl:for-each select="person_in_seat/person"> | |||
<xsl:value-of select="firstname"/> | |||
<xsl:value-of select="lastname"/> | |||
<xsl:value-of select="personal_code"/> | |||
</xsl:for-each> | |||
</h1> | |||
<ul> | |||
<xsl:for-each select="person_in_seat/seat"> | |||
<li> | |||
<xsl:value-of select="@seat_id"/> | |||
<xsl:value-of select="@type"/> | |||
<xsl:value-of select="@plane_id"/> | |||
<xsl:value-of select="."/> | |||
</li> | |||
</xsl:for-each> | |||
</ul> | |||
<ul> | |||
<xsl:for-each select="person_in_seat/flight"> | |||
<li> | |||
<xsl:value-of select="@flight_line_id"/> | |||
<xsl:value-of select="@takeoff"/> | |||
<xsl:value-of select="@landing"/> | |||
<xsl:value-of select="."/> | |||
</li> | |||
</xsl:for-each> | |||
</ul> | |||
</xsl:for-each> | |||
</body> | |||
</html> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
==Must have== | ==Must have== |
Revision as of 23:00, 1 June 2018
Liikmed:
- Kristina Rästas
- Simo Jaanus
- Artur Tammiste
- Rauno Lõhmus
Idee
Meie rühma idee oli luua lennujaama ja lennuliini integreeritud süsteem.
Antud rakenduses peaks olema võimalik
- kasutajaks registreerida ja sisse logida.
- Kasutajaid on eri tüüpi.
- Admin kasutaja saab lisada, vaadata ja kustutada kõiki pileteid, lennukeid, lende, lennuliine ja lennujaamu. Admin näeb ka statistilist ülevaadet.
- Tavakasutaja saab broneerida pileteid ning enda omasid ka vaadata.
- Mitte sisse loginud kasutaja saab pileteid broneerida.
Analüüs
Meie rühma analüüs on nähtav lingil.
Meie link koodile on siin.
Administraatori kasutaja on admin@eesti.ee ja parooliks Foobar.foobar1
XML
XML
<?xml version="1.0" encoding="utf-8" ?>
<people_in_seats>
<person_in_seat person_in_seat_id="3">
<!--Number between tags show actual seat number-->
<person person_id="3">
<firstname>Peeter</firstname>
<lastname>Pakiraam</lastname>
<personal_code>345678912</personal_code>
</person>
<!--Number between tags shows actual seat number-->
<seat seat_id="2" type="regular" plane_id="3">1</seat>
<!--Number between tags shows flight_id-->
<flight flight_line_id="2" takeoff="2017-03-13" landing="2017-03-13">2</flight>
</person_in_seat>
<person_in_seat person_in_seat_id="4">
<!--Number between tags show actual seat number-->
<person person_id="4">
<firstname>Ants</firstname>
<lastname>Pakk</lastname>
<personal_code>312312321</personal_code>
</person>
<!--Number between tags shows actual seat number-->
<seat seat_id="4" type="VIP" plane_id="4">4</seat>
<!--Number between tags shows flight_id-->
<flight flight_line_id="4" takeoff="2017-03-13" landing="2017-03-13">4</flight>
</person_in_seat>
<person_in_seat person_in_seat_id="5">
<!--Number between tags show actual seat number-->
<person person_id="5">
<firstname>Tõnu</firstname>
<lastname>Raamat</lastname>
<personal_code>323123123</personal_code>
</person>
<!--Number between tags shows actual seat number-->
<seat seat_id="5" type="regular" plane_id="5">5</seat>
<!--Number between tags shows flight_id-->
<flight flight_line_id="5" takeoff="2017-03-13" landing="2017-03-13">5</flight>
</person_in_seat>
</people_in_seats>
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="people_in_seats">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="person_in_seat">
<xs:complexType>
<xs:sequence>
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string" />
<xs:element name="lastname" type="xs:string" />
<xs:element name="personal_code" type="xs:unsignedInt" />
</xs:sequence>
<xs:attribute name="person_id" type="xs:unsignedInt" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="seat">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute name="seat_id" type="xs:unsignedInt" use="required" />
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute name="plane_id" type="xs:unsignedInt" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="flight">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute name="flight_line_id" type="xs:unsignedInt" use="required" />
<xs:attribute name="takeoff" type="xs:date" use="required" />
<xs:attribute name="landing" type="xs:date" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="person_in_seat_id" type="xs:unsignedInt" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSLT1
<?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="/">
<people_in_seat>
<xsl:for-each select="people_in_seat/person">
<person>
<firstname>
<xsl:value-of select="firstname"/>
</firstname>
<lastname>
<xsl:value-of select="lastname"/>
</lastname>
<personalcode>
<xsl:value-of select="personalcode"/>
</personalcode>
<seats>
<xsl:for-each select="people_in_seat/seat"/>
<seat>
<xsl:value-of select ="@seat_id"/>
<xsl:value-of select ="@type"/>
<xsl:value-of select ="@plane_id"/>
<xsl:value-of select ="."/>
</seat>
</seats>
<flights>
<xsl:for-each select="people_in_seat/flight"/>
<flight>
<xsl:value-of select ="@flight_line_id"/>
<xsl:value-of select ="@takeoff"/>
<xsl:value-of select ="@landing"/>
<xsl:value-of select ="."/>
</flight>
</flights>
</person>
</xsl:for-each>
</people_in_seat>
</xsl:template>
</xsl:stylesheet>
XSLT2
<?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="/people_in_seats">
<html>
<head>
<title>People in seats data</title>
</head>
<body>
<xsl:for-each select="person_in_seat">
<h1>
<xsl:for-each select="person_in_seat/person">
<xsl:value-of select="firstname"/>
<xsl:value-of select="lastname"/>
<xsl:value-of select="personal_code"/>
</xsl:for-each>
</h1>
<ul>
<xsl:for-each select="person_in_seat/seat">
<li>
<xsl:value-of select="@seat_id"/>
<xsl:value-of select="@type"/>
<xsl:value-of select="@plane_id"/>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
<ul>
<xsl:for-each select="person_in_seat/flight">
<li>
<xsl:value-of select="@flight_line_id"/>
<xsl:value-of select="@takeoff"/>
<xsl:value-of select="@landing"/>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Must have
- Lendude broneerimine
- Väljuvate ja saabuvate lendude graafikud
- Kasutaja loomine/autentimine
- Administraatorid saavad lisada/muuta/kustutada lennukeid/lennujaamu/lende/lennu liine
Nice to have
- Lennukite jälgimine õhuruumis
- Ilus kasutajaliides