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/schema-h.rdf#">
33 <xsl:variable name="MainConclusion" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#MainConclusion'"/>
34 <xsl:variable name="InConclusion" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#InConclusion'"/>
35 <xsl:variable name="MainHypothesis" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#MainHypothesis'"/>
36 <xsl:variable name="InHypothesis" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#InHypothesis'"/>
37 <xsl:variable name="InBody" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#InBody'"/>
39 <xsl:template match="/">
42 <title>Occurrences of <xsl:value-of select="*/*/@rdf:value"/></title>
44 a { text-decoration: none }
45 a.underline {text-decoration: underline }
48 <!-- CSC: method onLoad to be removed once the window -->
49 <!-- CSC: becomes a frame -->
50 <body bgcolor="white" onLoad="window.focus()">
51 <xsl:apply-templates/>
56 <xsl:template match="h:Object">
57 <xsl:variable name="no_main"
58 select="count(*/h:Occurrence[@rdf:about=$MainConclusion])"/>
59 <xsl:variable name="no_concl"
60 select="count(*/h:Occurrence[@rdf:about=$InConclusion])"/>
61 <xsl:variable name="no_main_hyp"
62 select="count(*/h:Occurrence[@rdf:about=$MainHypothesis])"/>
63 <xsl:variable name="no_in_hyp"
64 select="count(*/h:Occurrence[@rdf:about=$InHypothesis])"/>
65 <xsl:variable name="no_body"
66 select="count(*/h:Occurrence[@rdf:about=$InBody])"/>
67 <h1>Occurrences of <xsl:value-of select="@rdf:about"/></h1>
70 <xsl:if test="$no_main != 0">
71 <li><a class="underline" href ="#main">Head position in conclusion
72 (<xsl:value-of select="$no_main"/>)</a></li>
74 <xsl:if test="$no_concl != 0">
75 <li><a class="underline" href ="#concl">In conclusion
76 (<xsl:value-of select="$no_concl"/>)</a></li>
78 <xsl:if test="$no_main_hyp != 0">
79 <li><a class="underline" href ="#main_hyp">Head position in some hypothesis
80 (<xsl:value-of select="$no_main_hyp"/>)</a></li>
82 <xsl:if test="$no_in_hyp != 0">
83 <li><a class="underline" href ="#hyp">In hypotheses
84 (<xsl:value-of select="$no_in_hyp"/>)</a></li>
86 <xsl:if test="$no_body != 0">
87 <li><a class="underline" href ="#body">In the body
88 (<xsl:value-of select="$no_body"/>)</a></li>
92 <xsl:when test="$no_main = 0"/>
93 <xsl:when test="15 > $no_main">
94 <h2><a name="main">Head position inside conclusion:</a></h2>
95 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainConclusion]">
96 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
97 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
101 <xsl:when test="$no_main >= 15">
102 <h2><a name="main">Head position inside conclusion:</a></h2>
103 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainConclusion]">
104 <div style="margin: 0cm 0cm 0cm 0.75cm">
105 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
111 <xsl:when test="$no_concl = 0"/>
112 <xsl:when test="15 > $no_concl">
113 <h2><a name="concl">Inside conclusion:</a></h2>
114 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InConclusion]">
115 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
116 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
120 <xsl:when test="$no_concl >= 15">
121 <h2><a name="concl">Inside conclusion:</a></h2>
122 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InConclusion]">
123 <div style="margin: 0cm 0cm 0cm 0.75cm">
124 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
130 <xsl:when test="$no_main_hyp = 0"/>
131 <xsl:when test="15 > $no_main_hyp">
132 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
133 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainHypothesis]">
134 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
135 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
139 <xsl:when test="$no_main_hyp >= 15">
140 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
141 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainHypothesis]">
142 <div style="margin: 0cm 0cm 0cm 0.75cm">
143 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
149 <xsl:when test="$no_in_hyp = 0"/>
150 <xsl:when test="15 > $no_in_hyp">
151 <h2><a name="hyp">Inside an hypothesis:</a></h2>
152 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InHypothesis]">
153 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
154 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
158 <xsl:when test="$no_in_hyp >= 15">
159 <h2><a name="hyp">Inside an hypothesis:</a></h2>
160 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InHypothesis]">
161 <div style="margin: 0cm 0cm 0cm 0.75cm">
162 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
167 <xsl:if test="$no_body > 0">
168 <h2><a name="body">Inside the body:</a></h2>
169 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InBody]">
170 <div style="margin: 0cm 0cm 0cm 0.75cm">
171 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>