Difference between revisions of "Meeskond: Redundant Rappers"

From ICO wiki
(Veebiteenuse analüüs)
(Nice to have features)
Line 65: Line 65:
 
*kasutajate all on ka kui on artist siis featured tab olemas (vaata youtube - user - channels)
 
*kasutajate all on ka kui on artist siis featured tab olemas (vaata youtube - user - channels)
  
 +
===ERD===
  
[[File:Example.jpg]]
+
[[File:Example.jpg|800px]]
  
 
== XML / XSD / XSLT==
 
== XML / XSD / XSLT==

Revision as of 13:37, 12 April 2017

Meeskond

  • Taavi Kliss
  • Kertu Nurmberg
  • Anneli Asser
  • Mart-Erki Nõumees

Idee

XML ideeks on muusika kataloog. Sellest on ka plaan edasi arendada veebiteenus ning klientrakendus.

Veebiteenuse analüüs

Kirjeldus

Veebiteenus “REDRAP” hoiab informatsiooni muusikute, nende loomingu kohta, kusjuures teenuse kasutajatel on võimalik üles laadida oma loomingut promomise eesmärgil ning siis saavad teised kasutajad seda loomingut alla laadida. Andmebaasis hoiame me olemasolevat, meie poolt lisatud muusikute ja nende loominguga seotud informatsiooni ent ka kasutajate loominguga seotut, kus kasutajad on andmebaasis eristatud teistest muusikutest.

Külastaja

Külastajad saavad end veebirakenduse kasutajateks registreerida. Samuti saavad nad vaadata olemasolevaid artiste. Minna artistide “kodulehele” ning seal näha artisti toimetusi(artisti üles laetud looming)

Kasutaja

Kasutajal on olemas oma koduleht, mida tal on võimalik muuta. Juhul kui kasutaja peaks soovima promoda enda loomingut, siis saab ta üles laadida muusikat. Kasutaja saab koostada playliste.

Admin

Admin on meie saidi omanik, kellel on õigus määrata moderaatoreid, kustutada kasutajaid. Tema haldab tervet saiti.

Moderaator

Moderaator saab bannida, keelata kasutajaid, muuta kasutajate kodulehtede sisu vastavalt vajadusele. Moderaatorite ülesandeks on ka kuulata üles laetud helifaile, kas tegemist on ikka muusika või on üles laetud tühja noise’i.

Must have features

Külastaja

  • Saab vaadata olemasolevaid artiste ja nende loomingut
  • Saab end registreerida kasutajaks

