Lebokeiss OÜ: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 161: | Line 161: | ||
===XSD=== | ===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:simpleType name="ValidateEmail"> | |||
<xs:restriction base="xs:string"> | |||
<xs:pattern value="[A-Za-z0-9_]+([-+.'][A-Za-z0-9_]+)*@[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*\.[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*" /> | |||
<xs:minLength value="6"/> | |||
<xs:maxLength value="64"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
<xs:simpleType name="CountryCodeRestr"> | |||
<xs:restriction base="xs:string"> | |||
<xs:minLength value="2"/> | |||
<xs:maxLength value="3"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
<xs:element name="Shop"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="Users"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="User"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="Username"> | |||
<xs:simpleType> | |||
<xs:restriction base="xs:string"> | |||
<xs:minLength value="5"/> | |||
<xs:maxLength value="32"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
</xs:element> | |||
<xs:element name="Email" type="ValidateEmail" /> | |||
<xs:element name="Description" > | |||
<xs:simpleType> | |||
<xs:restriction base="xs:string"> | |||
<xs:maxLength value="10000"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
</xs:element> | |||
<xs:element name="Pictures"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="Picture"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="Description"> | |||
<xs:simpleType> | |||
<xs:restriction base="xs:string"> | |||
<xs:maxLength value="5000"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
</xs:element> | |||
<xs:element name="Tags"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="50" name="Tag"> | |||
<xs:complexType> | |||
<xs:simpleContent> | |||
<xs:extension base="xs:string"> | |||
<xs:attribute name="sortOrder" type="xs:unsignedByte" use="required" /> | |||
<xs:attribute name="visibleToAll" type="xs:boolean" use="required" /> | |||
</xs:extension> | |||
</xs:simpleContent> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
<xs:attribute name="id" type="xs:unsignedLong" use="required" /> | |||
<xs:attribute name="visible" type="xs:boolean" use="required" /> | |||
<xs:attribute name="favorite" type="xs:boolean" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
<xs:element name="Tags"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="50" name="Tag" > | |||
<xs:complexType> | |||
<xs:simpleContent> | |||
<xs:extension base="xs:string"> | |||
<xs:attribute name="sortOrder" type="xs:unsignedByte" use="required"/> | |||
</xs:extension> | |||
</xs:simpleContent> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
<xs:attribute name="id" type="xs:unsignedLong" use="required" /> | |||
<xs:attribute name="registerDate" type="xs:dateTime" use="required" /> | |||
<xs:attribute name="disabled" type="xs:boolean" use="required" /> | |||
<xs:attribute name="birthDate" type="xs:dateTime" use="required" /> | |||
<xs:attribute name="countryCode" type="CountryCodeRestr" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
<xs:element name="Pictures"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="Picture"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="Name"> | |||
<xs:simpleType> | |||
<xs:restriction base="xs:string"> | |||
<xs:minLength value="1"/> | |||
<xs:maxLength value="512"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
</xs:element> | |||
<xs:element name="LocationUrl"> | |||
<xs:simpleType> | |||
<xs:restriction base="xs:string"> | |||
<xs:minLength value="1"/> | |||
<xs:maxLength value="5000"/> | |||
</xs:restriction> | |||
</xs:simpleType> | |||
</xs:element> | |||
</xs:sequence> | |||
<xs:attribute name="id" type="xs:unsignedLong" use="required" /> | |||
<xs:attribute name="dateCompleted" type="xs:dateTime" use="required" /> | |||
<xs:attribute name="makerId" type="xs:unsignedLong" use="required" /> | |||
<xs:attribute name="buyerId" type="xs:unsignedLong" use="optional" default="0" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:schema> | |||
</source> | |||
===XSLT=== | ===XSLT=== | ||
<pre> | <pre> |
Revision as of 19:56, 19 March 2016
Kodutöö aines "Võrgurakendused II: hajussüsteemide ehitamine"
Meeskond
- Joonas Jõeleht - Projektijuht
- Karell Veskimeister
- Kerli Edasi
- Iris Tambaum
- Timo Lanno
Idee
Kasutatav .NET tehnoloogia
Analüüs
Rakenduse sisu
Rakenduses on olemas järgmised võimalused (Must have):
Rakenduses võiksid olla lisavõimalused (Should have):
XML/XSD/XSLT
XML
<?xml version="1.0" standalone="yes"?>
<Shop>
<Users>
<User id="9999999" registerDate="2005-01-01T08:05:07" disabled="false" birthDate="1950-03-09T16:05:07.123" countryCode="EE">
<Username><![CDATA[Praam]]></Username>
<Email><![CDATA[praam22@praam.ee]]></Email>
<Description><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]></Description>
<Pictures>
<Picture id="7" visible="true" favorite="false">
<Description><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]></Description>
<Tags>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Landscape]]></Tag>
<Tag sortOrder="3" visibleToAll="true"><![CDATA[#lit]]></Tag>
<Tag sortOrder="2" visibleToAll="true"><![CDATA[Perfectionist]]></Tag>
</Tags>
</Picture>
<Picture id="777" visible="true" favorite="false">
<Description><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]]></Description>
<Tags>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Butterflies]]></Tag>
</Tags>
</Picture>
<Picture id="888" visible="true" favorite="false">
<Description><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]]></Description>
<Tags>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Funny]]></Tag>
<Tag sortOrder="2" visibleToAll="true"><![CDATA[Hilarious]]></Tag>
</Tags>
</Picture>
</Pictures>
<Tags>
<Tag sortOrder="2"><![CDATA[Anime]]></Tag>
<Tag sortOrder="1"><![CDATA[Realistic]]></Tag>
</Tags>
</User>
<User id="001" registerDate="2002-02-09T09:21:11" disabled="false" birthDate="2002-02-09T09:21:11.321" countryCode="EE">
<Username><![CDATA[Karell]]></Username>
<Email><![CDATA[vutlar@ee.ee]]></Email>
<Description><![CDATA[Karells desc]]></Description>
<Pictures>
<Picture id="880" visible="true" favorite="false">
<Description><![CDATA[This is my 4th attempt at creating anime zoomout by using photo of geographical a location]]></Description>
<Tags>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Anime]]></Tag>
<Tag sortOrder="2" visibleToAll="true"> <![CDATA[Nature]]></Tag>
<Tag sortOrder="4" visibleToAll="true"><![CDATA[Geography]]></Tag>
<Tag sortOrder="3" visibleToAll="true"><![CDATA[Photography]]></Tag>
<Tag sortOrder="5" visibleToAll="true"><![CDATA[Tracing]]></Tag>
</Tags>
</Picture>
<Picture id="280" visible="true" favorite="false">
<Description><![CDATA[Guide photo how i trace photos]]></Description>
<Tags>
<Tag sortOrder="2" visibleToAll="true"><![CDATA[Photography]]></Tag>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Tracing]]></Tag>
</Tags>
</Picture>
</Pictures>
<Tags>
<Tag sortOrder="1"><![CDATA[Anime]]></Tag>
<Tag sortOrder="2"><![CDATA[Tracing]]></Tag>
</Tags>
</User>
<User id="3" registerDate="2016-03-09T16:05:07" disabled="false" birthDate="1996-03-09T16:05:07.123" countryCode="EE">
<Username><![CDATA[ParanoidZebra]]></Username>
<Email><![CDATA[ParanoidZebra@zebra.zoo]]></Email>
<Description><![CDATA[Hello world]]></Description>
<Pictures>
<Picture id="31" visible="true" favorite="true">
<Description><![CDATA[]]></Description>
<Tags>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Anime]]></Tag>
<Tag sortOrder="2" visibleToAll="true"><![CDATA[Zebra]]></Tag>
<Tag sortOrder="3" visibleToAll="true"><![CDATA[Sun]]></Tag>
</Tags>
</Picture>
<Picture id="32" visible="true" favorite="true">
<Description><![CDATA[]]></Description>
<Tags>
<Tag sortOrder="31" visibleToAll="true"><![CDATA[Anime]]></Tag>
<Tag sortOrder="3" visibleToAll="true"><![CDATA[Zebra]]></Tag>
</Tags>
</Picture>
<Picture id="33" visible="true" favorite="true">
<Description><![CDATA[]]></Description>
<Tags>
<Tag sortOrder="1" visibleToAll="true"><![CDATA[Anime]]></Tag>
<Tag sortOrder="2" visibleToAll="true"><![CDATA[Zebra]]></Tag>
<Tag sortOrder="3" visibleToAll="true"><![CDATA[Privatetag]]></Tag>
</Tags>
</Picture>
</Pictures>
<Tags>
<Tag sortOrder="2"></Tag>
</Tags>
</User>
</Users>
<Pictures>
<Picture id="31" dateCompleted="2008-03-09T16:05:07" makerId="3" buyerId="9999999">
<Name><![CDATA[Drunk zebra and sunset]]></Name>
<LocationUrl><![CDATA[https://upload.wikimedia.org/wikipedia/commons/8/83/Zebra_Botswana_edit02.jpg]]></LocationUrl>
</Picture>
<Picture id="32" dateCompleted="2008-03-09T16:05:07.123" makerId="3" buyerId="0">
<Name><![CDATA[Not so drunk zebra and sunset]]></Name>
<LocationUrl><![CDATA[https://upload.wikimedia.org/wikipedia/commons/8/83/Zebra_Botswana_edit02.jpg]]></LocationUrl>
</Picture>
<Picture id="33" dateCompleted="2008-03-09T16:05:07.123" makerId="3" buyerId="0">
<Name><![CDATA[No Zebra and sunse]]></Name>
<LocationUrl><![CDATA[https://upload.wikimedia.org/wikipedia/commons/8/83/Zebra_Botswana_edit02.jpg]]></LocationUrl>
</Picture>
<Picture id="7" dateCompleted="2008-03-09T16:05:07.123" makerId="9999999" buyerId="0">
<Name><![CDATA[Landscape]]></Name>
<LocationUrl><![CDATA[http://i.imgur.com/IL5qx77r.jpg]]></LocationUrl>
</Picture>
<Picture id="777" dateCompleted="2012-03-09T12:33:07.678" makerId="9999999" buyerId="0">
<Name><![CDATA[Purple Butterfly]]></Name>
<LocationUrl><![CDATA[http://i.imgur.com/tJvg7Qd.jpg]]></LocationUrl>
</Picture>
<Picture id="888" dateCompleted="2016-03-09T11:11:11.555" makerId="9999999" buyerId="0">
<Name><![CDATA[Owl how-to]]></Name>
<LocationUrl><![CDATA[http://i.imgur.com/kArLDrg.jpg]]></LocationUrl>
</Picture>
<Picture id="880" dateCompleted="2016-02-09T09:21:11.321" makerId="999992" buyerId="0">
<Name><![CDATA[Anime scenery]]></Name>
<LocationUrl><![CDATA[https://s-media-cache-ak0.pinimg.com/736x/c8/f8/a5/c8f8a53e2831a5917fbedaac2f08e265.jpg]]></LocationUrl>
</Picture>
<Picture id="280" dateCompleted="2016-01-02T19:21:11.321" makerId="299992" buyerId="0">
<Name><![CDATA[Trace how-to]]></Name>
<LocationUrl><![CDATA[https://s-media-cache-ak0.pinimg.com/736x/c8/f8/a5/c8f8a53e2831a5917fbedaac2f08e265.jpg]]></LocationUrl>
</Picture>
</Pictures>
</Shop>
XSD
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="ValidateEmail">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z0-9_]+([-+.'][A-Za-z0-9_]+)*@[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*\.[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*" />
<xs:minLength value="6"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CountryCodeRestr">
<xs:restriction base="xs:string">
<xs:minLength value="2"/>
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="Shop">
<xs:complexType>
<xs:sequence>
<xs:element name="Users">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="User">
<xs:complexType>
<xs:sequence>
<xs:element name="Username">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="5"/>
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Email" type="ValidateEmail" />
<xs:element name="Description" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Pictures">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Picture">
<xs:complexType>
<xs:sequence>
<xs:element name="Description">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="5000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Tags">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="50" name="Tag">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="sortOrder" type="xs:unsignedByte" use="required" />
<xs:attribute name="visibleToAll" type="xs:boolean" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedLong" use="required" />
<xs:attribute name="visible" type="xs:boolean" use="required" />
<xs:attribute name="favorite" type="xs:boolean" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Tags">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="50" name="Tag" >
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="sortOrder" type="xs:unsignedByte" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedLong" use="required" />
<xs:attribute name="registerDate" type="xs:dateTime" use="required" />
<xs:attribute name="disabled" type="xs:boolean" use="required" />
<xs:attribute name="birthDate" type="xs:dateTime" use="required" />
<xs:attribute name="countryCode" type="CountryCodeRestr" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Pictures">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Picture">
<xs:complexType>
<xs:sequence>
<xs:element name="Name">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="512"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="LocationUrl">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="5000"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:unsignedLong" use="required" />
<xs:attribute name="dateCompleted" type="xs:dateTime" use="required" />
<xs:attribute name="makerId" type="xs:unsignedLong" use="required" />
<xs:attribute name="buyerId" type="xs:unsignedLong" use="optional" default="0" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSLT
Logi
07.03.16