|
|
Line 1: |
Line 1: |
| == Liikmed ==
| |
|
| |
|
| *Gaspar Karm
| |
| *Andrus Reedla
| |
| *Priit Siimo
| |
|
| |
| == Teema ==
| |
|
| |
| ....
| |
|
| |
| == XML ==
| |
| <source lang="xml">
| |
| <?xml version="1.0" encoding="utf-8"?>
| |
| <TeenusedKaubad>
| |
| <TeenusKaup>
| |
| <Nimetused>
| |
| <Nimetus></Nimetus>
| |
| <Keel></Keel>
| |
| </Nimetused>
| |
| <Kood></Kood>
| |
| <Kirjeldused>
| |
| <Kirjeldus>
| |
| <Keel></Keel>
| |
| <Tekst></Tekst>
| |
| </Kirjeldus>
| |
| </Kirjeldused>
| |
| <Hinnad>
| |
| <Hind>
| |
| <HinnaGrupp></HinnaGrupp>
| |
| <Valuuta></Valuuta>
| |
| <Vaartus></Vaartus>
| |
| </Hind>
| |
| </Hinnad>
| |
| <Kogus></Kogus>
| |
| <Grupid>
| |
| <Grupp>
| |
| <Nimetus></Nimetus>
| |
| </Grupp>
| |
| </Grupid>
| |
| <Parameetrid>
| |
| <Parameeter>
| |
| <Nimetus></Nimetus>
| |
| <Vaartus></Vaartus>
| |
| </Parameeter>
| |
| </Parameetrid>
| |
| <Pildid>
| |
| <Pilt>
| |
| <Nimi></Nimi>
| |
| <Aadress></Aadress>
| |
| </Pilt>
| |
| </Pildid>
| |
| <Kommentaarid>
| |
| <Kommentaar>
| |
| <Autor></Autor>
| |
| <Pealkiri></Pealkiri>
| |
| <Tekst></Tekst>
| |
| <Aeg>
| |
| <Aasta></Aasta>
| |
| <Kuu></Kuu>
| |
| <KuuPaev></KuuPaev>
| |
| <Tund></Tund>
| |
| <Minut></Minut>
| |
| </Aeg>
| |
| </Kommentaar>
| |
| </Kommentaarid>
| |
| </TeenusKaup>
| |
| </TeenusedKaubad>
| |
| </source>
| |
|
| |
| ===XML Schema===
| |
| <source lang="xml">
| |
| <?xml version="1.0" encoding="utf-8"?>
| |
| <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| |
| <xs:element name="TeenusedKaubad">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="TeenusKaup">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Nimetus" />
| |
| <xs:element name="Kood" />
| |
| <xs:element name="Kirjeldused">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Kirjeldus">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Keel" />
| |
| <xs:element name="Tekst" />
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="Hinnad">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Hind">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="HinnaGrupp" />
| |
| <xs:element name="Valuuta" />
| |
| <xs:element name="Vaartus" />
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="Kogus" />
| |
| <xs:element name="Grupid">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Grupp">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Nimetus" />
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="Parameetrid">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Parameeter">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Nimetus" />
| |
| <xs:element name="Vaartus" />
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="Pildid">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Pilt">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Nimi" />
| |
| <xs:element name="Aadress" />
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| <xs:element name="Kommentaarid">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Kommentaar">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Autor" />
| |
| <xs:element name="Pealkiri" />
| |
| <xs:element name="Tekst" />
| |
| <xs:element name="Aeg">
| |
| <xs:complexType>
| |
| <xs:sequence>
| |
| <xs:element name="Aasta" />
| |
| <xs:element name="Kuu" />
| |
| <xs:element name="KuuPaev" />
| |
| <xs:element name="Tund" />
| |
| <xs:element name="Minut" />
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:sequence>
| |
| </xs:complexType>
| |
| </xs:element>
| |
| </xs:schema>
| |
|
| |
| </source>
| |
|
| |
| ===XSLT===
| |
| <source lang="xml">
| |
| <?xml version="1.0" encoding="utf-8"?>
| |
|
| |
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
| |
|
| |
| <xsl:template match="/">
| |
| <html>
| |
| <body>
| |
| <head>
| |
| <style>
| |
| table{
| |
| border-width: 1px;
| |
| border-spacing: 0px;
| |
| border-style: outset;
| |
| border-color: green;
| |
| border-collapse: collapse;
| |
| }
| |
|
| |
| th{
| |
| border-width: 1px;
| |
| padding: 2px;
| |
| border-style: inset;
| |
| border-color: green;
| |
| background-color: #daa520;
| |
| -moz-border-radius: 3px 3px 3px 3px;
| |
| }
| |
| td{
| |
| border-width: 1px;
| |
| padding: 4px;
| |
| border-style: inset;
| |
| border-color: green;
| |
| background-color: #f5f5dc;
| |
| -moz-border-radius: 3px 3px 3px 3px;
| |
| }
| |
| .subTable{
| |
| border-width: 0px;
| |
| }
| |
| </style>
| |
| </head>
| |
|
| |
| <h2>Kaubad poes</h2>
| |
| <table>
| |
| <tr>
| |
| <th>Tootegrupp</th>
| |
| <th>Toode</th>
| |
| <th>Toote kood</th>
| |
| <th>Kirjeldus</th>
| |
| <th>Hind</th>
| |
| <th>Kogus</th>
| |
| <th>Parameetrid</th>
| |
| <th>Kommentaarid</th>
| |
| </tr>
| |
| <xsl:for-each select="TeenusedKaubad/TeenusKaup">
| |
| <tr>
| |
|
| |
| <td>
| |
| <xsl:for-each select="Grupid/Grupp">
| |
| /<xsl:value-of select="Nimetus"/>
| |
| </xsl:for-each>
| |
| </td>
| |
|
| |
| <td>
| |
| <xsl:value-of select="Nimetus"/>
| |
| </td>
| |
|
| |
| <td>
| |
| <xsl:value-of select="Kood"/>
| |
| </td>
| |
|
| |
| <td>
| |
| <xsl:for-each select="Kirjeldused/Kirjeldus">
| |
| <table class ="subTable">
| |
| <tr>
| |
| <dt>
| |
| <xsl:value-of select="Tekst"/>
| |
| <!--(<xsl:value-of select="Keel"/>)-->
| |
| </dt>
| |
| </tr>
| |
| </table>
| |
| </xsl:for-each>
| |
| </td>
| |
|
| |
| <td>
| |
| <xsl:for-each select="Hinnad/Hind">
| |
| <table class ="subTable">
| |
| <tr>
| |
| <dt>
| |
| *<xsl:value-of select="HinnaGrupp"/>
| |
| <xsl:value-of select="Vaartus"/>
| |
| (<xsl:value-of select="Valuuta"/>)
| |
| </dt>
| |
| </tr>
| |
| </table>
| |
| </xsl:for-each>
| |
| </td>
| |
|
| |
| <td align="center">
| |
| <xsl:value-of select="Kogus"/>
| |
| </td>
| |
|
| |
| <td>
| |
| <xsl:for-each select="Parameetrid/Parameeter">
| |
| <table class ="subTable">
| |
| <tr>
| |
| <dt>
| |
| <xsl:value-of select="Nimetus"/>:
| |
| <xsl:value-of select="Vaartus"/>
| |
| </dt>
| |
| </tr>
| |
| </table>
| |
| </xsl:for-each>
| |
| </td>
| |
|
| |
| <td>
| |
| <xsl:for-each select="Kommentaarid/Kommentaar">
| |
| <table class ="subTable">
| |
| <tr>
| |
| <dt>
| |
| <xsl:value-of select="Pealkiri"/><br />
| |
| <xsl:value-of select="Tekst"/><br />
| |
| <xsl:value-of select="Autor"/>:
| |
| <xsl:value-of select="Aeg/Tund"/>:
| |
| <xsl:value-of select="Aeg/Minut"/>
| |
| <xsl:value-of select="Aeg/KuuPaev"/>/
| |
| <xsl:value-of select="Aeg/Kuu"/>/
| |
| <xsl:value-of select="Aeg/Aasta"/>
| |
| </dt>
| |
| </tr>
| |
| </table>
| |
| </xsl:for-each>
| |
| </td>
| |
|
| |
| </tr>
| |
| </xsl:for-each>
| |
| </table>
| |
| </body>
| |
| </html>
| |
| </xsl:template>
| |
| </xsl:stylesheet>
| |
| </source>
| |
| [[File:Gap xslt.JPG]]
| |