Proovitud abielu: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Bpoldoja (talk | contribs)
Bpoldoja (talk | contribs)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Kodutöö aines "Võrgurakendused II: hajussüsteemide ehitamine"=
== Meeskond "Proovitud abielu" ==
== Meeskond "Proovitud abielu" ==


Line 4: Line 5:
*Elina Kuldkepp
*Elina Kuldkepp


==Veebiteenus HP==
===HP Kirjeldus===
<p>Projekti eesmärgiks on luua toimiv rakendus, mis kuvaks ratsaspordivõistluseid. Kasutajad saavad jälgida võistluste tulemuste seisu - kes sõidab, kuidas tal läheb ning hiljem mitmendaks ta jäi. Rakenduses on võimalik kellaajaliselt näha, millal keegi starti läheb. </p>
====Tööjaotus====
*Berit - all by myself. ( Proovisime seda abielu ja ei tulnud välja )
====Üldine spetsifikatsioon====
* Võistluste stardijärjekordade ja tulemuste kuvamine
* Kasutaja loomine
* Kasutaja saab jälgida temal ära märgitud  (“favorite”) ratsutaja või hobuse võistlustulemusi
* Käimasoleva võistluse kuvamine, timer
* Müügihobuste eraldi märgistamine
====Must have====
* Admin vaade - andmesisestus
* Kasutaja loomine
* Võistluste stardijärjekordade ja tulemuste kuvamine
* Kasutajal “favourite’’ listi ratsanike ja hobuste lisamine
* Kasutajal “favourite’’ listist ratsanike ja hobuste kustutamine


==XML/XSD/XSLT==
==XML/XSD/XSLT==
Line 9: Line 34:
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<source lang="xml">
<source lang="xml">
  <?xml version="1.0" encoding="utf-8" ?>  
<?xml version="1.0" encoding="UTF-8"?>
<Bookstores>
<Bookstores>
 
  <Bookstore id="1" country="Spain">
  <Bookstore id="1" country="Spain">
    <Name>Señorita</Name>
            <Name>Señorita</Name>
    <Book category="Crime" quantity="50" language="english" pages="250">
            <Book category="Crime" quantity="50" language="english" pages="250">
      <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
                <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
      <Description><![CDATA[After wealthy businessman Hartley Bassetts apparent suicide, Perry Mason discovers too many suspects who may have wanted him dead to believe the obvious evidence of a suicide note and three guns near the body.]]></Description>
                <Description><![CDATA[After wealthy businessman Hartley Bassetts apparent suicide, Perry Mason discovers too many suspects who may have wanted him dead to believe the obvious evidence of a suicide note and three guns near the body.]]></Description>
      <Author gender="Male">
                <Author gender="Male">
        <FirstName>Erle Stanley</FirstName>
                    <FirstName>Erle Stanley</FirstName>
        <LastName>Gardner</LastName>
                    <LastName>Gardner</LastName>
        <BirthYear>1889</BirthYear>
                    <BirthYear>1889</BirthYear>
        <Country>USA</Country>
                    <Country>USA</Country>
      </Author>
                </Author>
      <ReleaseDate>
                <ReleaseDate>
        <Day>20</Day>
                  <Day>20</Day>
        <Month>March</Month>
                  <Month>March</Month>
        <Year>1928</Year>
                  <Year>1928</Year>
      </ReleaseDate>
              </ReleaseDate>
      <Price>30.50</Price>
              <Price>30.50</Price>
      <Location>Madrid</Location>
              <Location>Madrid</Location>  
    </Book>
            </Book>
    <Book category="Drama" quantity="20" language="english" pages="150">
           
      <Title><![CDATA[Beating hearts.]]></Title>
            <Book category="Drama" quantity="20" language="english" pages="150">
      <Description><![CDATA[Beating Hearts maintains that sentence or ability to have subjective experiences.]]></Description>
                <Title><![CDATA[Beating hearts.]]></Title>
      <Author gender="Female">
                <Description><![CDATA[Beating Hearts maintains that sentence or ability to have subjective experiences.]]></Description>
        <FirstName>Hannah</FirstName>
                <Author gender="Female">
        <LastName>Cole</LastName>
                    <FirstName>Hannah</FirstName>
        <BirthYear>1985</BirthYear>
                    <LastName>Cole</LastName>
        <Country>USA</Country>
                    <BirthYear>1985</BirthYear>
      </Author>
                    <Country>USA</Country>
      <ReleaseDate>
                </Author>
        <Day>14</Day>
                <ReleaseDate>
        <Month>May</Month>
                  <Day>14</Day>
        <Year>2005</Year>
                  <Month>May</Month>
      </ReleaseDate>
                  <Year>2005</Year>
      <Price>20</Price>
              </ReleaseDate>
      <Location>Sevilla</Location>
              <Price>20</Price>
    </Book>
              <Location>Sevilla</Location>
  </Bookstore>
               
  <Bookstore id="2" country="France">
            </Book>
    <Name>Mademoiselle</Name>
           
    <Book category="Romance" quantity="43" language="english" pages="400">
    </Bookstore>
      <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
   
      <Description><![CDATA[After wealthy businessman Hartley Bassetts apparent suicide, Perry Mason discovers too many suspects who may have wanted him dead to believe the obvious evidence of a suicide note and three guns near the body.]]></Description>
    <Bookstore id="2" country="France">
      <Author gender="Woman">
            <Name>Mademoiselle</Name>
        <FirstName>Charlotte</FirstName>
            <Book category="Romance" quantity="43" language="english" pages="400">
        <LastName> Brontë</LastName>
                <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
        <BirthYear>1816</BirthYear>
                <Description><![CDATA[After wealthy businessman Hartley Bassetts apparent suicide, Perry Mason discovers too many suspects who may have wanted him dead to believe the obvious evidence of a suicide note and three guns near the body.]]></Description>
        <Country>England</Country>
                <Author gender="Woman">
      </Author>
                    <FirstName>Charlotte</FirstName>
      <ReleaseDate>
                    <LastName> Brontë</LastName>
        <Day>16</Day>
                    <BirthYear>1816</BirthYear>
        <Month>October</Month>
                    <Country>England</Country>
        <Year>1847</Year>
                </Author>
      </ReleaseDate>
                <ReleaseDate>
      <Price>20.99</Price>
                  <Day>16</Day>
      <Location>Paris</Location>
                  <Month>October</Month>
    </Book>
                  <Year>1847</Year>
    <Book category="Crime" quantity="50" language="english" pages="250">
              </ReleaseDate>
      <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
              <Price>20.99</Price>
      <Description><![CDATA[When a murdered man is found in the home of shady insurance adjustor Walter Prescott, a simple divorce case turns into a courtroom puzzler, as Perry Mason follows the clues to catch a killer. Reissue.]]></Description>
              <Location>Paris</Location>
      <Author gender="Male">
            </Book>
        <FirstName>Erle Stanley</FirstName>
           
        <LastName>Gardner</LastName>
            <Book category="Crime" quantity="50" language="english" pages="250">
        <BirthYear>1889</BirthYear>
                <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
        <Country>USA</Country>
                <Description><![CDATA[When a murdered man is found in the home of shady insurance adjustor Walter Prescott, a simple divorce case turns into a courtroom puzzler, as Perry Mason follows the clues to catch a killer. Reissue.]]></Description>
      </Author>
                <Author gender="Male">
      <ReleaseDate>
                    <FirstName>Erle Stanley</FirstName>
        <Day>21</Day>
                    <LastName>Gardner</LastName>
        <Month>September</Month>
                    <BirthYear>1889</BirthYear>
        <Year>1920</Year>
                    <Country>USA</Country>
      </ReleaseDate>
                </Author>
      <Price>25</Price>
                <ReleaseDate>
      <Location>Paris</Location>
                  <Day>21</Day>
    </Book>
                  <Month>September</Month>
    <Book category="Sci-fi" quantity="50" language="france" pages="450">
                  <Year>1920</Year>
      <Title><![CDATA[Something suspicious]]></Title>
              </ReleaseDate>
      <Description><![CDATA[Something happened]]></Description>
              <Price>25</Price>
      <Author gender="Male">
              <Location>Paris</Location>  
        <FirstName>Erle Stanley</FirstName>
            </Book>
        <LastName>Gardner</LastName>
           
        <BirthYear>1889</BirthYear>
            <Book category="Sci-fi" quantity="50" language="france" pages="450">
        <Country>USA</Country>
                <Title><![CDATA[Something suspicious]]></Title>
      </Author>
                <Description><![CDATA[Something happened]]></Description>
      <ReleaseDate>
                <Author gender="Male">
        <Day>12</Day>
                    <FirstName>Erle Stanley</FirstName>
        <Month>August</Month>
                    <LastName>Gardner</LastName>
        <Year>1905</Year>
                    <BirthYear>1889</BirthYear>
      </ReleaseDate>
                    <Country>USA</Country>
      <Price>27.99</Price>
                </Author>
      <Location>Nice</Location>
                <ReleaseDate>
    </Book>
                  <Day>12</Day>
  </Bookstore>
                  <Month>August</Month>
  <Bookstore id="3" country="Great Britain">
                  <Year>1905</Year>
    <Name>Fraŭlino</Name>
              </ReleaseDate>
    <Book category="Comedy" quantity="25" language="english" pages="150">
              <Price>27.99</Price>
      <Title><![CDATA[This was fun.]]></Title>
              <Location>Nice</Location>
      <Description><![CDATA[So much fun stuff happens. Must read.]]></Description>
            </Book>
      <Author gender="Woman">
           
        <FirstName>Berit</FirstName>
    </Bookstore>
        <LastName>Põldoja</LastName>
     
        <BirthYear>1996</BirthYear>
    <Bookstore id="3" country="Great Britain">
        <Country>Estonia</Country>
        <Name>Fraŭlino</Name>
      </Author>
        <Book category="Comedy" quantity="25" language="english" pages="150">
      <ReleaseDate>
                <Title><![CDATA[This was fun.]]></Title>
        <Day>17</Day>
                <Description><![CDATA[So much fun stuff happens. Must read.]]></Description>
        <Month>May</Month>
                <Author gender="Woman">
        <Year>2019</Year>
                    <FirstName>Berit</FirstName>
      </ReleaseDate>
                    <LastName>Põldoja</LastName>
      <Price>35.99</Price>
                    <BirthYear>1996</BirthYear>
      <Location>London</Location>
                    <Country>Estonia</Country>
     </Book>
                </Author>
    <Book category="Drama" quantity="15" language="english" pages="450">
                <ReleaseDate>
      <Title><![CDATA[Sad Woman.]]></Title>
                  <Day>17</Day>
      <Description><![CDATA[Woman is very sad.]]></Description>
                  <Month>May</Month>
      <Author gender="Woman">
                  <Year>2019</Year>
        <FirstName>Elina</FirstName>
              </ReleaseDate>
        <LastName>Kuldkepp</LastName>
              <Price>35.99</Price>
        <BirthYear>1994</BirthYear>
              <Location>London</Location>     
        <Country>Estonia</Country>
            </Book>
      </Author>
           
      <ReleaseDate>
            <Book category="Drama" quantity="15" language="english" pages="450">
        <Day>30</Day>
                <Title><![CDATA[Sad Woman.]]></Title>
        <Month>October</Month>
                <Description><![CDATA[Woman is very sad.]]></Description>
        <Year>2020</Year>
                <Author gender="Woman">
      </ReleaseDate>
                    <FirstName>Elina</FirstName>
      <Price>20</Price>
                    <LastName>Kuldkepp</LastName>
      <Location>Oxford</Location>
                    <BirthYear>1994</BirthYear>
     </Book>
                    <Country>Estonia</Country>
  </Bookstore>
                </Author>
                <ReleaseDate>
                  <Day>30</Day>
                  <Month>October</Month>
                  <Year>2020</Year>
              </ReleaseDate>
              <Price>20</Price>
              <Location>Oxford</Location>     
            </Book>
           
    </Bookstore>
   
</Bookstores>
</Bookstores>
</source>
</source>
Line 158: Line 171:
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<source lang="xml">
<source lang="xml">
  <?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema id="XMLSchema1"
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/XMLSchema1.xsd" xmlns:mstns="http://tempuri.org/XMLSchema1.xsd"  
    targetNamespace="http://tempuri.org/XMLSchema1.xsd"
id="XMLSchema1" targetNamespace="http://tempuri.org/XMLSchema1.xsd" elementFormDefault="qualified">
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/XMLSchema1.xsd"
    xmlns:mstns="http://tempuri.org/XMLSchema1.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
   <xs:element name="Bookstores">
   <xs:element name="Bookstores">
     <xs:complexType>
     <xs:complexType>
       <xs:element name="Bookstore" type="xs:string">
       <xs:element name="Bookstore" type="xs:string">
      <xs:complexType>
        <xs:complexType>
        <xs:sequence>
          <xs:sequence>
          <xs:element name="Name" type="xs:string"/>
            <xs:element name="Name" type="xs:string" />
          <xs:element name="Book">
            <xs:element name="Book">
 
              <xs:complexType>
            <xs:complexType>
                <xs:sequence>
              <xs:sequence>
                  <xs:element name="Title" type="xs:string" />
                <xs:element name="Title" type="xs:string"/>
                  <xs:element name="Description" type="xs:string" />
                <xs:element name="Description" type="xs:string"/>
                  <xs:element name="Author" type="xs:string">
                <xs:element name="Author" type="xs:string">
                    <xs:complexType>
 
                      <xs:sequence>
                <xs:complexType>
                        <xs:element name="FirstName" type="xs:string" />
                  <xs:sequence>
                        <xs:element name="LastName" type="xs:string" />
                    <xs:element name="FirstName" type="xs:string"/>
                        <xs:element name="BirthYear" type="xs:string" />
                    <xs:element name="LastName" type="xs:string"/>
                        <xs:element name="Country" type="xs:string" />
                    <xs:element name="BirthYear" type="xs:string"/>
                      </xs:sequence>
                    <xs:element name="Country" type="xs:string"/>
                      <xs:attribute name="gender" type="xs:string" use="required" />
                  </xs:sequence>
                    </xs:complexType>
                  <xs:attribute name="gender" type="xs:string" use="required"/>
                  </xs:element>
                </xs:complexType>
                </xs:element>
                   <xs:element name="ReleaseDate" type="xs:string">
                   <xs:element name="ReleaseDate" type="xs:string">
                  <xs:complexType>
                    <xs:complexType>
                    <xs:sequence>
                      <xs:sequence>
                      <xs:element name="Day" type="xs:datetime"/>
                        <xs:element name="Day" type="xs:datetime" />
                      <xs:element name="Month" type="xs:datetime"/>
                        <xs:element name="Month" type="xs:datetime" />
                      <xs:element name="Year" type="xs:datetime"/>
                        <xs:element name="Year" type="xs:datetime" />
                    </xs:sequence>
                      </xs:sequence>
 
                    </xs:complexType>
                  </xs:complexType>
                  </xs:element>
                </xs:element>
                  <xs:element name="Price" type="xs:decimal" />
                <xs:element name="Price" type="xs:decimal"/>
                  <xs:element name="Location" type="xs:string" />
                <xs:element name="Location" type="xs:string"/>
                </xs:sequence>
              </xs:sequence>
                <xs:attribute name="category" type="xs:string" use="required" />
              <xs:attribute name="category" type="xs:string" use="required"/>
                <xs:attribute name="quantity" type="xs:string" use="required" />
              <xs:attribute name="quantity" type="xs:string" use="required"/>
                <xs:attribute name="language" type="xs:string" use="required" />
              <xs:attribute name="language" type="xs:string" use="required"/>
                <xs:attribute name="pages" type="xs:int" use="required" />
              <xs:attribute name="pages" type="xs:int" use="required"/>
              </xs:complexType>
 
            </xs:element>
            </xs:complexType>
          </xs:sequence>
 
          <xs:attribute name="id" type="xs:string" use="required" />
          </xs:element>
          <xs:attribute name="country" type="xs:string" use="required" />
        </xs:sequence>
        </xs:complexType>
        <xs:attribute name="id" type="xs:string" use="required"/>
      </xs:element>
        <xs:attribute name="country" type="xs:string" use="required"/>
    </xs:complexType>
      </xs:complexType>
    </xs:element>
  </xs:complexType>
   </xs:element>
   </xs:element>
