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="0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
28 xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory">
30 <!-- ALL REQUIRED PARAMS ARE ALREADY DEFINED INSIDE links_library.xsl -->
32 <!-- <xsl:import href="links_library.xsl"/> -->
34 <xsl:template match="/">
37 <title>Occurrences of <xsl:value-of select="occurs/@who"/></title>
39 <!-- CSC: method onLoad to be removed once the window -->
40 <!-- CSC: becomes a frame -->
41 <body bgcolor="white" onLoad="window.focus()">
42 <xsl:apply-templates/>
47 <xsl:template match="occurs">
48 <xsl:variable name="no_main" select="count(main)"/>
49 <xsl:variable name="no_concl" select="count(in_conclusion)"/>
50 <xsl:variable name="no_main_hyp" select="count(main_hypothesis)"/>
51 <xsl:variable name="no_in_hyp" select="count(in_hypothesis)"/>
52 <xsl:variable name="no_body" select="count(in_body)"/>
53 <h1>Occurrences of <xsl:value-of select="@who"/></h1>
56 <xsl:if test="$no_main != 0">
57 <li><a href ="#main">Head position in conclusion
58 (<xsl:value-of select="$no_main"/>)</a></li>
60 <xsl:if test="$no_concl != 0">
61 <li><a href ="#concl">In conclusion
62 (<xsl:value-of select="$no_concl"/>)</a></li>
64 <xsl:if test="$no_main_hyp != 0">
65 <li><a href ="#main_hyp">Head position in some hypothesis
66 (<xsl:value-of select="$no_main_hyp"/>)</a></li>
68 <xsl:if test="$no_in_hyp != 0">
69 <li><a href ="#hyp">In hypotheses
70 (<xsl:value-of select="$no_in_hyp"/>)</a></li>
72 <xsl:if test="$no_body != 0">
73 <li><a href ="#body">In the body
74 (<xsl:value-of select="$no_body"/>)</a></li>
78 <xsl:when test="$no_main = 0"/>
79 <xsl:when test="15 > $no_main">
80 <h2><a name="main">Head position inside conclusion:</a></h2>
81 <xsl:for-each select="main">
82 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
83 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
87 <xsl:when test="$no_main >= 15">
88 <h2><a name="main">Head position inside conclusion:</a></h2>
89 <xsl:for-each select="main">
90 <div style="margin: 0cm 0cm 0cm 0.75cm">
91 <ht:OBJECT uri="{@uri}" mode="linkonly"/>
97 <xsl:when test="$no_concl = 0"/>
98 <xsl:when test="15 > $no_concl">
99 <h2><a name="concl">Inside conclusion:</a></h2>
100 <xsl:for-each select="in_conclusion">
101 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
102 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
106 <xsl:when test="$no_concl >= 15">
107 <h2><a name="concl">Inside conclusion:</a></h2>
108 <xsl:for-each select="in_conclusion">
109 <div style="margin: 0cm 0cm 0cm 0.75cm">
110 <ht:OBJECT uri="{@uri}" mode="linkonly"/>
116 <xsl:when test="$no_main_hyp = 0"/>
117 <xsl:when test="15 > $no_main_hyp">
118 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
119 <xsl:for-each select="main_hypothesis">
120 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
121 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
125 <xsl:when test="$no_main_hyp >= 15">
126 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
127 <xsl:for-each select="main_hypothesis">
128 <div style="margin: 0cm 0cm 0cm 0.75cm">
129 <ht:OBJECT uri="{@uri}" mode="linkonly"/>
135 <xsl:when test="$no_in_hyp = 0"/>
136 <xsl:when test="15 > $no_in_hyp">
137 <h2><a name="hyp">Inside an hypothesis:</a></h2>
138 <xsl:for-each select="in_hypothesis">
139 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
140 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
144 <xsl:when test="$no_in_hyp >= 15">
145 <h2><a name="hyp">Inside an hypothesis:</a></h2>
146 <xsl:for-each select="in_hypothesis">
147 <div style="margin: 0cm 0cm 0cm 0.75cm">
148 <ht:OBJECT uri="{@uri}" mode="linkonly"/>
153 <xsl:if test="in_body">
154 <h2><a name="body">Inside the body:</a></h2>
155 <xsl:for-each select="in_body">
156 <div style="margin: 0cm 0cm 0cm 0.75cm">
157 <ht:OBJECT uri="{@uri}" mode="linkonly"/>
164 <xsl:template match="occurs">
166 <h2>Head position inside conclusion:</h2>
167 <xsl:for-each select="main">
168 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
169 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
173 <xsl:if test="in_conclusion">
174 <h2>Inside conclusion:</h2>
175 <xsl:for-each select="in_conclusion">
176 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
177 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
181 <xsl:if test="main_hypothesis">
182 <h2>Head position inside an hypothesis:</h2>
183 <xsl:for-each select="main_hypothesis">
184 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
185 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
189 <xsl:if test="in_hypothesis">
190 <h2>Inside an hypothesis:</h2>
191 <xsl:for-each select="in_hypothesis">
192 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
193 <ht:OBJECT uri="{@uri}" mode="typeonly"/>
197 <xsl:if test="in_body">
198 <h2>Inside the body:</h2>
199 <xsl:for-each select="in_body">
200 <div style="margin: 0cm 0cm 0cm 0.75cm">
201 <ht:OBJECT uri="{@uri}" mode="linkonly"/>