@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version= "1.0" xmlns:xsl= "http://www.w3.org/1999/XSL/Transform" >
<xsl:output method= "xml" encoding= "UTF-8" indent= "yes" />
<xsl:import href= "../../fsfe.xsl" />
<xsl:output method= "html" encoding= "utf-8" indent= "yes" doctype-system= "about:legacy-compat" />
<!-- Fill dynamic index -->
<xsl:template match= "dynamic-index" >
<xsl:for-each select= "/html /set/buglist" >
<xsl:for-each select= "/buildinfo/document /set/buglist" >
<xsl:sort select= "@country" />
<xsl:variable name= "country" >
@ -18,7 +19,7 @@
<xsl:text > #</xsl:text>
<xsl:value-of select= "$country" />
</xsl:attribute>
<xsl:value-of select= "/html /set/country[@id=$country]" />
<xsl:value-of select= "/buildinfo/document /set/country[@id=$country]" />
</xsl:element>
</xsl:element>
@ -29,11 +30,11 @@
<!-- fill in global figures -->
<xsl:variable name= "solved" >
<xsl:value-of select= "count( /html /set/buglist/bug[@closed != ''] )" />
<xsl:value-of select= "count( /buildinfo/document /set/buglist/bug[@closed != ''] )" />
</xsl:variable>
<xsl:variable name= "total" >
<xsl:value-of select= "count( /html /set/buglist/bug )" />
<xsl:value-of select= "count( /buildinfo/document /set/buglist/bug )" />
</xsl:variable>
<xsl:template match= "solved" >
@ -49,18 +50,18 @@
</xsl:template>
<!-- <xsl:key name="indivs - by - name" match="/html /set/buglist/bug/@name" use="normalize - space(.)" />
<xsl:key name= "groups-by-name" match= "/html /set/buglist/bug/@group" use= "normalize-space(.)" /> -->
<!-- <xsl:key name="indivs - by - name" match="/buildinfo/document /set/buglist/bug/@name" use="normalize - space(.)" />
<xsl:key name= "groups-by-name" match= "/buildinfo/document /set/buglist/bug/@group" use= "normalize-space(.)" /> -->
<!-- Fill dynamic content -->
<xsl:template match= "dynamic-content" >
<!-- <xsl:value - of select="count( /html /set/buglist/bug[@closed != ''] ) " /><br/>
<xsl:value-of select= "count( /html /set/buglist/bug ) " /> <br />
<xsl:value-of select= "floor( count(/html/set/buglist/bug[@closed != '']) div count( /html /set/buglist/bug ) * 100)" /> <br />
<!-- <xsl:value - of select="count( /buildinfo/document /set/buglist/bug[@closed != ''] ) " /><br/>
<xsl:value-of select= "count( /buildinfo/document /set/buglist/bug ) " /> <br />
<xsl:value-of select= "floor( count(/buildinfo/document/set/buglist/bug[@closed != '']) div count( /buildinfo/document /set/buglist/bug ) * 100)" /> <br />
-->
<xsl:for-each select= "/html /set/buglist" >
<xsl:for-each select= "/buildinfo/document /set/buglist" >
<xsl:sort select= "@country" />
<xsl:variable name= "country" >
@ -72,24 +73,24 @@
<xsl:attribute name= "id" >
<xsl:value-of select= "$country" />
</xsl:attribute>
<xsl:value-of select= "/html /set/country[@id=$country]" />
<xsl:variable name= "nbsolved" select= "count( /html /set/buglist[@country=$country]/bug[@closed != ''] )" />
<xsl:variable name= "nbinst" select= "count( /html /set/buglist[@country=$country]/bug )" />
<xsl:value-of select= "/buildinfo/document /set/country[@id=$country]" />
<xsl:variable name= "nbsolved" select= "count( /buildinfo/document /set/buglist[@country=$country]/bug[@closed != ''] )" />
<xsl:variable name= "nbinst" select= "count( /buildinfo/document /set/buglist[@country=$country]/bug )" />
(<xsl:value-of select= "$nbsolved" /> /<xsl:value-of select= "$nbinst" /> = <xsl:value-of select= "floor($nbsolved div $nbinst * 100)" /> %)
</xsl:element>
<!-- Table header -->
<xsl:element name= "table" >
<xsl:element name= "tr" >
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='institution-name']" /> </xsl:element>
<!-- <xsl:element name="th"><xsl:value - of select="/html /text[@id='institution - address']"/></xsl:element> -->
<!-- <xsl:element name="th"><xsl:value - of select="/html /text[@id='institution - url']"/></xsl:element> -->
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='opened']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='closed']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='name']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='group']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='closedby']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/html /text[@id='comment']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='institution-name']" /> </xsl:element>
<!-- <xsl:element name="th"><xsl:value - of select="/buildinfo/document /text[@id='institution - address']"/></xsl:element> -->
<!-- <xsl:element name="th"><xsl:value - of select="/buildinfo/document /text[@id='institution - url']"/></xsl:element> -->
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='opened']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='closed']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='name']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='group']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='closedby']" /> </xsl:element>
<xsl:element name= "th" > <xsl:value-of select= "/buildinfo/document /text[@id='comment']" /> </xsl:element>
</xsl:element>
<!-- Table rows -->
@ -103,7 +104,7 @@
<xsl:attribute name= "href" >
<xsl:value-of select= "@institution-url" />
</xsl:attribute>
<xsl:value-of select= "@institution-name" /> <!-- <xsl:value - of select="/html /text[@id='link']"/> -->
<xsl:value-of select= "@institution-name" /> <!-- <xsl:value - of select="/buildinfo/document /text[@id='link']"/> -->
</xsl:element>
</xsl:element>
<xsl:comment > <xsl:element name= "td" > <xsl:value-of select= "translate(@institution-address, '-', 'โ' )" /> </xsl:element> </xsl:comment>
@ -121,19 +122,19 @@
<!-- List of participants -->
<!--
<xsl:value-of select= "count(/html /set/buglist/bug/@group[ generate-id() = generate-id(key('groups-by-name', normalize-space(.))) ])" />
<xsl:value-of select= "count(/buildinfo/document /set/buglist/bug/@group[ generate-id() = generate-id(key('groups-by-name', normalize-space(.))) ])" />
<xsl:element name= "ul" >
<xsl:for-each select= " /html /set/buglist/bug/@group[ generate-id() = generate-id(key('groups-by-name', normalize-space(.))) ] " >
<xsl:sort select= "count( /html /set/buglist/bug/@name = . )" data-type= "number" />
<xsl:for-each select= " /buildinfo/document /set/buglist/bug/@group[ generate-id() = generate-id(key('groups-by-name', normalize-space(.))) ] " >
<xsl:sort select= "count( /buildinfo/document /set/buglist/bug/@name = . )" data-type= "number" />
<xsl:variable name= "name" select= "." />
<xsl:if test= "position() <= 5" >
<xsl:element name= "li" >
<xsl:value-of select= "count( /html /set/buglist/bug[@group=$name] )" />
<xsl:value-of select= "count( /buildinfo/document /set/buglist/bug[@group=$name] )" />
<xsl:text > -</xsl:text>
<xsl:value-of select= "$name" />
</xsl:element>
@ -147,14 +148,4 @@
</xsl:template>
<!-- Do not copy <set> and <text> to output at all -->
<xsl:template match= "set | tags" />
<!-- For all other nodes, copy verbatim -->
<xsl:template match= "@*|node()" priority= "-1" >
<xsl:copy >
<xsl:apply-templates select= "@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>