home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 December
/
PCWorld_2003-12_cd.bin
/
Software
/
komercni
/
alc
/
ep2sr51csy.msi
/
Ep.CAB
/
report.xsl
< prev
next >
Wrap
Extensible Markup Language
|
2002-02-25
|
4KB
|
136 lines
<?xml version='1.0' encoding="windows-1250" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:for-each select="report">
<h1><xsl:value-of select="title"/></h1>
<table width="100%">
<tr>
<td>Datum: <xsl:value-of select="date"/></td>
<td>U₧ivatel: <xsl:value-of select="user"/></td>
</tr>
</table>
<br/>
<table><tbody><tr><td>
<xsl:for-each select="group">
<xsl:if test="title">
<table width="100%" cellspacing="0" cellpadding="0"><tbody><tr>
<td style="cursor:hand" onclick="ToggleGroup(this)">
<img id="toggle"/>
</td>
<td> </td>
<td width="100%">
<xsl:for-each select="title">
<b><xsl:value-of select="label"/>:</b> <xsl:value-of select="value"/><br/>
</xsl:for-each>
</td>
</tr></tbody></table>
</xsl:if>
<table class="Frame" cellspacing="0" width="100%">
<xsl:apply-templates select="head/row"/>
<xsl:apply-templates select="body/row" order-by="x"/><!-- order-by="column[0]/item" -->
<xsl:apply-templates select="tail/row"/>
<xsl:if test="count">
<tr>
<td class="foot">
<xsl:attribute name="colspan"><xsl:eval>GetColumnCount(this)</xsl:eval></xsl:attribute>
<b>poΦet:</b> <xsl:value-of select="count"/>
</td>
</tr>
</xsl:if>
</table>
<br/>
</xsl:for-each>
</td></tr></tbody></table>
</xsl:for-each>
</xsl:template>
<xsl:template match="row">
<tr>
<xsl:apply-templates select="column"/>
</tr>
</xsl:template>
<xsl:template match="column">
<td class="Frame">
<xsl:eval>g_itemcnt=0,""</xsl:eval>
<xsl:for-each select="item" order-by="item">
<xsl:if expr="g_itemcnt>0">
<br/>
</xsl:if>
<xsl:apply-templates select="."/>
<xsl:if test=".[.='']"> </xsl:if>
<xsl:eval>g_itemcnt++,""</xsl:eval>
</xsl:for-each>
<xsl:if expr="g_itemcnt==0"> </xsl:if>
</td>
</xsl:template>
<xsl:template match="head/row/column">
<td class="head" align="center" style="cursor:hand"
onmouseover="window.status='Klikn∞te - se°azenφ'" onmouseout="window.status=''">
<xsl:attribute name="onclick">javascript:sort(<xsl:eval>formatNumber(childNumber(this)-1,"0")</xsl:eval>)</xsl:attribute>
<div style="color:black"><b>
<xsl:apply-templates select="item"/>
</b></div>
</td>
</xsl:template>
<xsl:template match="tail/row/column">
<td class="foot">
<xsl:eval>g_itemcnt=0,""</xsl:eval>
<xsl:for-each select="item|sum|min|max|avg|count">
<xsl:if expr="g_itemcnt>0">
<br/>
</xsl:if>
<xsl:apply-templates select="."/>
<xsl:eval>g_itemcnt++,""</xsl:eval>
</xsl:for-each>
<xsl:if expr="g_itemcnt==0">
</xsl:if>
</td>
</xsl:template>
<xsl:template match="item">
<xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="sum">
souΦet: <xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="avg">
pr∙m∞r: <xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="min">
min: <xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="max">
max: <xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="count">
poΦet: <xsl:apply-templates select="text()"/>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
<xsl:script><![CDATA[
var g_itemcnt;
function GetColumnCount(eGroup) {
nlist=eGroup.selectNodes("head/row/column");
return formatNumber(nlist.length,"0");
}
]]></xsl:script>
</xsl:stylesheet>