</xs:schema>
</xs:schema>
</source>
</source>
</div>
</div>
===XSLT XML===
 
===XSLT HTML===
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<source lang="xml">
<source lang="xml">
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0" exclude-result-prefixes="msxsl">
>
   <xsl:output method="html" indent="yes" />
   <xsl:output method="html" indent="yes"/>
 
   <xsl:template match="/">
   <xsl:template match="/">
     <html>
     <html>
Line 247: Line 249:
           <tr>
           <tr>
             <td bgcolor="#9acd32">
             <td bgcolor="#9acd32">
               <xsl:value-of select="Name"/>
               <xsl:value-of select="Name" />
             </td>
             </td>
             <xsl:for-each select="Book">
             <xsl:for-each select="Book">
               <tr>
               <tr>
                 <td>
                 <td>
                   <xsl:value-of select="Title"/>
                   <xsl:value-of select="Title" />
                 </td>
                 </td>
                 <td>
                 <td>
                   <xsl:value-of select="Description"/>
                   <xsl:value-of select="Description" />
                 </td>
                 </td>
                 <td>
                 <td>
                   <xsl:value-of select="Author"/>
                   <xsl:value-of select="Author" />
                 </td>
                 </td>
               </tr>
               </tr>
Line 265: Line 267:
         </xsl:for-each>
         </xsl:for-each>
       </table>
       </table>
     
       <table border="1">
       <table border="1">
         <tr bgcolor="#9acd32">
         <tr bgcolor="#9acd32">
