3 <!-- Copyright (C) 2000, HELM Team -->
5 <!-- This file is part of HELM, an Hypertextual, Electronic -->
6 <!-- Library of Mathematics, developed at the Computer Science -->
7 <!-- Department, University of Bologna, Italy. -->
9 <!-- HELM is free software; you can redistribute it and/or -->
10 <!-- modify it under the terms of the GNU General Public License -->
11 <!-- as published by the Free Software Foundation; either version 2 -->
12 <!-- of the License, or (at your option) any later version. -->
14 <!-- HELM is distributed in the hope that it will be useful, -->
15 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
16 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
17 <!-- GNU General Public License for more details. -->
19 <!-- You should have received a copy of the GNU General Public License -->
20 <!-- along with HELM; if not, write to the Free Software -->
21 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
22 <!-- MA 02111-1307, USA. -->
24 <!-- For details, see the HELM World-Wide-Web page, -->
25 <!-- http://cs.unibo.it/helm/. -->
27 <xsl:stylesheet version="1.0"
28 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
29 xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory"
30 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
31 xmlns:h="http://www.cs.unibo.it/helm/schemas/mattone.rdf#">
33 <xsl:template match="/">
36 <title>Occurrences of <xsl:value-of select="*/*/@rdf:about"/></title>
38 a { text-decoration: none }
39 a.underline {text-decoration: underline }
42 <!-- CSC: method onLoad to be removed once the window -->
43 <!-- CSC: becomes a frame -->
44 <body bgcolor="white" onLoad="window.focus()">
45 <xsl:apply-templates/>
50 <xsl:template match="h:Object">
51 <xsl:variable name="no_main"
52 select="count(*/h:Occurrence/h:position[text()='MainConclusion'])"/>
53 <xsl:variable name="no_concl"
54 select="count(*/h:Occurrence/h:position[text()='InConclusion'])"/>
55 <xsl:variable name="no_main_hyp"
56 select="count(*/h:Occurrence/h:position[text()='MainHypothesis'])"/>
57 <xsl:variable name="no_in_hyp"
58 select="count(*/h:Occurrence/h:position[text()='InHypothesis'])"/>
59 <xsl:variable name="no_body"
60 select="count(*/h:Occurrence/h:position[text()='InBody'])"/>
61 <h1>Occurrences of <xsl:value-of select="@rdf:about"/></h1>
64 <xsl:if test="$no_main != 0">
65 <li><a class="underline" href ="#main">Head position in conclusion
66 (<xsl:value-of select="$no_main"/>)</a></li>
68 <xsl:if test="$no_concl != 0">
69 <li><a class="underline" href ="#concl">In conclusion
70 (<xsl:value-of select="$no_concl"/>)</a></li>
72 <xsl:if test="$no_main_hyp != 0">
73 <li><a class="underline" href ="#main_hyp">Head position in some hypothesis
74 (<xsl:value-of select="$no_main_hyp"/>)</a></li>
76 <xsl:if test="$no_in_hyp != 0">
77 <li><a class="underline" href ="#hyp">In hypotheses
78 (<xsl:value-of select="$no_in_hyp"/>)</a></li>
80 <xsl:if test="$no_body != 0">
81 <li><a class="underline" href ="#body">In the body
82 (<xsl:value-of select="$no_body"/>)</a></li>
86 <xsl:when test="$no_main = 0"/>
87 <xsl:when test="15 > $no_main">
88 <h2><a name="main">Head position inside conclusion:</a></h2>
89 <xsl:for-each select="*/h:Occurrence[h:position/text()='MainConclusion']">
90 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
91 <ht:OBJECT uri="{h:occurrence}" mode="typeonly"/>
95 <xsl:when test="$no_main >= 15">
96 <h2><a name="main">Head position inside conclusion:</a></h2>
97 <xsl:for-each select="*/h:Occurrence[h:position/text()='MainConclusion']">
98 <div style="margin: 0cm 0cm 0cm 0.75cm">
99 <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>
105 <xsl:when test="$no_concl = 0"/>
106 <xsl:when test="15 > $no_concl">
107 <h2><a name="concl">Inside conclusion:</a></h2>
108 <xsl:for-each select="*/h:Occurrence[h:position/text()='InConclusion']">
109 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
110 <ht:OBJECT uri="{h:occurrence}" mode="typeonly"/>
114 <xsl:when test="$no_concl >= 15">
115 <h2><a name="concl">Inside conclusion:</a></h2>
116 <xsl:for-each select="*/h:Occurrence[h:position/text()='InConclusion']">
117 <div style="margin: 0cm 0cm 0cm 0.75cm">
118 <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>
124 <xsl:when test="$no_main_hyp = 0"/>
125 <xsl:when test="15 > $no_main_hyp">
126 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
127 <xsl:for-each select="*/h:Occurrence[h:position/text()='MainHypothesis']">
128 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
129 <ht:OBJECT uri="{h:occurrence}" mode="typeonly"/>
133 <xsl:when test="$no_main_hyp >= 15">
134 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
135 <xsl:for-each select="*/h:Occurrence[h:position/text()='MainHypothesis']">
136 <div style="margin: 0cm 0cm 0cm 0.75cm">
137 <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>
143 <xsl:when test="$no_in_hyp = 0"/>
144 <xsl:when test="15 > $no_in_hyp">
145 <h2><a name="hyp">Inside an hypothesis:</a></h2>
146 <xsl:for-each select="*/h:Occurrence[h:position/text()='InHypothesis']">
147 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
148 <ht:OBJECT uri="{h:occurrence}" mode="typeonly"/>
152 <xsl:when test="$no_in_hyp >= 15">
153 <h2><a name="hyp">Inside an hypothesis:</a></h2>
154 <xsl:for-each select="*/h:Occurrence[h:position/text()='InHypothesis']">
155 <div style="margin: 0cm 0cm 0cm 0.75cm">
156 <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>
161 <xsl:if test="$no_body > 0">
162 <h2><a name="body">Inside the body:</a></h2>
163 <xsl:for-each select="*/h:Occurrence[h:position/text()='InBody']">
164 <div style="margin: 0cm 0cm 0cm 0.75cm">
165 <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>