]> matita.cs.unibo.it Git - helm.git/blob - helm/papers/use_case/stats/extract.xsl
ocaml 3.09 transition
[helm.git] / helm / papers / use_case / stats / extract.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <xsl:stylesheet version="1.0"
4                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5                  xmlns:html="http://www.w3.org/1999/xhtml"
6                  xmlns:xlink="http://www.w3.org/1999/xlink"
7                  xmlns:m="http://www.w3.org/1998/Math/MathML"
8                  xmlns:box="http://helm.cs.unibo.it/2003/BoxML"
9 >
10
11 <xsl:param name="uri" select="''"/>
12
13 <xsl:output method="text"/>
14
15 <xsl:template match="/">
16  <xsl:choose>
17   <xsl:when test="$uri=''">
18    <xsl:apply-templates select="statistics/stats"/>
19   </xsl:when>
20   <xsl:otherwise>
21    <xsl:apply-templates select="statistics/stats[@for=$uri]"/>
22   </xsl:otherwise>
23  </xsl:choose>
24 </xsl:template>
25
26 <xsl:template match="stats">
27   <xsl:value-of select="@for"/>
28   <xsl:text> </xsl:text>
29   <xsl:value-of select="size"/>
30   <xsl:text> </xsl:text>
31   <xsl:value-of select="number(elements/total) + number(text-nodes/total)"/>
32   <xsl:text> </xsl:text>
33   <xsl:value-of select="depth/max"/>
34   <xsl:text>
35 </xsl:text>
36 </xsl:template>
37
38 </xsl:stylesheet>
39