Line 275: Line 276:
         </tr>
         </tr>
         <xsl:for-each select="Bookstores/Bookstore/Book/Author">
         <xsl:for-each select="Bookstores/Bookstore/Book/Author">
         
         
         
           <tr>
           <tr>
             <xsl:if test="@gender='Woman'">
             <xsl:if test="@gender='Woman'">
               <xsl:if test="Country='Estonia'">
               <xsl:if test="Country='Estonia'">
            <td>
             
                <xsl:value-of select="@gender" />
             
            </td>
              <td>
                <xsl:value-of select="FirstName" />
              </td>
              <td>
                <xsl:value-of select="LastName" />
              </td>
                 <td>
                 <td>
 
                  <xsl:value-of select="@gender" />
                </td>
                <td>
                  <xsl:value-of select="FirstName" />
                </td>
                <td>
                  <xsl:value-of select="LastName" />
                </td>
                <td>
                   <xsl:value-of select="Country" />
                   <xsl:value-of select="Country" />
                 </td>
                 </td>
 
                <td>
              <td>
                  <xsl:value-of select="BirthYear" />
 
                </td>
                <xsl:value-of select="BirthYear" />
               </xsl:if>
 
              </td>
                
             </xsl:if>
             </xsl:if>
            </xsl:if>
             
           
           
         
           </tr>
           </tr>
         </xsl:for-each>
         </xsl:for-each>
       </table>
       </table>
     </html>
     </html>
  </xsl:template>
