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"
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 <!-- CSC: method onLoad to be removed once the window -->
45 <!-- CSC: becomes a frame -->
46 <body bgcolor="white" onLoad="window.focus()">
47 <xsl:apply-templates/>
52 <xsl:template match="h:Object">
53 <xsl:variable name="no_main"
54 select="count(*/h:Occurrence[@rdf:about=$MainConclusion])"/>
55 <xsl:variable name="no_concl"
56 select="count(*/h:Occurrence[@rdf:about=$InConclusion])"/>
57 <xsl:variable name="no_main_hyp"
58 select="count(*/h:Occurrence[@rdf:about=$MainHypothesis])"/>
59 <xsl:variable name="no_in_hyp"
60 select="count(*/h:Occurrence[@rdf:about=$InHypothesis])"/>
61 <xsl:variable name="no_body"
62 select="count(*/h:Occurrence[@rdf:about=$InBody])"/>
63 <h1>Occurrences of <xsl:value-of select="@rdf:about"/></h1>
66 <xsl:if test="$no_main != 0">
67 <li><a href ="#main">Head position in conclusion
68 (<xsl:value-of select="$no_main"/>)</a></li>
70 <xsl:if test="$no_concl != 0">
71 <li><a href ="#concl">In conclusion
72 (<xsl:value-of select="$no_concl"/>)</a></li>
74 <xsl:if test="$no_main_hyp != 0">
75 <li><a href ="#main_hyp">Head position in some hypothesis
76 (<xsl:value-of select="$no_main_hyp"/>)</a></li>
78 <xsl:if test="$no_in_hyp != 0">
79 <li><a href ="#hyp">In hypotheses
80 (<xsl:value-of select="$no_in_hyp"/>)</a></li>
82 <xsl:if test="$no_body != 0">
83 <li><a href ="#body">In the body
84 (<xsl:value-of select="$no_body"/>)</a></li>
88 <xsl:when test="$no_main = 0"/>
89 <xsl:when test="15 > $no_main">
90 <h2><a name="main">Head position inside conclusion:</a></h2>
91 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainConclusion]">
92 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
93 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
97 <xsl:when test="$no_main >= 15">
98 <h2><a name="main">Head position inside conclusion:</a></h2>
99 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainConclusion]">
100 <div style="margin: 0cm 0cm 0cm 0.75cm">
101 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
107 <xsl:when test="$no_concl = 0"/>
108 <xsl:when test="15 > $no_concl">
109 <h2><a name="concl">Inside conclusion:</a></h2>
110 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InConclusion]">
111 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
112 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
116 <xsl:when test="$no_concl >= 15">
117 <h2><a name="concl">Inside conclusion:</a></h2>
118 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InConclusion]">
119 <div style="margin: 0cm 0cm 0cm 0.75cm">
120 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
126 <xsl:when test="$no_main_hyp = 0"/>
127 <xsl:when test="15 > $no_main_hyp">
128 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
129 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainHypothesis]">
130 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
131 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
135 <xsl:when test="$no_main_hyp >= 15">
136 <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
137 <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainHypothesis]">
138 <div style="margin: 0cm 0cm 0cm 0.75cm">
139 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
145 <xsl:when test="$no_in_hyp = 0"/>
146 <xsl:when test="15 > $no_in_hyp">
147 <h2><a name="hyp">Inside an hypothesis:</a></h2>
148 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InHypothesis]">
149 <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
150 <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
154 <xsl:when test="$no_in_hyp >= 15">
155 <h2><a name="hyp">Inside an hypothesis:</a></h2>
156 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InHypothesis]">
157 <div style="margin: 0cm 0cm 0cm 0.75cm">
158 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
163 <xsl:if test="$no_body > 0">
164 <h2><a name="body">Inside the body:</a></h2>
165 <xsl:for-each select="*/h:Occurrence[@rdf:about=$InBody]">
166 <div style="margin: 0cm 0cm 0cm 0.75cm">
167 <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>