JRT: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 16: | Line 16: | ||
===XML=== | ===XML=== | ||
<pre> | <pre> | ||
<?xml version="1.0" encoding="utf-8" ?> | |||
<?xml version="1.0" encoding="utf-8" ?> | <?xml version="1.0" encoding="utf-8" ?> | ||
<users> | <users> | ||
<subscriptions> | <subscriptions> | ||
< | <subscription><![CDATA[Balance]]> | ||
<prices> | <prices> | ||
<price type="silver" currency="EUR">44.99</price> | <price type="silver" currency="EUR">44.99</price> | ||
Line 25: | Line 26: | ||
<price type="standard" currency="EUR">50.99</price> | <price type="standard" currency="EUR">50.99</price> | ||
</prices> | </prices> | ||
</ | </subscription> | ||
< | <subscription><![CDATA[Gym]]> | ||
<prices> | <prices> | ||
<price type="gold" currency="EUR">69.99</price> | <price type="gold" currency="EUR">69.99</price> | ||
Line 32: | Line 33: | ||
<price type="standard" currency="EUR">89.99</price> | <price type="standard" currency="EUR">89.99</price> | ||
</prices> | </prices> | ||
</ | </subscription> | ||
< | <subscription><![CDATA[BodyPump]]> | ||
<prices> | <prices> | ||
<price type="gold" currency="EUR">44.99</price> | <price type="gold" currency="EUR">44.99</price> | ||
Line 39: | Line 40: | ||
<price type="standard" currency="EUR">55.99</price> | <price type="standard" currency="EUR">55.99</price> | ||
</prices> | </prices> | ||
</ | </subscription> | ||
< | <subscription><![CDATA[Yoga]]> | ||
<prices> | <prices> | ||
<price type="gold" currency="EUR">39.99</price> | <price type="gold" currency="EUR">39.99</price> | ||
Line 46: | Line 47: | ||
<price type="standard" currency="EUR">45.99</price> | <price type="standard" currency="EUR">45.99</price> | ||
</prices> | </prices> | ||
</ | </subscription> | ||
< | <subscription> | ||
<![CDATA[HotYoga]]> | <![CDATA[HotYoga]]> | ||
<prices> | <prices> | ||
Line 54: | Line 55: | ||
<price type="standard" currency="EUR">55.99</price> | <price type="standard" currency="EUR">55.99</price> | ||
</prices> | </prices> | ||
</ | </subscription> | ||
</subscriptions> | </subscriptions> | ||
<user id="1" status="gold"> | <user id="1" status="gold"> | ||
Line 146: | Line 147: | ||
</contacts> | </contacts> | ||
</user> | </user> | ||
</users> | </users> | ||
</pre> | </pre> | ||
===XML schema (XSD)=== | ===XML schema (XSD)=== | ||
<pre> | <pre> |
Revision as of 16:07, 19 March 2017
Meeskond
Riho Uusjärv
Jevgeni Gavrilov
Tiit Kuuskmäe
Blog
03.19.2017 - Meeskonna loomine, teema välja mõtlemine, XML, XSD koostamine
Tööd
XML (pole veel valmis)
Teema
Spordisaalis on erinevad trennid, milles käivad erinevad isikud. XSLT jaoks siis teeme erinevad valitud filtreeringud
XML
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?> <users> <subscriptions> <subscription><![CDATA[Balance]]> <prices> <price type="silver" currency="EUR">44.99</price> <price type="gold" currency="EUR">39.99</price> <price type="standard" currency="EUR">50.99</price> </prices> </subscription> <subscription><![CDATA[Gym]]> <prices> <price type="gold" currency="EUR">69.99</price> <price type="silver" currency="EUR">79.99</price> <price type="standard" currency="EUR">89.99</price> </prices> </subscription> <subscription><![CDATA[BodyPump]]> <prices> <price type="gold" currency="EUR">44.99</price> <price type="silver" currency="EUR">49.99</price> <price type="standard" currency="EUR">55.99</price> </prices> </subscription> <subscription><![CDATA[Yoga]]> <prices> <price type="gold" currency="EUR">39.99</price> <price type="silver" currency="EUR">42.99</price> <price type="standard" currency="EUR">45.99</price> </prices> </subscription> <subscription> <![CDATA[HotYoga]]> <prices> <price type="gold" currency="EUR">49.99</price> <price type="silver" currency="EUR">52.99</price> <price type="standard" currency="EUR">55.99</price> </prices> </subscription> </subscriptions> <user id="1" status="gold"> <firstName><![CDATA[Peeter]]></firstName> <lastName><![CDATA[Banaan]]></lastName> <born><![CDATA[11.12.2000]]></born> <sex><![CDATA[M]]></sex> <subscriptions> <subscription expires="2017-05-11"><![CDATA[Balance]]></subscription> <subscription expires="2017-08-26"><![CDATA[Gym]]></subscription> <subscription expires="2017-09-01"><![CDATA[Yoga]]></subscription> </subscriptions> <contacts> <contact type="phone"><![CDATA[55665566]]></contact> <contact type="email"><![CDATA[peeter@gmail.ee]]></contact> <contact type="skype"><![CDATA[PeeterB]]></contact> </contacts> </user> <user id="2" status="silver"> <firstName><![CDATA[Merlin]]></firstName> <lastName><![CDATA[Kuusk]]></lastName> <born><![CDATA[11.07.1997]]></born> <sex><![CDATA[W]]></sex> <subscriptions> <subscription expires="2017-05-13"><![CDATA[BodyPump]]></subscription> <subscription expires="2017-09-11"><![CDATA[Balance]]></subscription> </subscriptions> <contacts> <contact type="phone"><![CDATA[5123123]]></contact> </contacts> </user> <user id="3" status="gold"> <firstName><![CDATA[Maarika]]></firstName> <lastName><![CDATA[Tamm]]></lastName> <born><![CDATA[05.07.1999]]></born> <sex><![CDATA[W]]></sex> <subscriptions> <subscription expires="2017-08-11"><![CDATA[Yoga]]></subscription> <subscription expires="2017-11-23"><![CDATA[HotYoga]]></subscription> </subscriptions> <contacts> <contact type="email"><![CDATA[maarika@gmail.com]]></contact> </contacts> </user> <user id="4" status="gold"> <firstName><![CDATA[Peeter]]></firstName> <lastName><![CDATA[Tamm]]></lastName> <born><![CDATA[22.03.2000]]></born> <sex><![CDATA[M]]></sex> <subscriptions> <subscription expires="2017-05-13"><![CDATA[BodyPump]]></subscription> <subscription expires="2017-05-13"><![CDATA[Gym]]></subscription> </subscriptions> <contacts> <contact type="phone"><![CDATA[55588899]]></contact> <contact type="email"><![CDATA[PeeterT@gmail.com]]></contact> </contacts> </user> <user id="5" status="silver"> <firstName><![CDATA[Mihkel]]></firstName> <lastName><![CDATA[Koopov]]></lastName> <born><![CDATA[15.06.1994]]></born> <sex><![CDATA[M]]></sex> <contacts> <contact type="phone"><![CDATA[55588877]]></contact> <contact type="skype"><![CDATA[MKoopov]]></contact> </contacts> </user> <user id="6" status="standard"> <firstName><![CDATA[Georg]]></firstName> <lastName><![CDATA[Karu]]></lastName> <born><![CDATA[03.03.1994]]></born> <sex><![CDATA[M]]></sex> <subscriptions> <subscription expires="2017-12-17"><![CDATA[Balance]]></subscription> <subscription expires="2017-09-01"><![CDATA[Gym]]></subscription> </subscriptions> </user> <user id="7" status="standard"> <firstName><![CDATA[Liisa]]></firstName> <lastName><![CDATA[Leppmaa]]></lastName> <born><![CDATA[15.06.1991]]></born> <sex><![CDATA[W]]></sex> <subscriptions> <subscription expires="2017-09-11"><![CDATA[BodyPump]]></subscription> <subscription expires="2017-07-10"><![CDATA[HotYoga]]></subscription> </subscriptions> <contacts> <contact type="phone"><![CDATA[55512377]]></contact> <contact type="skype"><![CDATA[LLee]]></contact> </contacts> </user> </users>
XML schema (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="users"> <xs:complexType> <xs:sequence> <xs:element name="subscriptions"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="subscription"> <xs:complexType mixed="true"> <xs:sequence> <xs:element name="prices"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="price"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:decimal"> <xs:attribute name="type" type="xs:string" use="required" /> <xs:attribute name="currency" type="xs:string" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element maxOccurs="unbounded" name="user"> <xs:complexType> <xs:sequence> <xs:choice maxOccurs="unbounded"> <xs:element name="firstName" type="xs:string" /> <xs:element name="lastName" type="xs:string" /> <xs:element name="born" type="xs:string" /> <xs:element name="sex" type="xs:string" /> <xs:element name="subscriptions"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="subscription"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="expires" type="xs:date" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="contacts"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" name="contact"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="type" type="xs:string" use="required" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required" /> <xs:attribute name="status" type="xs:string" use="required" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>