</xsl:stylesheet>
</source>
</div>
===XSLT TXT===
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<source lang="xml">
<?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" version="1.0" exclude-result-prefixes="msxsl">
  <xsl:output method="text" indent="yes" />
  <xsl:template match="/">
    <xsl:text>Raamatupoe raamatud</xsl:text>
    <xsl:for-each select="Bookstores/Bookstore/Book">
      <xsl:if test="@category='Crime'">
        <xsl:text />
        <xsl:value-of select="." />
      </xsl:if>
    </xsl:for-each>
    <xsl:text>---------------------------------</xsl:text>
    <xsl:for-each select="Bookstores/Bookstore">
      <xsl:if test="@country='Spain'">
        <xsl:text />
        <xsl:value-of select="." />
      </xsl:if>
    </xsl:for-each>
   </xsl:template>
   </xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
Line 324: Line 332:


===Output===
===Output===
[[File:VR2xml.png|thumb|left|alt=XML output of given XSLT XML|XSLT XML output]]
[[File:VR2xml.png|thumb|left|alt=XML output of given XML|XSLT XML output]]
 
[[File:VR2xslt.png|thumb|left|alt=XML output of given XML|XSLT XML output]]
==Veebiteenus==
===Analüüs===
===Teenus===
==Klientrakendused==

Latest revision as of 22:19, 17 April 2017

Kodutöö aines "Võrgurakendused II: hajussüsteemide ehitamine"

Meeskond "Proovitud abielu"

  • Berit Põldoja
  • Elina Kuldkepp

Veebiteenus HP

HP Kirjeldus

Projekti eesmärgiks on luua toimiv rakendus, mis kuvaks ratsaspordivõistluseid. Kasutajad saavad jälgida võistluste tulemuste seisu - kes sõidab, kuidas tal läheb ning hiljem mitmendaks ta jäi. Rakenduses on võimalik kellaajaliselt näha, millal keegi starti läheb.

Tööjaotus

  • Berit - all by myself. ( Proovisime seda abielu ja ei tulnud välja )

Üldine spetsifikatsioon

  • Võistluste stardijärjekordade ja tulemuste kuvamine
  • Kasutaja loomine
  • Kasutaja saab jälgida temal ära märgitud (“favorite”) ratsutaja või hobuse võistlustulemusi
  • Käimasoleva võistluse kuvamine, timer
  • Müügihobuste eraldi märgistamine

Must have

  • Admin vaade - andmesisestus
  • Kasutaja loomine
  • Võistluste stardijärjekordade ja tulemuste kuvamine
  • Kasutajal “favourite’’ listi ratsanike ja hobuste lisamine
  • Kasutajal “favourite’’ listist ratsanike ja hobuste kustutamine

XML/XSD/XSLT

XML

 <?xml version="1.0" encoding="UTF-8"?>
