|
|
(35 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| ==Meeskond==
| |
|
| |
|
| * Erki Miilberg (projektijuht)
| |
| * Kalev Vallsalu
| |
| * Oliver Naaris
| |
| * Margo Kuustik
| |
|
| |
| == Idee ==
| |
|
| |
|
| |
| == XML fail ==
| |
| Ülesande täitmiseks tuleb luua XML fail andmete edastamiseks, selle XML faili skeemifail ning paar kolm sobivat XSL faili loodud XML failis olevate andmete transformeerimiseks HTML formaati ja XML faili formaadi muutmiseks.
| |
| XML-il peab olema vähemalt 4 loogilist dimensiooni.
| |
|
| |
| Lisaks tuleb kasutada 3-el dimensioonil attribuute, mis one enamat, kui lihtsalt ID.
| |
|
| |
| === XML ===
| |
| <source lang="xml">
| |
| <?xml version="1.0" encoding="utf-8"?>
| |
| <tooted>
| |
| <alkoholid tootjariik="Eesti">
| |
| <alkohol tyyp="Viin">
| |
| <viin nimetus="Saaremaa Vodka">
| |
| <hind yhik="€">11.10</hind>
| |
| <kangus yhik="%">80</kangus>
| |
| </viin>
| |
| <viin nimetus="Viru Valge">
| |
| <hind yhik="€">11.35</hind>
| |
| <kangus yhik="%">80</kangus>
| |
| </viin>
| |
| </alkohol>
| |
| <alkohol tyyp="Õlu">
| |
| <olu nimetus="Saku Kuld">
| |
| <kangus yhik="%">5</kangus>
| |
| <hind yhik="€">1</hind>
| |
| </olu>
| |
| </alkohol>
| |
| </alkoholid>
| |
| <alkoholid tootjariik="Iirimaa">
| |
| <alkohol tyyp="Viski">
| |
| <viski nimetus="Grant's">
| |
| <kangus yhik="%">40</kangus>
| |
| <hind yhik="€">58.25</hind>
| |
| </viski>
| |
| </alkohol>
| |
| </alkoholid>
| |
| <alkoholid tootjariik="Taani">
| |
| <alkohol tyyp="Õlu">
| |
| <olu nimetus="Carlsberg">
| |
| <kangus yhik="%">5</kangus>
| |
| <hind yhik="€">1</hind>
| |
| </olu>
| |
| </alkohol>
| |
| <alkohol tyyp="Õlu">
| |
| <olu nimetus="Tuborg">
| |
| <kangus yhik="%">5</kangus>
| |
| <hind yhik="€">1</hind>
| |
| </olu>
| |
| </alkohol>
| |
| </alkoholid>
| |
| </tooted>
| |
| </source>
| |
|
| |
| === XML schema (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="tooted">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element maxOccurs="unbounded" name="alkoholid">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element maxOccurs="unbounded" name="alkohol">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element minOccurs="0" name="viski">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="kangus">
| |
| <xs:complexType>
| |
| <xs:simpleContent>
| |
| <xs:extension base="xs:unsignedByte">
| |
| <xs:attribute name="yhik" type="xs:string" use="required" />
| |
| </xs:extension>
| |
| </xs:simpleContent>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="hind">
| |
| <xs:complexType>
| |
| <xs:simpleContent>
| |
| <xs:extension base="xs:decimal">
| |
| <xs:attribute name="yhik" type="xs:string" use="required" />
| |
| </xs:extension>
| |
| </xs:simpleContent>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| <xs:attribute name="nimetus" type="xs:string" use="required" />
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element minOccurs="0" name="olu">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="kangus">
| |
| <xs:complexType>
| |
| <xs:simpleContent>
| |
| <xs:extension base="xs:unsignedByte">
| |
| <xs:attribute name="yhik" type="xs:string" use="required" />
| |
| </xs:extension>
| |
| </xs:simpleContent>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="hind">
| |
| <xs:complexType>
| |
| <xs:simpleContent>
| |
| <xs:extension base="xs:unsignedByte">
| |
| <xs:attribute name="yhik" type="xs:string" use="required" />
| |
| </xs:extension>
| |
| </xs:simpleContent>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| <xs:attribute name="nimetus" type="xs:string" use="required" />
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element minOccurs="0" maxOccurs="unbounded" name="viin">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="hind">
| |
| <xs:complexType>
| |
| <xs:simpleContent>
| |
| <xs:extension base="xs:decimal">
| |
| <xs:attribute name="yhik" type="xs:string" use="required" />
| |
| </xs:extension>
| |
| </xs:simpleContent>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="kangus">
| |
| <xs:complexType>
| |
| <xs:simpleContent>
| |
| <xs:extension base="xs:unsignedByte">
| |
| <xs:attribute name="yhik" type="xs:string" use="required" />
| |
| </xs:extension>
| |
| </xs:simpleContent>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| <xs:attribute name="nimetus" type="xs:string" use="required" />
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| <xs:attribute name="tyyp" type="xs:string" use="required" />
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| <xs:attribute name="tootjariik" type="xs:string" use="required" />
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:schema>
| |
| </source>
| |
|
| |
| === XSLT ===
| |