Kasutaja Ideed youtube`st

  • Saab sisselogida
  • Saab oma kasutajat kustutada
  • Saab vaadata olemasoleviad artiste ja nende loomingut
  • Saab koostada playliste
  • Saab anda hinnanduid loomingutele
  • Saab muuta oma andmeid(metadata?)
  • Saab jälgida oma lemmik artisti toiminguid(follow)
  • Saab üles laadida muusikafaile
  • Saab muuta enda “kodulehte” - üleslaetud lood, tema artistiinfo, tema following, bänner, ikoon


Admin

  • Saab kustutada kõiki kasutajaid
  • Saab sisselogida
  • Saab kustutada/peita kasutajate üles laetud muusikafaile (plagiaadi puhul näiteks)
  • Saab määrata moderaatoreid


Moderaator

  • Saab hallata kasutajaid
  • Saab sisselogida

Nice to have features

  • Kasutajad saavad lisada sõpru
  • Saab kuulata muusikat
  • kasutajate all on ka kui on artist siis featured tab olemas (vaata youtube - user - channels)

ERD

Example.jpg

XML / XSD / XSLT

XML

  • atribuut date parandatud retsensiooni järgi 24.03.2017
  • genre poolikult parandatud 24.03.2017
<?xml version="1.0" encoding="UTF-8"?>
<music>
  <artists>
    <artist id="1">
      <name><![CDATA[Everfall]]></name>
      <country>Estonia</country>
      <genre id="1" name="Metal"></genre>
      <labels>
        <label id="1">
          <name><![CDATA[Swimming With Sharks Records]]></name>
          <country>United States of America</country>
        </label>
      </labels>
      <members>6</members>
      <startyear>2013</startyear>
      <endyear />
      <description><![CDATA[Estonian core-band called Everfall. It is actually hard to define our genre.
      It is core-ish, but since it is fresh, djenty, bit progressive and very bipolar, we named our genre djent'n'roll.]]></description>
      <records>
        <eps>
          <ep id="1" date="2014-05-05" type="studio">
            <title><![CDATA[Everfall EP]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a4238728268_5.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="1:49" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Intro]]></title>
              </track>
              <track id="2" tracknumber="2" duration="3:33" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Celestial Revenge]]></title>
              </track>
              <track id="3" tracknumber="3" duration="3:01" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Above the World]]></title>
              </track>
              <track id="4" tracknumber="4" duration="3:23" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Where I Come From, Lambs Eat Wolves]]></title>
              </track>
              <track id="5" tracknumber="5" duration="3:43" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Tides]]></title>
              </track>
            </tracklist>
          </ep>
        </eps>
        <singles>
          <single id="1" date="2016-05-27" type="studio">
            <title><![CDATA[Six Feet Under]]></title>
            <coverURI><![CDATA[https://images.cdbaby.name/e/v/everfall.jpg]]></coverURI>
            <tracklist>
              <track id="6" duration="5:05" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Six Feet Under]]></title>
              </track>
            </tracklist>
          </single>
          <single id="2" date="2016-12-30" type="studio">
            <title><![CDATA[Vanquish]]></title>
            <coverURI><![CDATA[https://i.ytimg.com/vi/tn9QtNHL4R4/maxresdefault.jpg]]></coverURI>
            <tracklist>
              <track id="7" duration="3:05" fileformat="WAV" bitrate="128" channels="16">
                <title><![CDATA[Vanquish]]></title>
              </track>
            </tracklist>
          </single>
        </singles>
      </records>
    </artist>
    <artist id="2">
      <name><![CDATA[The Myrrors]]></name>
      <country>USA</country>
      <genre id="1" name="psychedelic rock"></genre>
      <genre id="2" name="alternative rock"></genre>
      <genre id="3" name="folk rock"></genre>
      <labels>
        <label id="1">
          <name><![CDATA[Beyond Beyond is Beyond Records]]></name>
          <country>USA</country>
        </label>
        <label id="2">
          <name><![CDATA[Strange Design Records]]></name>
          <country>USA</country>
        </label>
        <label id="3">
          <name><![CDATA[Fuzz Club Records]]></name>
          <country>USA</country>
        </label>
      </labels>
      <members>5</members>
      <startyear>2008</startyear>
      <endyear />
      <description><![CDATA[The Myrrors are an experimental psychedelic rock band from Arizona, formed in early 2007.
      Originally consisting of Nik Rayne on vocals and guitar, Claira Safi on bass, and Grant Beyschau on drums]]></description>
      <records>
        <albums>
          <album id="1" date="2008-08-01" type="studio">
            <title><![CDATA[Burning Circles in the Sky]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a3815315623_10.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="3:51" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[The Mind's Eye]]></title>
              </track>
              <track id="2" tracknumber="2" duration="3:07" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Plateau Skull]]></title>
              </track>
              <track id="3" tracknumber="3" duration="4:42" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Burning Circles In the Sky]]></title>
              </track>
              <track id="4" tracknumber="4" duration="7:26" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Warpainting]]></title>
              </track>
              <track id="5" tracknumber="5" duration="16:31" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Mother of All Living]]></title>
              </track>
            </tracklist>
          </album>
          <album id="2" date="2015-03-24" type="studio">
            <title><![CDATA[Arena Negra]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a1913997164_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="11:55" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Arena Negra]]></title>
              </track>
              <track id="2" tracknumber="2" duration="04:05" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Juanito Laguna Duerme]]></title>
              </track>
              <track id="3" tracknumber="3" duration="4:37" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Dome House Music]]></title>
              </track>
              <track id="4" tracknumber="4" duration="20:41" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[The Forward Path]]></title>
              </track>
            </tracklist>
          </album>
          <album id="3" date="2016-05-27" type="studio">
            <title><![CDATA[Entranced Earth]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a2953659820_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="1:41" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Mountain Mourning]]></title>
              </track>
              <track id="2" tracknumber="2" duration="4:44" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Liberty Is In The Streets]]></title>
              </track>
              <track id="3" tracknumber="3" duration="3:42" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[No Clear Light]]></title>
              </track>
              <track id="4" tracknumber="4" duration="8:51" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Entranced Earth (for Sigmund Kvaløy)]]></title>
              </track>
              <track id="5" tracknumber="5" duration="3:04" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Tallos]]></title>
              </track>
              <track id="6" tracknumber="6" duration="11:58" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Invitation Mantra]]></title>
              </track>
              <track id="7" tracknumber="7" duration="5:40" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Surem Dervish]]></title>
              </track>
            </tracklist>
          </album>
          <album id="4" date="2017-02-01" type="studio">
            <title><![CDATA[Ljudkamrater]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a1986610802_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="10:13" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[I E]]></title>
              </track>
              <track id="2" tracknumber="2" duration="4:07" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Yttre Hybriderna]]></title>
              </track>
              <track id="3" tracknumber="3" duration="4:53" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[CVega's Bodega]]></title>
              </track>
              <track id="4" tracknumber="4" duration="6:28" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Khalivera]]></title>
              </track>
              <track id="5" tracknumber="5" duration="13:25" fileformat="mp3" bitrate="320" channels="2">
                <title><![CDATA[Night Flower Codex]]></title>
              </track>
            </tracklist>
          </album>
        </albums>
        <eps>
          <ep id="1" date="2013-08-24" type="studio">
            <title><![CDATA[Solar Collector]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a1925968529_10.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="A1" duration="07:00" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Solar Collector]]></title>
              </track>
              <track id="2" tracknumber="A2" duration="7:55" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Ascensión]]></title>
              </track>
              <track id="3" tracknumber="B1" duration="14:39" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Ascensión]]></title>
              </track>
            </tracklist>
          </ep>
          <ep id="2" date="2013-08-24" type="studio">
            <title />
            <coverURI><![CDATA[URI]]></coverURI>
            <tracklist>
              <track id="" tracknumber="" duration="" fileformat="" bitrate="" channels="">
                <title />
              </track>
            </tracklist>
          </ep>
          <ep id="3" date="2015-05-03" type="live">
            <title><![CDATA[Southwest Acoustic Session]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a3696141168_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="4:43" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[A La Cima De La Segunda Montaña]]></title>
              </track>
              <track id="2" tracknumber="2" duration="20:29" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[The Forward Path: Emergence/Distant Travellers/Permanent Revolution/Distant Travellers (Reprise)]]></title>
              </track>
            </tracklist>
          </ep>
        </eps>
        <singles>
          <single id="1" date="2016-04-29" type="studio">
            <title><![CDATA[Semillas Sembradas]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a0593292307_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" duration="5:52" fileformat="mp3" bitrate="128" channels="2">
                <title><![CDATA[Semillas Sembradas Pt 1]]></title>
              </track>
              <track id="2" duration="4:55" fileformat="mp3" bitrate="128" channels="2">
                <title><![CDATA[Semillas Sembradas Pt 2]]></title>
              </track>
            </tracklist>
          </single>
          <single id="2" date="2015-11-01" type="studio">
            <title><![CDATA[Comrades / Storm Mills]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a1674406256_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" duration="4:26" fileformat="mp3" bitrate="128" channels="2">
                <title><![CDATA[Comrades]]></title>
              </track>
              <track id="2" duration="3:21" fileformat="mp3" bitrate="128" channels="2">
                <title><![CDATA[Storm Mills]]></title>
              </track>
            </tracklist>
          </single>
          <single id="3" date="2016-04-20" type="studio">
            <title><![CDATA[God Unknown Split]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a1291361171_16.jpg]]></coverURI>
            <tracklist>
              <track id="1" duration="6:21" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Wood Smoke Corona]]></title>
              </track>
            </tracklist>
          </single>
          <single id="4" date="2015-07-25" type="studio">
            <title><![CDATA[Funeral Ark]]></title>
            <coverURI><![CDATA[https://f4.bcbits.com/img/a1578490649_10.jpg]]></coverURI>
            <tracklist>
              <track id="1" duration="7:02" fileformat="mp3" bitrate="256" channels="2">
                <title><![CDATA[Funeral Ark]]></title>
              </track>
            </tracklist>
          </single>
        </singles>
      </records>
    </artist>
    <artist id="3">
      <name><![CDATA[DubFX]]></name>
      <country>Australia</country>
      <genres>
        <genre id="101">
          <name><![CDATA[beatboxing]]></name>
        </genre>
        <genre id="102">
          <name><![CDATA[dub]]></name>
        </genre>
        <genre id="103">
          <name><![CDATA[reggae]]></name>
        </genre>
        <genre id="104">
          <name><![CDATA[hip hop music]]></name>
        </genre>
        <genre id="105">
          <name><![CDATA[dubstep]]></name>
        </genre>
        <genre id="106">
          <name><![CDATA[drum and bass]]></name>
        </genre>
      </genres>
      <labels>
        <label id="201">
          <name><![CDATA[Convoyun.ltd]]></name>
          <country />
        </label>
      </labels>
      <members>1</members>
      <startyear>2005</startyear>
      <endyear />
      <description><![CDATA[Dub FX is a worldwide street performer who uses loop &amp; effects pedals to create layers of sounds into music using only his voice.]]></description>
      <records>
        <albums>
          <album id="301" date="2016" type="studio">
            <title><![CDATA[Thinking Clear]]></title>
            <coverURI><![CDATA[https://cdn.shopify.com/s/files/1/0286/6082/products/Front_Cover_Thinking_Clear_1024x1024.jpg?v=1472135940]]></coverURI>
            <tracklist>
              <track id="401" tracknumber="1" duration="5:49" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Birds and the Bees]]></title>
              </track>
              <track id="402" tracknumber="2" duration="4:59" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Road to Babylon]]></title>
              </track>
              <track id="403" tracknumber="3" duration="7:25" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Heat Wave]]></title>
              </track>
              <track id="404" tracknumber="4" duration="5:42" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Where I Belong]]></title>
              </track>
              <track id="405" tracknumber="5" duration="4:53" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Unwind]]></title>
              </track>
              <track id="406" tracknumber="6" duration="4:13" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[So Are You]]></title>
              </track>
              <track id="407" tracknumber="7" duration="9:07" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Beaming Light]]></title>
              </track>
              <track id="408" tracknumber="8" duration="5:11" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Fake Paradise]]></title>
              </track>
              <track id="409" tracknumber="9" duration="4:03" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Searching]]></title>
              </track>
              <track id="410" tracknumber="10" duration="6:56" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[Get Down]]></title>
              </track>
              <track id="411" tracknumber="11" duration="5:06" fileformat="mp3" bitrate="320" channels="">
                <title><![CDATA[That's the Game]]></title>
              </track>
            </tracklist>
          </album>
        </albums>
        <eps>
          <ep id="" date="" type="">
            <title />
            <coverURI><![CDATA[URI]]></coverURI>
            <tracklist>
              <track id="" tracknumber="" duration="" fileformat="" bitrate="" channels="">
                <title />
              </track>
            </tracklist>
          </ep>
        </eps>
        <singles>
          <single id="501" date="2009" type="Self-released">
            <title><![CDATA[Love Someone]]></title>
            <coverURI><![CDATA[https://img.discogs.com/F80ndtYmvILznMeFq2VvI--ESr8=/fit-in/300x300/filters:strip_icc():format(jpeg):mode_rgb():quality(40)/discogs-images/R-6870778-1428405863-4498.jpeg.jpg]]></coverURI>
            <tracklist>
              <track id="511" duration="7:19" fileformat="mp3" bitrate="" channels="">
                <title><![CDATA[Love Someone]]></title>
              </track>
            </tracklist>
          </single>
        </singles>
      </records>
    </artist>
    <artist id="4">
      <name><![CDATA[The Strokes]]></name>
      <country>USA</country>
      <genres>
        <genre id="1">
          <name><![CDATA[Indie rock]]></name>
        </genre>
        <genre id="2">
          <name><![CDATA[Garage rock revival]]></name>
        </genre>
        <genre id="3">
          <name><![CDATA[Post-punk revival]]></name>
        </genre>
      </genres>
      <labels>
        <label id="1">
          <name><![CDATA[Cult]]></name>
          <country>United States</country>
        </label>
        <label id="2">
          <name><![CDATA[RCA]]></name>
          <country>United States</country>
        </label>
        <label id="3">
          <name><![CDATA[Rough Trade]]></name>
          <country>England</country>
        </label>
      </labels>
      <members>5</members>
      <startyear>1998</startyear>
      <endyear />
      <description><![CDATA[The Strokes is an American rock band from New York City]]></description>
      <records>
        <albums>
          <album id="1" date="2013-03-26" type="">
            <title><![CDATA[Comedown Machine]]></title>
            <coverURI><![CDATA[https://upload.wikimedia.org/wikipedia/en/9/91/The_Strokes_-_Comedown_Machine.jpg]]></coverURI>
            <tracklist>
              <track id="1" tracknumber="1" duration="3:42" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Tap Out]]></title>
              </track>
              <track id="2" tracknumber="2" duration="3:01" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[All the Time]]></title>
              </track>
              <track id="3" tracknumber="3" duration="4:02" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[One Way Trigger]]></title>
              </track>
              <track id="4" tracknumber="4" duration="3:50" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Welcome to Japan]]></title>
              </track>
              <track id="5" tracknumber="5" duration="4:58" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[80's Comedown Machine]]></title>
              </track>
              <track id="6" tracknumber="6" duration="2:42" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[50/50]]></title>
              </track>
              <track id="7" tracknumber="7" duration="4:20" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Slow Animals]]></title>
              </track>
              <track id="8" tracknumber="8" duration="3:21" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Partners in Crime]]></title>
              </track>
              <track id="9" tracknumber="9" duration="3:36" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Chances]]></title>
              </track>
              <track id="10" tracknumber="10" duration="2:52" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Happy Ending]]></title>
              </track>
              <track id="11" tracknumber="11" duration="3:24" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Call It Fate, Call It Karma]]></title>
              </track>
            </tracklist>
          </album>
        </albums>
        <singles>
          <single id="1" date="2013-02-19" type="">
            <title><![CDATA[All the Time]]></title>
            <coverURI><![CDATA[https://upload.wikimedia.org/wikipedia/en/8/85/The_Strokes_All_The_Time_Cover.jpg]]></coverURI>
            <tracklist>
              <track id="1" duration="3:01" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[All The Time]]></title>
              </track>
              <track id="2" duration="3:45" fileformat="FLAC" bitrate="16" channels="2">
                <title><![CDATA[Fast Animals]]></title>
              </track>
            </tracklist>
          </single>
        </singles>
      </records>
    </artist>
  </artists>
</music>

XSD

  • (parandatud retsensiooni järgi ja natuke veel 24.03.2017)
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="music">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="artists">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="artist" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element type="xs:string" name="name"/>
                    <xs:element type="xs:string" name="country"/>
                    <xs:element name="genres">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="genre" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element type="xs:string" name="name"/>
                              </xs:sequence>
                              <xs:attribute type="xs:int" name="id" use="optional"/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="labels">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="label" maxOccurs="unbounded" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element type="xs:string" name="name"/>
                                <xs:element type="xs:string" name="country"/>
                              </xs:sequence>
                              <xs:attribute type="xs:int" name="id" use="optional"/>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element type="xs:byte" name="members"/>
                    <xs:element type="xs:short" name="startyear"/>
                    <xs:element type="xs:short" name="endyear"/>
                    <xs:element type="xs:string" name="description"/>
                    <xs:element name="records">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="albums" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="album" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element type="xs:string" name="title"/>
                                      <xs:element type="xs:string" name="coverURI"/>
                                      <xs:element name="tracklist">
                                        <xs:complexType>
                                          <xs:sequence>
                                            <xs:element name="track" maxOccurs="unbounded" minOccurs="0">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element type="xs:string" name="title"/>
                                                </xs:sequence>
                                                <xs:attribute type="xs:int" name="id" use="optional"/>
                                                <xs:attribute type="xs:short" name="tracknumber" use="optional"/>
                                                <xs:attribute type="xs:string" name="duration" use="optional"/>
                                                <xs:attribute type="xs:string" name="fileformat" use="optional"/>
                                                <xs:attribute type="xs:short" name="bitrate" use="optional"/>
                                                <xs:attribute type="xs:short" name="channels" use="optional"/>
                                              </xs:complexType>
                                            </xs:element>
                                          </xs:sequence>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:sequence>
                                    <xs:attribute type="xs:int" name="id" use="optional"/>
                                    <xs:attribute type="xs:date" name="date" use="optional"/>
                                    <xs:attribute type="xs:string" name="type" use="optional"/>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="eps" minOccurs="0">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="ep" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element type="xs:string" name="title"/>
                                      <xs:element type="xs:string" name="coverURI"/>
                                      <xs:element name="tracklist">
                                        <xs:complexType>
                                          <xs:sequence>
                                            <xs:element name="track" maxOccurs="unbounded" minOccurs="0">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element type="xs:string" name="title"/>
                                                </xs:sequence>
                                                <xs:attribute type="xs:int" name="id" use="optional"/>
                                                <xs:attribute type="xs:short" name="tracknumber" use="optional"/>
                                                <xs:attribute type="xs:string" name="duration" use="optional"/>
                                                <xs:attribute type="xs:string" name="fileformat" use="optional"/>
                                                <xs:attribute type="xs:short" name="bitrate" use="optional"/>
                                                <xs:attribute type="xs:short" name="channels" use="optional"/>
                                              </xs:complexType>
                                            </xs:element>
                                          </xs:sequence>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:sequence>
                                    <xs:attribute type="xs:int" name="id" use="optional"/>
                                    <xs:attribute type="xs:date" name="date" use="optional"/>
                                    <xs:attribute type="xs:string" name="type" use="optional"/>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                          <xs:element name="singles">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="single" maxOccurs="unbounded" minOccurs="0">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element type="xs:string" name="title"/>
                                      <xs:element type="xs:string" name="coverURI"/>
                                      <xs:element name="tracklist">
                                        <xs:complexType>
                                          <xs:sequence>
                                            <xs:element name="track" maxOccurs="unbounded" minOccurs="0">
                                              <xs:complexType>
                                                <xs:sequence>
                                                  <xs:element type="xs:string" name="title"/>
                                                </xs:sequence>
                                                <xs:attribute type="xs:int" name="id" use="optional"/>
                                                <xs:attribute type="xs:string" name="duration" use="optional"/>
                                                <xs:attribute type="xs:string" name="fileformat" use="optional"/>
                                                <xs:attribute type="xs:short" name="bitrate" use="optional"/>
                                                <xs:attribute type="xs:short" name="channels" use="optional"/>
                                              </xs:complexType>
                                            </xs:element>
                                          </xs:sequence>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:sequence>
                                    <xs:attribute type="xs:int" name="id" use="optional"/>
                                    <xs:attribute type="xs:date" name="date" use="optional"/>
                                    <xs:attribute type="xs:string" name="type" use="optional"/>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute type="xs:int" name="id" use="optional"/>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

XSLT

XSLT (HTML)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" exclude-result-prefixes="msxsl">
  <xsl:output method="html" indent="yes" />
  <xsl:template name="getYear">
    <xsl:param name="date" />
    <xsl:choose>
      <xsl:when test="contains($date, '/')">
        <xsl:call-template name="getYear">
          <xsl:with-param name="date" select="substring-after($date, '/')" />
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$date" />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  <xsl:template match="/">
    <html>
      <body>
        <h1>Artist's records later than 2015</h1>
        <table border="1">
          <tr bgcolor="#FFFFFF">
            <th>Artist</th>
            <th>Album</th>
          </tr>
          <xsl:for-each select="/music/artists/artist">
            <tr>
              <td>
                <xsl:value-of select="name" />
              </td>
              <td>
                <xsl:for-each select="records/albums/album | records/eps/ep | records/singles/single">
                  <xsl:variable name="recordDate" select="@date" />
                  <xsl:variable name="year">
                    <xsl:call-template name="getYear">
                      <xsl:with-param name="date" select="$recordDate" />
                    </xsl:call-template>
                  </xsl:variable>
                  <xsl:choose>
                    <xsl:when test="$year &gt; 2015">
                      <p style="text-align:center;">
                        <xsl:value-of select="title" disable-output-escaping="yes" />
                        <br />
                        <img style="width:160px;height:120px">
                          <xsl:attribute name="src">
                            <xsl:value-of select="coverURI" disable-output-escaping="yes" />
                          </xsl:attribute>
                        </img>
                        <br />
                        <xsl:value-of select="$year" />
                      </p>
                    </xsl:when>
                    <xsl:otherwise />
                  </xsl:choose>
                </xsl:for-each>
              </td>
            </tr>
          </xsl:for-each>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

XSLT (XML)

<?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="/">
      <artists>
        <xsl:for-each select="/music/artists/artist">
          <xsl:variable name="artistName" select="name"/>
              <xsl:for-each select="records/albums/album | records/eps/ep | records/singles/single">
                <xsl:variable name="recordcategory" select="name(.)"/>
                <xsl:variable name="recordType" select="@type"/>
                <xsl:choose>
                  <xsl:when test="$recordType = 'live'">
                    <artist name="{$artistName}">
                    <record category="{$recordcategory}">
                      <title>
                        <xsl:value-of select="title" disable-output-escaping="yes"/>
                      </title>
                      <date>
                        <xsl:value-of select="@date" disable-output-escaping="yes"/>
                      </date>
                      <tracks>
                        <xsl:for-each select="tracklist/track">
                          <track>
                            <xsl:value-of select="title" disable-output-escaping="yes"/>
                          </track>
                        </xsl:for-each>
                      </tracks>
                    </record>
                    </artist>
                  </xsl:when>
                  <xsl:otherwise></xsl:otherwise>
                </xsl:choose>
           </xsl:for-each>
        </xsl:for-each>
      </artists>
    </xsl:template>
</xsl:stylesheet>

Log

  • 08.03.2017 - esimene kokkusaamine - teema valik, meeskonna nime valik, xml stiili valik...
  • 15.03.2017 - teine kokkusaamine - igalt meeskonna liikmelt esmane XML fail ning nendest kokkupandud põhiline xml skelett
  • 19.03.2017 - kolmas kokkusaamine - XML on andmetega täidetud iga meeskonna liikme poolt, stiili ja skeemifaili tegemine. Retsensiooni kirjutamine meeskonnale Sense Of Direction. XSD fail done.