Meeskond "ASP-tastic"
From ICO wiki
Idee
on olemas
Meeskond
- Indrek Kõue
- Taivo Türnpu
- Jarko Kaskmaa
XML
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xml" href="xml.xsl"?>
<schedule>
<day>
<date>1299011724</date>
<item>
<positionInList>1</positionInList>
<excercise>Kükk</excercise>
<series>3</series>
<reps>6-8</reps>
<time></time>
<weigth>90</weigth>
<description>Korralik täiskükk</description>
<comment></comment>
<category>
<muscleGroup>Reied</muscleGroup>
<muscleGroup>Sääred</muscleGroup>
<muscleGroup>Alaselg</muscleGroup>
</category>
</item>
<item>
<positionInList>2</positionInList>
<excercise>Jõutõmme</excercise>
<series>4</series>
<reps>5</reps>
<time></time>
<weigth>120</weigth>
<description></description>
<comment>See nädal on kerge jõutõmme</comment>
<category>
<muscleGroup>Alaselg</muscleGroup>
<muscleGroup>Kõik jalg</muscleGroup>
<muscleGroup>Trapetslihas</muscleGroup>
</category>
</item>
</day>
</schedule>
XML Schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="schedule">
<xs:complexType>
<xs:sequence>
<xs:element name="day">
<xs:complexType>
<xs:sequence>
<xs:element name="date" type="xs:unsignedInt" />
<xs:element maxOccurs="unbounded" name="item">
<xs:complexType>
<xs:sequence>
<xs:element name="positionInList" type="xs:unsignedByte" />
<xs:element name="excercise" type="xs:string" />
<xs:element name="series" type="xs:unsignedByte" />
<xs:element name="reps" type="xs:unsignedByte" />
<xs:element name="time" />
<xs:element name="weigth" type="xs:unsignedByte" />
<xs:element name="description" type="xs:string" />
<xs:element name="comment" type="xs:string" />
<xs:element name="category">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="muscleGroup" type="xs:string" />
</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>
XSLT
This document had no style information.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>
Tänane kava
</h2>
<h3>
Kava kuupäev (Unix timestamp):
<xsl:value-of select="schedule/day/date"/>
</h3>
<table border="1">
<tr bgcolor="#9acd32">
<th>
Jrk nr
</th>
<th>
Harjutus
</th>
<th>
Seeriaid
</th>
<th>
Korduseid
</th>
<th>
Aeg
</th>
<th>
Raskus
</th>
<th>
Kirjeldus
</th>
<th>
Kommentaar
</th>
<th>
Lihasgrupid
</th>
</tr>
<xsl:for-each select="schedule/day/item">
<tr>
<td>
<xsl:value-of select="positionInList"/>
</td>
<td>
<xsl:value-of select="excercise"/>
</td>
<td>
<xsl:value-of select="series"/>
</td>
<td>
<xsl:value-of select="reps"/>
</td>
<td>
<xsl:value-of select="time"/>
</td>
<td>
<xsl:value-of select="weigth"/>
</td>
<td>
<xsl:value-of select="description"/>
</td>
<td>
<xsl:value-of select="comment"/>
</td>
<td>
<ul>
<xsl:for-each select="category/muscleGroup">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Logi
28.02.2011
XML loomine