]> matita.cs.unibo.it Git - helm.git/commitdiff
mk_meta_theory.xsl added
authorAndrea Asperti <andrea.asperti@unibo.it>
Fri, 29 Jun 2001 12:57:12 +0000 (12:57 +0000)
committerAndrea Asperti <andrea.asperti@unibo.it>
Fri, 29 Jun 2001 12:57:12 +0000 (12:57 +0000)
It generates a theory starting from metadata.

helm/style/mk_meta_theory.xsl [new file with mode: 0644]

diff --git a/helm/style/mk_meta_theory.xsl b/helm/style/mk_meta_theory.xsl
new file mode 100644 (file)
index 0000000..b33a3df
--- /dev/null
@@ -0,0 +1,218 @@
+<?xml version="1.0"?>
+
+<!-- Copyright (C) 2000, HELM Team                                     -->
+<!--                                                                   -->
+<!-- This file is part of HELM, an Hypertextual, Electronic            -->
+<!-- Library of Mathematics, developed at the Computer Science         -->
+<!-- Department, University of Bologna, Italy.                         -->
+<!--                                                                   -->
+<!-- HELM is free software; you can redistribute it and/or             -->
+<!-- modify it under the terms of the GNU General Public License       -->
+<!-- as published by the Free Software Foundation; either version 2    -->
+<!-- of the License, or (at your option) any later version.            -->
+<!--                                                                   -->
+<!-- HELM is distributed in the hope that it will be useful,           -->
+<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of    -->
+<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     -->
+<!-- GNU General Public License for more details.                      -->
+<!--                                                                   -->
+<!-- You should have received a copy of the GNU General Public License -->
+<!-- along with HELM; if not, write to the Free Software               -->
+<!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston,            -->
+<!-- MA  02111-1307, USA.                                              -->
+<!--                                                                   -->
+<!-- For details, see the HELM World-Wide-Web page,                    -->
+<!-- http://cs.unibo.it/helm/.                                         -->
+
+<xsl:stylesheet version="0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                              xmlns:ht="http://www.cs.unibo.it/helm/namespaces/helm-theory">
+
+<!-- ALL REQUIRED PARAMS ARE ALREADY DEFINED INSIDE links_library.xsl -->
+
+<!-- <xsl:import href="links_library.xsl"/> -->
+
+<xsl:template match="/">
+               <html> 
+                <head></head>
+                <body bgcolor="white">
+                <xsl:apply-templates/>
+                </body>
+               </html>
+</xsl:template>
+
+<xsl:template match="occurs">
+ <xsl:variable name="no_main" select="count(main)"/>
+ <xsl:variable name="no_concl" select="count(in_conclusion)"/>
+ <xsl:variable name="no_main_hyp" select="count(main_hypothesis)"/>
+ <xsl:variable name="no_in_hyp" select="count(in_hypothesis)"/>
+ <xsl:variable name="no_body" select="count(in_body)"/>
+ <h1>Occurrences of <xsl:value-of select="@who"/></h1>
+ <ul>
+       <xsl:if test="$no_main != 0">
+       <li><a href ="#main">Head position in conclusion 
+            (<xsl:value-of select="$no_main"/>)</a></li>
+       </xsl:if>
+       <xsl:if test="$no_concl != 0">
+       <li><a href ="#concl">In conclusion 
+            (<xsl:value-of select="$no_concl"/>)</a></li>
+       </xsl:if>
+       <xsl:if test="$no_main_hyp != 0">
+       <li><a href ="#main_hyp">Head position in some hypothesis
+            (<xsl:value-of select="$no_main_hyp"/>)</a></li>
+       </xsl:if>
+       <xsl:if test="$no_in_hyp != 0">
+       <li><a href ="#hyp">In hypotheses
+            (<xsl:value-of select="$no_in_hyp"/>)</a></li>
+       </xsl:if>
+       <xsl:if test="$no_body != 0">
+       <li><a href ="#body">In the body
+            (<xsl:value-of select="$no_body"/>)</a></li>
+       </xsl:if>
+ </ul>
+ <xsl:choose>
+  <xsl:when test="$no_main = 0"/>
+  <xsl:when test="15 > $no_main">
+   <h2><a name="main">Head position inside conclusion:</a></h2>
+   <xsl:for-each select="main">
+    <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+  <xsl:when test="$no_main >= 15">
+   <h2><a name="main">Head position inside conclusion:</a></h2>
+   <xsl:for-each select="main">
+    <div style="margin: 0cm 0cm 0cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+  <xsl:when test="$no_concl = 0"/>
+  <xsl:when test="15 > $no_concl">
+   <h2><a name="concl">Inside conclusion:</a></h2>
+   <xsl:for-each select="in_conclusion">
+    <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+  <xsl:when test="$no_main >= 15">
+   <h2><a name="concl">Inside conclusion:</a></h2>
+   <xsl:for-each select="in_conclusion">
+    <div style="margin: 0cm 0cm 0cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+ </xsl:choose>
+ <xsl:choose>
+  <xsl:when test="$no_main_hyp = 0"/>
+  <xsl:when test="15 > $no_main_hyp">
+   <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
+   <xsl:for-each select="main_hypothesis">
+    <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+  <xsl:when test="$no_main_hyp >= 15">
+   <h2><a name="main_hyp">Head position inside an hypothesis:</a></h2>
+   <xsl:for-each select="main_hypothesis">
+    <div style="margin: 0cm 0cm 0cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when> 
+ </xsl:choose>
+ <xsl:choose>
+  <xsl:when test="$no_in_hyp = 0"/>
+  <xsl:when test="15 > $no_in_hyp">
+   <h2><a name="hyp">Inside an hypothesis:</a></h2>
+   <xsl:for-each select="in_hypothesis">
+    <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+  <xsl:when test="$no_in_hyp >= 15">
+   <h2><a name="hyp">Inside an hypothesis:</a></h2>
+   <xsl:for-each select="in_hypothesis">
+    <div style="margin: 0cm 0cm 0cm 0.75cm">
+     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+    </div>
+   </xsl:for-each>
+  </xsl:when>
+ </xsl:choose>
+ <xsl:if test="in_body">
+  <h2><a name="body">Inside the body:</a></h2>
+  <xsl:for-each select="in_body">
+   <div style="margin: 0cm 0cm 0cm 0.75cm">
+    <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+   </div>
+  </xsl:for-each>
+ </xsl:if>
+</xsl:template>
+
+<!-- 
+<xsl:template match="occurs">
+ <xsl:if test="main">
+  <h2>Head position inside conclusion:</h2>
+  <xsl:for-each select="main">
+   <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+    <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+   </div>
+  </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="in_conclusion">
+  <h2>Inside conclusion:</h2>
+  <xsl:for-each select="in_conclusion">
+   <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+    <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+   </div>
+  </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="main_hypothesis">
+  <h2>Head position inside an hypothesis:</h2>
+  <xsl:for-each select="main_hypothesis">
+   <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+    <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+   </div>
+  </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="in_hypothesis">
+  <h2>Inside an hypothesis:</h2>
+  <xsl:for-each select="in_hypothesis">
+   <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
+    <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+   </div>
+  </xsl:for-each>
+ </xsl:if>
+ <xsl:if test="in_body">
+  <h2>Inside the body:</h2>
+  <xsl:for-each select="in_body">
+   <div style="margin: 0cm 0cm 0cm 0.75cm">
+    <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+   </div>
+  </xsl:for-each>
+ </xsl:if>
+</xsl:template>
+-->
+
+
+</xsl:stylesheet>
+
+
+
+
+
+
+
+
+
+
+
+
+