<Bookstores>
  <Bookstore id="1" country="Spain">
    <Name>Señorita</Name>
    <Book category="Crime" quantity="50" language="english" pages="250">
      <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
      <Description><![CDATA[After wealthy businessman Hartley Bassetts apparent suicide, Perry Mason discovers too many suspects who may have wanted him dead to believe the obvious evidence of a suicide note and three guns near the body.]]></Description>
      <Author gender="Male">
        <FirstName>Erle Stanley</FirstName>
        <LastName>Gardner</LastName>
        <BirthYear>1889</BirthYear>
        <Country>USA</Country>
      </Author>
      <ReleaseDate>
        <Day>20</Day>
        <Month>March</Month>
        <Year>1928</Year>
      </ReleaseDate>
      <Price>30.50</Price>
      <Location>Madrid</Location>
    </Book>
    <Book category="Drama" quantity="20" language="english" pages="150">
      <Title><![CDATA[Beating hearts.]]></Title>
      <Description><![CDATA[Beating Hearts maintains that sentence or ability to have subjective experiences.]]></Description>
      <Author gender="Female">
        <FirstName>Hannah</FirstName>
        <LastName>Cole</LastName>
        <BirthYear>1985</BirthYear>
        <Country>USA</Country>
      </Author>
      <ReleaseDate>
        <Day>14</Day>
        <Month>May</Month>
        <Year>2005</Year>
      </ReleaseDate>
      <Price>20</Price>
      <Location>Sevilla</Location>
    </Book>
  </Bookstore>
  <Bookstore id="2" country="France">
    <Name>Mademoiselle</Name>
    <Book category="Romance" quantity="43" language="english" pages="400">
      <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
      <Description><![CDATA[After wealthy businessman Hartley Bassetts apparent suicide, Perry Mason discovers too many suspects who may have wanted him dead to believe the obvious evidence of a suicide note and three guns near the body.]]></Description>
      <Author gender="Woman">
        <FirstName>Charlotte</FirstName>
        <LastName> Brontë</LastName>
        <BirthYear>1816</BirthYear>
        <Country>England</Country>
      </Author>
      <ReleaseDate>
        <Day>16</Day>
        <Month>October</Month>
        <Year>1847</Year>
      </ReleaseDate>
      <Price>20.99</Price>
      <Location>Paris</Location>
    </Book>
    <Book category="Crime" quantity="50" language="english" pages="250">
      <Title><![CDATA[The Case of the Counterfeit Eye]]></Title>
      <Description><![CDATA[When a murdered man is found in the home of shady insurance adjustor Walter Prescott, a simple divorce case turns into a courtroom puzzler, as Perry Mason follows the clues to catch a killer. Reissue.]]></Description>
      <Author gender="Male">
        <FirstName>Erle Stanley</FirstName>
        <LastName>Gardner</LastName>
        <BirthYear>1889</BirthYear>
        <Country>USA</Country>
      </Author>
      <ReleaseDate>
        <Day>21</Day>
        <Month>September</Month>
        <Year>1920</Year>
      </ReleaseDate>
      <Price>25</Price>
      <Location>Paris</Location>
    </Book>
    <Book category="Sci-fi" quantity="50" language="france" pages="450">
      <Title><![CDATA[Something suspicious]]></Title>
      <Description><![CDATA[Something happened]]></Description>
      <Author gender="Male">
        <FirstName>Erle Stanley</FirstName>
        <LastName>Gardner</LastName>
        <BirthYear>1889</BirthYear>
        <Country>USA</Country>
      </Author>
      <ReleaseDate>
        <Day>12</Day>
        <Month>August</Month>
        <Year>1905</Year>
      </ReleaseDate>
      <Price>27.99</Price>
      <Location>Nice</Location>
    </Book>
  </Bookstore>
  <Bookstore id="3" country="Great Britain">
    <Name>Fraŭlino</Name>
    <Book category="Comedy" quantity="25" language="english" pages="150">
      <Title><![CDATA[This was fun.]]></Title>
      <Description><![CDATA[So much fun stuff happens. Must read.]]></Description>
      <Author gender="Woman">
        <FirstName>Berit</FirstName>
        <LastName>Põldoja</LastName>
        <BirthYear>1996</BirthYear>
        <Country>Estonia</Country>
      </Author>
      <ReleaseDate>
        <Day>17</Day>
        <Month>May</Month>
        <Year>2019</Year>
      </ReleaseDate>
      <Price>35.99</Price>
      <Location>London</Location>
    </Book>
    <Book category="Drama" quantity="15" language="english" pages="450">
      <Title><![CDATA[Sad Woman.]]></Title>
      <Description><![CDATA[Woman is very sad.]]></Description>
      <Author gender="Woman">
        <FirstName>Elina</FirstName>
        <LastName>Kuldkepp</LastName>
        <BirthYear>1994</BirthYear>
        <Country>Estonia</Country>
      </Author>
      <ReleaseDate>
        <Day>30</Day>
        <Month>October</Month>
        <Year>2020</Year>
      </ReleaseDate>
      <Price>20</Price>
      <Location>Oxford</Location>
    </Book>
  </Bookstore>
</Bookstores>

XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/XMLSchema1.xsd" xmlns:mstns="http://tempuri.org/XMLSchema1.xsd" 
id="XMLSchema1" targetNamespace="http://tempuri.org/XMLSchema1.xsd" elementFormDefault="qualified">
  <xs:element name="Bookstores">
    <xs:complexType>
      <xs:element name="Bookstore" type="xs:string">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Name" type="xs:string" />
            <xs:element name="Book">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Title" type="xs:string" />
                  <xs:element name="Description" type="xs:string" />
                  <xs:element name="Author" type="xs:string">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="FirstName" type="xs:string" />
                        <xs:element name="LastName" type="xs:string" />
                        <xs:element name="BirthYear" type="xs:string" />
                        <xs:element name="Country" type="xs:string" />
                      </xs:sequence>
                      <xs:attribute name="gender" type="xs:string" use="required" />
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="ReleaseDate" type="xs:string">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="Day" type="xs:datetime" />
                        <xs:element name="Month" type="xs:datetime" />
                        <xs:element name="Year" type="xs:datetime" />
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Price" type="xs:decimal" />
                  <xs:element name="Location" type="xs:string" />
                </xs:sequence>
                <xs:attribute name="category" type="xs:string" use="required" />
                <xs:attribute name="quantity" type="xs:string" use="required" />
                <xs:attribute name="language" type="xs:string" use="required" />
                <xs:attribute name="pages" type="xs:int" use="required" />
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="id" type="xs:string" use="required" />
          <xs:attribute name="country" type="xs:string" use="required" />
        </xs:complexType>
      </xs:element>
    </xs:complexType>
  </xs:element>
</xs:schema>

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" version="1.0" exclude-result-prefixes="msxsl">
  <xsl:output method="html" indent="yes" />
  <xsl:template match="/">
    <html>
      <head>
        <title>Raamatupoed</title>
      </head>
      <body>
        <h1>Raamatupoed</h1>
      </body>
      <table border="1">
        <tr bgcolor="#9acd32">
          <th>Raamatupood ja raamatud</th>
          <th>Kirjeldus</th>
          <th>Info</th>
        </tr>
        <xsl:for-each select="Bookstores/Bookstore">
          <tr>
            <td bgcolor="#9acd32">
              <xsl:value-of select="Name" />
            </td>
            <xsl:for-each select="Book">
              <tr>
                <td>
                  <xsl:value-of select="Title" />
                </td>
                <td>
                  <xsl:value-of select="Description" />
                </td>
                <td>
                  <xsl:value-of select="Author" />
                </td>
              </tr>
            </xsl:for-each>
          </tr>
        </xsl:for-each>
      </table>
      <table border="1">
        <tr bgcolor="#9acd32">
          <th>Sugu</th>
          <th>Eesnimi</th>
          <th>Perekonnanimi</th>
          <th>Riik</th>
          <th>Sünniaasta</th>
        </tr>
        <xsl:for-each select="Bookstores/Bookstore/Book/Author">
          <tr>
            <xsl:if test="@gender='Woman'">
              <xsl:if test="Country='Estonia'">
                <td>
                  <xsl:value-of select="@gender" />
                </td>
                <td>
                  <xsl:value-of select="FirstName" />
                </td>
                <td>
                  <xsl:value-of select="LastName" />
                </td>
                <td>
                  <xsl:value-of select="Country" />
                </td>
                <td>
                  <xsl:value-of select="BirthYear" />
                </td>
              </xsl:if>
            </xsl:if>
          </tr>
        </xsl:for-each>
      </table>
    </html>
  </xsl:template>
</xsl:stylesheet>

XSLT TXT

<?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" version="1.0" exclude-result-prefixes="msxsl">
  <xsl:output method="text" indent="yes" />
  <xsl:template match="/">
    <xsl:text>Raamatupoe raamatud</xsl:text>
    <xsl:for-each select="Bookstores/Bookstore/Book">
      <xsl:if test="@category='Crime'">
        <xsl:text />
        <xsl:value-of select="." />
      </xsl:if>
    </xsl:for-each>
    <xsl:text>---------------------------------</xsl:text>
    <xsl:for-each select="Bookstores/Bookstore">
      <xsl:if test="@country='Spain'">
        <xsl:text />
        <xsl:value-of select="." />
      </xsl:if>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

Output

XML output of given XML
XSLT XML output
XML output of given XML
XSLT XML output