[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-usability
Subject: Re: konqueror usability report
From: Christoph Niemann <cnieman () suse ! de>
Date: 2003-06-27 11:01:17
[Download RAW message or body]
Hello,
> > Just one more thing: I'd like to start working on some of the
> > suggestions, but I'd like to discuss them on kfm-devel first. Is there
> > any easy way to convert the xml report file into something easier to
> > read?
>
> I hacked together some bad XSL to do this, and I can put that together with
> the report submission section of usability.k.o, but I recall that someone
> else had written some better XSL. Could whoever that was repost that XSL,
> and I'll try to incorporate it into the usability report viewing part of
> u.k.o?
I do not know your XSL or the older one that had already been posted. However,
I wrote a stylesheet for the usability reports. I'll post that albeit not
being the original poster of the former XSL. It has been tested with Mozilla
only.
ciao
Christoph
["usability-report.xsl" (text/xml)]
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Stylesheet for usability reports
Author: Christoph Niemann <cnieman@suse.de>
Date: 2003-06-27
Version: 0.1
-->
<xsl:template match="/">
<html><head/><body>
<xsl:apply-templates/>
</body></html>
</xsl:template>
<xsl:template match="report">
<div>
<xsl:attribute name="style">
text-transform: uppercase;
font-size: 18px</xsl:attribute>
<xsl:text>Usability Report: </xsl:text>
<span>
<xsl:attribute name="style">
text-transform: none;
font-size: 36px;
font-weight: bold</xsl:attribute>
<xsl:value-of select="application/@name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="application/@version"/>
</span>
</div>
<p>
<xsl:attribute name="style">margin-left: 3em</xsl:attribute>
<xsl:choose>
<xsl:when test="@date">
<xsl:text>Date: </xsl:text>
<xsl:value-of select="@date"/>
<br/>
</xsl:when>
</xsl:choose>
<xsl:call-template name="os"/>
<xsl:call-template name="interface"/>
<xsl:call-template name="author"/>
</p>
<xsl:apply-templates/>
</xsl:template>
<xsl:template name="author">
<xsl:for-each select="author">
<xsl:value-of select="@name"/>
<xsl:text> <</xsl:text>
<a>
<xsl:attribute name="href">mailto:<xsl:value-of
select="@email"/></xsl:attribute>
<xsl:value-of select="@email"/>
</a>
<xsl:text>></xsl:text>
<xsl:choose>
<xsl:when test="not(position()=last())">
<xsl:text>, </xsl:text>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template name="os">
<xsl:choose>
<xsl:when test="os">
<span>
<xsl:text>Operating System: </xsl:text>
<span>
<xsl:attribute name="style">font-weight: bold</xsl:attribute>
<xsl:value-of select="os/@name"/>
</span>
</span>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template name="interface">
<xsl:choose>
<xsl:when test="interface">
<span>
<xsl:text>, Interface: </xsl:text>
<span>
<xsl:attribute name="style">font-weight: bold</xsl:attribute>
<xsl:value-of select="interface/@name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="interface/@version"/>
</span>
</span>
<br/>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="issue">
<h2>
<xsl:choose>
<xsl:when test="@severity='low'">
<xsl:attribute name="style">
padding-left: 1em;
background-color: #7ff33f;
height: 1.2em;
margin-bottom: 0;
padding-top: 0.2em</xsl:attribute>
</xsl:when>
<xsl:when test="@severity='medium'">
<xsl:attribute name="style">
padding-left: 1em;
background-color: #e8ff3f;
margin-bottom: 0;
padding-top: 0.2em</xsl:attribute>
</xsl:when>
<xsl:when test="@severity='high'">
<xsl:attribute name="style">
padding-left: 1em;
background-color: #ff753f;
margin-bottom: 0;
padding-top:0.2em</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="color">black</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="title"/>
</h2>
<div>
<xsl:attribute name="style">
border-left: 2px solid black;
padding-top: 0.3em</xsl:attribute>
<span>
<xsl:attribute name="style">
border-bottom: 0.15em solid black;
padding-left: 1em;
padding-right:1em;
margin-top: 0;
margin-bottom: 0</xsl:attribute>
<xsl:text>Severity: </xsl:text>
<xsl:value-of select="@severity"/>
<xsl:choose>
<xsl:when test="@bugreference">
<xsl:text>, Bugreference: </xsl:text>
<xsl:value-of select="@bugreference"/>
</xsl:when>
</xsl:choose>
</span>
</div>
<div>
<xsl:attribute name="style">
margin-left: 3em;
padding-left: 1em;
padding-top: 0.1em;
margin-top: 0;
border-left: 0.15em solid black</xsl:attribute>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="issue/title"/>
<xsl:template match="issue/description">
<h3>Description</h3>
<xsl:attribute name="style">margin-top: 0</xsl:attribute>
<p>
<xsl:value-of select="."/>
</p>
</xsl:template>
<xsl:template match="issue/reproduction">
<h3>Reproduction</h3>
<ol>
<xsl:apply-templates/>
</ol>
</xsl:template>
<xsl:template match="reproduction/step">
<li>
<xsl:value-of select="."/>
</li>
</xsl:template>
<xsl:template match="solution">
<h3>Solution</h3>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="issue/solution/rationale">
<div>
<xsl:attribute name="style">margin-left: 1.5em</xsl:attribute>
<h4>Rationale</h4>
<xsl:value-of select="."/>
</div>
</xsl:template>
</xsl:stylesheet>
_______________________________________________
kde-usability mailing list
kde-usability@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-usability
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic