Proovitud abielu: Difference between revisions

From ICO wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 13: Line 13:


===XSLT XML===
===XSLT XML===
<div class="toccolours mw-collapsible mw-collapsed" style="width:75em">
<source lang="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="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>
</source>
</div>


===Output===
===Output===
[[File:skeem.jpg]]


==Veebiteenus==
==Veebiteenus==

Revision as of 21:58, 20 March 2017

Meeskond "Proovitud abielu"

  • Berit Põldoja
  • Elina Kuldkepp


XML/XSD/XSLT

XML

XSD

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="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>

Output

Veebiteenus

Analüüs

Teenus

Klientrakendused