]> matita.cs.unibo.it Git - helm.git/commitdiff
Porting to RDF syntax.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 24 Oct 2001 12:43:40 +0000 (12:43 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 24 Oct 2001 12:43:40 +0000 (12:43 +0000)
helm/style/mk_meta_theory.xsl

index e613553d24f4dba052415c7376f807bb2b52dc3b..70852ca9800f0c93f4f01e9d6f2e9a0f2844eec6 100644 (file)
 <!-- 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">
+<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"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:h="http:/www.cs.unibo.it/helm/schemas/schema-h.rdf#">
 
-<!-- ALL REQUIRED PARAMS ARE ALREADY DEFINED INSIDE links_library.xsl -->
-
-<!-- <xsl:import href="links_library.xsl"/> -->
+<xsl:variable name="MainConclusion" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#MainConclusion'"/>
+<xsl:variable name="InConclusion" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#InConclusion'"/>
+<xsl:variable name="MainHypothesis" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#MainHypothesis'"/>
+<xsl:variable name="InHypothesis" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#InHypothesis'"/>
+<xsl:variable name="InBody" select="'http://www.cs.unibo.it/helm/schemas/schema-h.rdf#InBody'"/>
 
 <xsl:template match="/">
                <html> 
                 <head>
-                 <title>Occurrences of <xsl:value-of select="occurs/@who"/></title>
+                 <title>Occurrences of <xsl:value-of select="*/*/@rdf:value"/></title>
                 </head>
                 <!-- CSC: method onLoad to be removed once the window -->
                 <!-- CSC: becomes a frame                              -->
                </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>
+<xsl:template match="h:Object">
+ <xsl:variable name="no_main"
+   select="count(*/h:Occurrence[@rdf:about=$MainConclusion])"/>
+ <xsl:variable name="no_concl"
+   select="count(*/h:Occurrence[@rdf:about=$InConclusion])"/>
+ <xsl:variable name="no_main_hyp"
+   select="count(*/h:Occurrence[@rdf:about=$MainHypothesis])"/>
+ <xsl:variable name="no_in_hyp"
+   select="count(*/h:Occurrence[@rdf:about=$InHypothesis])"/>
+ <xsl:variable name="no_body"
+   select="count(*/h:Occurrence[@rdf:about=$InBody])"/>
+ <h1>Occurrences of <xsl:value-of select="@rdf:about"/></h1>
  
  <ul>
        <xsl:if test="$no_main != 0">
   <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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainConclusion]">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+     <ht:OBJECT uri="{@rdf:value}" 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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainConclusion]">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
     </div>
    </xsl:for-each>
   </xsl:when>
   <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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$InConclusion]">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+     <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
     </div>
    </xsl:for-each>
   </xsl:when>
   <xsl:when test="$no_concl >= 15">
    <h2><a name="concl">Inside conclusion:</a></h2>
-   <xsl:for-each select="in_conclusion">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$InConclusion]">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
     </div>
    </xsl:for-each>
   </xsl:when>
   <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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainHypothesis]">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+     <ht:OBJECT uri="{@rdf:value}" 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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$MainHypothesis]">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
     </div>
    </xsl:for-each>
   </xsl:when> 
   <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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$InHypothesis]">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="typeonly"/>
+     <ht:OBJECT uri="{@rdf:value}" 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">
+   <xsl:for-each select="*/h:Occurrence[@rdf:about=$InHypothesis]">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
     </div>
    </xsl:for-each>
   </xsl:when>
  </xsl:choose>
- <xsl:if test="in_body">
+ <xsl:if test="$no_body > 0">
   <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">
+  <xsl:for-each select="*/h:Occurrence[@rdf:about=$InBody]">
    <div style="margin: 0cm 0cm 0cm 0.75cm">
-    <ht:OBJECT uri="{@uri}" mode="linkonly"/>
+    <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
    </div>
   </xsl:for-each>
  </xsl:if>
 </xsl:template>
--->
-
 
 </xsl:stylesheet>