Meeskond "ASP-tastic": Difference between revisions
From ICO wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
<item> | <item> | ||
<positionInList>1</positionInList> | <positionInList>1</positionInList> | ||
<excercise> | <excercise>Kükk</excercise> | ||
<series> | <series>3</series> | ||
<reps> | <reps>6-8</reps> | ||
<time></time> | <time></time> | ||
<weigth> | <weigth>90</weigth> | ||
<description> | <description>Korralik täiskükk</description> | ||
<comment> | <comment></comment> | ||
<category> | <category> | ||
<muscleGroup> | <muscleGroup>Reied</muscleGroup> | ||
<muscleGroup> | <muscleGroup>Sääred</muscleGroup> | ||
<muscleGroup>Alaselg</muscleGroup> | |||
</category> | </category> | ||
</item> | </item> | ||
<item> | <item> | ||
<positionInList>2</positionInList> | <positionInList>2</positionInList> | ||
<excercise> | <excercise>Jõutõmme</excercise> | ||
<series> | <series>4</series> | ||
<reps> | <reps>5</reps> | ||
<time></time> | <time></time> | ||
<weigth> | <weigth>120</weigth> | ||
<description> | <description></description> | ||
<comment>kerge</comment> | <comment>See nädal on kerge jõutõmme</comment> | ||
<category> | <category> | ||
<muscleGroup> | <muscleGroup>Alaselg</muscleGroup> | ||
<muscleGroup> | <muscleGroup>Kõik jalg</muscleGroup> | ||
<muscleGroup> | <muscleGroup>Trapetslihas</muscleGroup> | ||
</category> | </category> | ||
</item> | </item> | ||
Line 94: | Line 95: | ||
</source> | </source> | ||
==XSLT== | |||
<source lang="xml"> | |||
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> | |||
</source> | |||
==Logi== | ==Logi== | ||
===28.02.2011=== | ===28.02.2011=== | ||
XML loomine | XML loomine |
Revision as of 22:51, 1 March 2011
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