Meeskond:InsertNameHere: Difference between revisions

From ICO wiki
Jump to navigationJump to search
(Created page with "===Meeskond=== *Villu Viirsalu ===XML=== <pre> <?xml version="1.0" encoding="utf-8" ?> <contacts> <contact> <name title="Ms"> <first><![CDATA[fName]]></f…")
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Meeskond===
==Meeskond==
*Villu Viirsalu
*Villu Viirsalu
==XML==
[http://enos.itcollege.ee/~vviirsal/VR2/Contacts.xml väljund]
===XML===
===XML===
<pre>
<source lang="xml" collapse="true" first-line="2">


<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="Contacts.xslt"?>
<contacts>
<contacts>
    <contact>
        <name title="Ms">
            <first><![CDATA[fName]]></first>
            <middle><![CDATA[mName]]></middle>
            <last><![CDATA[lName]]></last>
        </name>
        <contactType>
            <conType type="typeX">
                <typeX></typeX>
            </conType>
            <conType type="phone">
                <phone area="+372"><![CDATA[54321557]]></phone>
            </conType>
            <conType type="email">
                <email><![CDATA[email1@email.email]]></email>
                <email><![CDATA[email2@email.email]]></email>
            </conType>
            <conType type="homepage">
                <page><![CDATA[http://www.somePage.com/someName]]></page>
            </conType>
        </contactType>
        <birthday>2026-08-02</birthday>
        <notes />
        <groups>
            <group type="friend" />
            <group type="family" />
        </groups>
    </contact>


    <contact>
<contact>
        <name>
<name title="Ms"><![CDATA[Jebediah Kerman]]></name>
            <first><![CDATA[fName2]]></first>
<contactInfo>
            <last><![CDATA[lName2]]></last>
<infoType type="phone">
        </name>
<data type="mobile"><![CDATA[54321557]]></data>
        <contactType>
</infoType>
            <conType type="phone">
<infoType type="address">
                <phone area="+3815"><![CDATA[55123548789546]]></phone>
<data type="work"><![CDATA[Address 87-2]]></data>
            </conType>
<data type="home"><![CDATA[Highlander 5-987-5.23, Mun]]></data>
            <conType type="email">
</infoType>
                <email><![CDATA[email4@email.email]]></email>
<infoType type="email">
            </conType>
<data type="work"><![CDATA[Jeb@kmail.kom]]></data>
        </contactType>
<data type="home"><![CDATA[jebDud678@kmail.kom]]></data>
        <birthday>2028-05-01</birthday>
</infoType>
        <notes><![CDATA[these are some notes on person x]]></notes>
</contactInfo>
        <groups>
<notes />
            <group type="friend" />
<groups>
        </groups>
<group group="friend" />
    </contact>
<group group="family" />
</groups>
</contact>


    <contact>
<contact>
        <name>
<name><![CDATA[Bill Kerman]]></name>
            <first></first>
<contactInfo>
        </name>
<infoType type="email">
        <contactType>
<data><![CDATA[billyboy68@kmail.internet]]></data>
        </contactType>
</infoType>
    </contact>
</contactInfo>
<birthday>2000-12-12</birthday>
<notes><![CDATA[these are some notes]]></notes>
<groups>
<group group="work"/>
</groups>
</contact>
<contact>
<name><![CDATA[Bob Kerman]]></name>
<contactInfo>
<infoType type="address">
<data><![CDATA[KSS]]></data>
</infoType>
<infoType type="phone">
<data><![CDATA[0118 999 881 999 119 7253]]></data>
</infoType>
</contactInfo>
<notes/>
<groups/>
</contact>
</contacts>
</contacts>


</pre>
</source>


===XSD===
===XSD===
<pre>


<source lang="xml" collapse="true" first-line="2">
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="contacts">
    <xs:element name="contacts">
    <xs:complexType>
         <xs:complexType>
      <xs:sequence>
         <xs:element maxOccurs="unbounded" name="contact">
          <xs:complexType>
             <xs:sequence>
             <xs:sequence>
              <xs:element name="name">
                 <xs:element maxOccurs="unbounded" name="contact">
                 <xs:complexType>
                    <xs:complexType>
                  <xs:sequence>
                    <xs:element name="first" type="xs:string" />
                    <xs:element minOccurs="0" name="middle" type="xs:string" />
                    <xs:element minOccurs="0" name="last" type="xs:string" />
                  </xs:sequence>
                  <xs:attribute name="title" type="xs:string" use="optional" />
                </xs:complexType>
              </xs:element>
              <xs:element name="contactType">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element minOccurs="0" maxOccurs="unbounded" name="conType">
                      <xs:complexType>
                         <xs:sequence>
                         <xs:sequence>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="page" type="xs:string" />
                            <xs:element name="name">
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="email" type="xs:string" />
                                <xs:complexType>
                          <xs:element minOccurs="0" maxOccurs="unbounded" name="phone">
                                    <xs:simpleContent>
                            <xs:complexType>
                                        <xs:extension base="xs:string">
                              <xs:simpleContent>
                                            <xs:attribute name="title" type="xs:string" use="optional" />
                                <xs:extension base="xs:string">
                                        </xs:extension>
                                  <xs:attribute name="area" type="xs:short" use="optional" />
                                    </xs:simpleContent>
                                </xs:extension>
                                </xs:complexType>
                              </xs:simpleContent>
                            </xs:element>
                            </xs:complexType>
                            <xs:element name="contactInfo">
                          </xs:element>
                                <xs:complexType>
                          <xs:element minOccurs="0" name="typeX" />
                                    <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="infoType">
                                            <xs:complexType>
                                                <xs:sequence>
                                                    <xs:element maxOccurs="unbounded" name="data">
                                                        <xs:complexType>
                                                            <xs:simpleContent>
                                                                <xs:extension base="xs:string">
                                                                    <xs:attribute name="type" type="xs:string" use="optional" />
                                                                </xs:extension>
                                                            </xs:simpleContent>
                                                        </xs:complexType>
                                                    </xs:element>
                                                </xs:sequence>
                                                <xs:attribute name="type" type="xs:string" use="required" />
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                            <xs:element minOccurs="0" name="birthday" type="xs:date"/>
                            <xs:element name="notes" />
                            <xs:element name="groups">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="group">
                                            <xs:complexType>
                                                <xs:attribute name="group" type="xs:string" use="required" />
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                         </xs:sequence>
                         </xs:sequence>
                        <xs:attribute name="type" type="xs:string" use="optional" />
                     </xs:complexType>
                      </xs:complexType>
                 </xs:element>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element minOccurs="0" name="birthday" type="xs:date" />
              <xs:element minOccurs="0" name="notes" type="xs:string" />
              <xs:element minOccurs="0" name="groups">
                <xs:complexType>
                  <xs:sequence>
                     <xs:element maxOccurs="unbounded" name="group">
                      <xs:complexType>
                        <xs:attribute name="type" type="xs:string" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                 </xs:complexType>
              </xs:element>
             </xs:sequence>
             </xs:sequence>
          </xs:complexType>
        </xs:complexType>
        </xs:element>
     </xs:element>
      </xs:sequence>
     </xs:complexType>
  </xs:element>
</xs:schema>
</xs:schema>


</pre>
</source>
 
===XSLT===
<source lang="xml" collapse="true" first-line="2">
<?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>
            <title>Contacts</title>
            <body>
                <h2>Contacts</h2>
                <table border="1">
 
                    <!--header-->
                    <tr>
                        <th>Name</th>
                        <th>Birthday</th>
                        <th>Phone</th>
                        <th>Email</th>
                        <th>Address</th>
                        <th>Notes</th>
                        <th>Groups</th>
                    </tr>
 
                    <!--else row-->
                    <!--for each contact in contacts-->
                    <xsl:for-each select="contacts/contact">
 
                        <!--row-->
                        <tr>
 
                            <!--name-->
                            <td>
                                <xsl:value-of select="name"/>
                            </td>
 
                            <!--birthday-->
                            <td>
                                <xsl:value-of select="birthday"/>
                            </td>
 
                            <!--phones-->
                            <td>
                                <ul>
                                    <xsl:for-each select="contactInfo/infoType[@type='phone']/data">
                                        <li>
                                            <xsl:value-of select="."/>
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>
 
                            <!--emails-->
                            <td>
                                <ul>
                                    <xsl:for-each select="contactInfo/infoType[@type='email']/data">
                                        <li>
                                            <xsl:value-of select="." />
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>
 
                            <!--addresses-->
                            <td>
                                <ul>
                                    <xsl:for-each select="contactInfo/infoType[@type='address']/data">
                                        <li>
                                            <xsl:value-of select="." />
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>
 
                            <!--notes-->
                            <td>
                                <xsl:value-of select="notes"/>
                            </td>
 
                            <!--groups-->
                            <td>
                                <ul>
                                    <xsl:for-each select="groups/group">
                                        <li>
                                            <xsl:value-of select="@group" />
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>
                        </tr>
                    </xsl:for-each>
                    <!--end of contact in contacts-->
 
                </table>
            </body>
        </html>
 
    </xsl:template>
</xsl:stylesheet>
</source>
==Veebiteenus==
===Analüüs===
Tegemist on telefoniraamatu teenusega. Kasutaja saab lisada kontakte, neid muuta ning otsida. On olemas tavakasutaja kes pääseb ligi vaid enda kontaktiraamatule ning administraator kes saab jälgida lehekülje statistikat, luua piiranguid (nt gruppide hulgale) ning vajadusel kustutada kasutajaid.
 
====Must have====
*kasutaja
**registeerimine
**sisse logimine
**andmed
*kasutajastatistika
*kontaktid
**lisamine
**otsimine
**grupid
**andmed
***liigid
**notes
 
====Nice to have====
*kasutaja
**profiil
***pilt
*kontakt
**pildi kuvamine
**varia kuvamine
*friendShare™ - jaga enda kontakte teiste inimestega
 
====ERD====
[[File:Graafik.png]]
 
==Klientrakendused==

Latest revision as of 13:47, 7 April 2015

Meeskond

  • Villu Viirsalu

XML

väljund

XML

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="Contacts.xslt"?>
<contacts>

	<contact>
		<name title="Ms"><![CDATA[Jebediah Kerman]]></name>
		<contactInfo>
			<infoType type="phone">
				<data type="mobile"><![CDATA[54321557]]></data>
			</infoType>
			<infoType type="address">
				<data type="work"><![CDATA[Address 87-2]]></data>
				<data type="home"><![CDATA[Highlander 5-987-5.23, Mun]]></data>
			</infoType>
			<infoType type="email">
				<data type="work"><![CDATA[Jeb@kmail.kom]]></data>
				<data type="home"><![CDATA[jebDud678@kmail.kom]]></data>
			</infoType>
		</contactInfo>
		<notes />
		<groups>
			<group group="friend" />
			<group group="family" />
		</groups>
	</contact>

	<contact>
		<name><![CDATA[Bill Kerman]]></name>
		<contactInfo>
			<infoType type="email">
				<data><![CDATA[billyboy68@kmail.internet]]></data>
			</infoType>
		</contactInfo>
		<birthday>2000-12-12</birthday>
		<notes><![CDATA[these are some notes]]></notes>
		<groups>
			<group group="work"/>
		</groups>
	</contact>
	<contact>
		<name><![CDATA[Bob Kerman]]></name>
		<contactInfo>
			<infoType type="address">
				<data><![CDATA[KSS]]></data>
			</infoType>
			<infoType type="phone">
				<data><![CDATA[0118 999 881 999 119 7253]]></data>
			</infoType>
		</contactInfo>
		<notes/>
		<groups/>
	</contact>
</contacts>

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="contacts">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" name="contact">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="name">
                                <xs:complexType>
                                    <xs:simpleContent>
                                        <xs:extension base="xs:string">
                                            <xs:attribute name="title" type="xs:string" use="optional" />
                                        </xs:extension>
                                    </xs:simpleContent>
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="contactInfo">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="infoType">
                                            <xs:complexType>
                                                <xs:sequence>
                                                    <xs:element maxOccurs="unbounded" name="data">
                                                        <xs:complexType>
                                                            <xs:simpleContent>
                                                                <xs:extension base="xs:string">
                                                                    <xs:attribute name="type" type="xs:string" use="optional" />
                                                                </xs:extension>
                                                            </xs:simpleContent>
                                                        </xs:complexType>
                                                    </xs:element>
                                                </xs:sequence>
                                                <xs:attribute name="type" type="xs:string" use="required" />
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                            <xs:element minOccurs="0" name="birthday" type="xs:date"/>
                            <xs:element name="notes" />
                            <xs:element name="groups">
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element minOccurs="0" maxOccurs="unbounded" name="group">
                                            <xs:complexType>
                                                <xs:attribute name="group" type="xs:string" use="required" />
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

XSLT

<?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>
            <title>Contacts</title>
            <body>
                <h2>Contacts</h2>
                <table border="1">

                    <!--header-->
                    <tr>
                        <th>Name</th>
                        <th>Birthday</th>
                        <th>Phone</th>
                        <th>Email</th>
                        <th>Address</th>
                        <th>Notes</th>
                        <th>Groups</th>
                    </tr>

                    <!--else row-->
                    <!--for each contact in contacts-->
                    <xsl:for-each select="contacts/contact">

                        <!--row-->
                        <tr>

                            <!--name-->
                            <td>
                                <xsl:value-of select="name"/>
                            </td>

                            <!--birthday-->
                            <td>
                                <xsl:value-of select="birthday"/>
                            </td>

                            <!--phones-->
                            <td>
                                <ul>
                                    <xsl:for-each select="contactInfo/infoType[@type='phone']/data">
                                        <li>
                                            <xsl:value-of select="."/>
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>

                            <!--emails-->
                            <td>
                                <ul>
                                    <xsl:for-each select="contactInfo/infoType[@type='email']/data">
                                        <li>
                                            <xsl:value-of select="." />
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>

                            <!--addresses-->
                            <td>
                                <ul>
                                    <xsl:for-each select="contactInfo/infoType[@type='address']/data">
                                        <li>
                                            <xsl:value-of select="." />
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>

                            <!--notes-->
                            <td>
                                <xsl:value-of select="notes"/>
                            </td>

                            <!--groups-->
                            <td>
                                <ul>
                                    <xsl:for-each select="groups/group">
                                        <li>
                                            <xsl:value-of select="@group" />
                                        </li>
                                    </xsl:for-each>
                                </ul>
                            </td>
                        </tr>
                    </xsl:for-each>
                    <!--end of contact in contacts-->

                </table>
            </body>
        </html>

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

Veebiteenus

Analüüs

Tegemist on telefoniraamatu teenusega. Kasutaja saab lisada kontakte, neid muuta ning otsida. On olemas tavakasutaja kes pääseb ligi vaid enda kontaktiraamatule ning administraator kes saab jälgida lehekülje statistikat, luua piiranguid (nt gruppide hulgale) ning vajadusel kustutada kasutajaid.

Must have

  • kasutaja
    • registeerimine
    • sisse logimine
    • andmed
  • kasutajastatistika
  • kontaktid
    • lisamine
    • otsimine
    • grupid
    • andmed
      • liigid
    • notes

Nice to have

  • kasutaja
    • profiil
      • pilt
  • kontakt
    • pildi kuvamine
    • varia kuvamine
  • friendShare™ - jaga enda kontakte teiste inimestega

ERD

Klientrakendused