DevHelpVR: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 260: | Line 260: | ||
===XSLT 2=== | ===XSLT 2=== | ||
XSLT => XML | |||
<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="xml" indent="yes"/> | |||
<xsl:template match="/"> | |||
<userstories> | |||
<total_userstories> | |||
<xsl:value-of select="count(/projects/project/iterations/iteration/userstories/userstory)"/> | |||
</total_userstories> | |||
<sum_userpoints> | |||
<xsl:value-of select="sum(/projects/project/iterations/iteration/userstories/userstory/@story_points)"/> | |||
</sum_userpoints> | |||
<xsl:for-each select="/projects/project/iterations/iteration/userstories/userstory"> | |||
<xsl:sort select="@story_points" order="ascending"/> | |||
<userstory id ="{@id}" story_points ="{@story_points}" story_status ="{@story_status}"> | |||
<total></total> | |||
<xsl:value-of select="name"/> - <xsl:value-of select="description"/> | |||
</userstory> | |||
</xsl:for-each> | |||
</userstories> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
=Retsensioonid= | =Retsensioonid= |
Revision as of 20:41, 19 March 2017
Meeskond
Martin Jääger
Kristo Leemets
Idee
Idee põhineb varasemalt C# aines loodud DevHelp rakendusel. Rakendus aitab arendajatel oma tööd paremini planeerida. Seekord on eesmärgiks aga saada see tööle võrgus kasutatavana.
Projekt
XML
XML
Projektid koos iteratsioonide ja kasutajalugudega.
<?xml version="1.0" encoding="utf-8" ?>
<projects>
<project id="1">
<name>
<![CDATA[Koduleht firmale Test OÜ]]>
</name>
<description>
<![CDATA[Projekti kirjeldus]]>
</description>
<iterations>
<iteration id ="1" start_date="11.03.17" end_date="18.03.17">
<name>
<![CDATA[Iteratsioon 1]]>
</name>
<description>
<![CDATA[Iteratsiooni 1 lisatakse kõik kasutajalood, mis on keerulisemad ning mis nõuavad rohkem aega]]>
</description>
<userstories>
<userstory id="1" story_points="2" story_status="1">
<name>
<![CDATA[Sisselogimisaken]]>
</name>
<description>
<![CDATA[Sisselogimisakna tegemine]]>
</description>
</userstory>
<userstory id="2" story_points="1" story_status="0">
<name>
<![CDATA[Formaadid]]>
</name>
<description>
<![CDATA[Formaatide loomine]]>
</description>
</userstory>
</userstories>
</iteration>
<iteration id ="2" start_date="20.03.17" end_date="27.03.17">
<name>
<![CDATA[Iteratsioon 2]]>
</name>
<description>
<![CDATA[Iteratsioonis 2 tegeletakse peamiselt UI-ga]]>
</description>
<userstories>
<userstory id="3" story_points="4" story_status="1">
<name>
<![CDATA[Kasutajamenüü]]>
</name>
<description>
<![CDATA[Kasutajamenüü loomine]]>
</description>
</userstory>
<userstory id="4" story_points="6" story_status="0">
<name>
<![CDATA[Menüü]]>
</name>
<description>
<![CDATA[Menüü UI tegemine]]>
</description>
</userstory>
</userstories>
</iteration>
</iterations>
</project>
<project id="2">
<name>
<![CDATA[Laohaldusprogramm Ladu OÜ-le]]>
</name>
<description>
<![CDATA[Projekti 2 kirjeldus]]>
</description>
<iterations>
<iteration id ="3" start_date="11.06.17" end_date="18.06.17">
<name>
<![CDATA[Iteratsioon 1]]>
</name>
<description>
<![CDATA[Laohaldusprogrammi esmase versiooni loomine]]>
</description>
<userstories>
<userstory id="5" story_points="3" story_status="1">
<name>
<![CDATA[Kaupade sisestamine]]>
</name>
<description>
<![CDATA[Kaupade sisestamine lattu]]>
</description>
</userstory>
<userstory id="6" story_points="2" story_status="0">
<name>
<![CDATA[Valikumenüü]]>
</name>
<description>
<![CDATA[Valikumenüü riba]]>
</description>
</userstory>
</userstories>
</iteration>
<iteration id ="4" start_date="20.05.17" end_date="27.05.17">
<name>
<![CDATA[Iteratsioon 2]]>
</name>
<description>
<![CDATA[User Interface korrastamine]]>
</description>
<userstories>
<userstory id="7" story_points="3" story_status="1">
<name>
<![CDATA[Kauba kustutamine]]>
</name>
<description>
<![CDATA[Kauba kustutamise funktsioon]]>
</description>
</userstory>
<userstory id="8" story_points="5" story_status="0">
<name>
<![CDATA[UI konfigureerimise funktsioon]]>
</name>
<description>
<![CDATA[UI konfigureerimise funktsiooni lisamine]]>
</description>
</userstory>
</userstories>
</iteration>
</iterations>
</project>
</projects>
XML schema (XSD)
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="projects">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="project">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="description" type="xs:string" />
<xs:element name="iterations">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="iteration">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="description" type="xs:string" />
<xs:element name="userstories">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="userstory">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" />
<xs:element name="description" type="xs:string" />
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required" />
<xs:attribute name="story_points" type="xs:integer" use="required" />
<xs:attribute name="story_status" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required" />
<xs:attribute name="start_date" type="xs:string" use="required" />
<xs:attribute name="end_date" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:integer" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSLT 1
XSLT => HTML
<?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>Projektid</title>
</head>
<body>
<h1>Käesolevad projektid</h1>
<xsl:for-each select="/projects/project">
<h2>
<xsl:value-of select="name"/>
</h2>
<ul>
<xsl:for-each select ="iterations/iteration">
<li>
<xsl:value-of select="name"/>, alates
<xsl:value-of select="@start_date"/> kuni <xsl:value-of select="@end_date"/>
<ul>
<xsl:for-each select ="userstories/userstory">
<li>
<xsl:value-of select="name"/>
<ul>
<li>
Kirjeldus:
<xsl:value-of select="description"/>
</li>
<li>
ID:
<xsl:value-of select="@id"/>
</li>
<li>
Story pointid:
<xsl:value-of select="@story_points"/>
</li>
<li>
Staatus:
<xsl:value-of select="@story_status"/>
</li>
</ul>
</li>
</xsl:for-each>
</ul>
</li>
</xsl:for-each>
</ul>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
XSLT 2
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="xml" indent="yes"/>
<xsl:template match="/">
<userstories>
<total_userstories>
<xsl:value-of select="count(/projects/project/iterations/iteration/userstories/userstory)"/>
</total_userstories>
<sum_userpoints>
<xsl:value-of select="sum(/projects/project/iterations/iteration/userstories/userstory/@story_points)"/>
</sum_userpoints>
<xsl:for-each select="/projects/project/iterations/iteration/userstories/userstory">
<xsl:sort select="@story_points" order="ascending"/>
<userstory id ="{@id}" story_points ="{@story_points}" story_status ="{@story_status}">
<total></total>
<xsl:value-of select="name"/> - <xsl:value-of select="description"/>
</userstory>
</xsl:for-each>
</userstories>
</xsl:template>
</xsl:stylesheet>