]> matita.cs.unibo.it Git - helm.git/commitdiff
Porting to the new metadata DTD.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 31 Oct 2002 10:59:33 +0000 (10:59 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 31 Oct 2002 10:59:33 +0000 (10:59 +0000)
helm/style/mk_meta_theory.xsl

index 3a07962a920fade8a8d414cd0d4e4dd265bac3f1..e433c4b26fe93825c6e3cc70c49ce79db9aac933 100644 (file)
    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#">
-
-<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'"/>
+   xmlns:h="http://www.cs.unibo.it/helm/schemas/mattone.rdf#">
 
 <xsl:template match="/">
                <html> 
                 <head>
-                 <title>Occurrences of <xsl:value-of select="*/*/@rdf:value"/></title>
+                 <title>Occurrences of <xsl:value-of select="*/*/@rdf:about"/></title>
                  <style>
                   a { text-decoration: none }
                   a.underline {text-decoration: underline }
                  </style>
                 </head>
                 <!-- CSC: method onLoad to be removed once the window -->
-                <!-- CSC: becomes a frame                              -->
+                <!-- CSC: becomes a frame                             -->
                 <body bgcolor="white" onLoad="window.focus()">
                 <xsl:apply-templates/>
                 </body>
 
 <xsl:template match="h:Object">
  <xsl:variable name="no_main"
-   select="count(*/h:Occurrence[@rdf:about=$MainConclusion])"/>
+   select="count(*/h:Occurrence/h:position[text()='MainConclusion'])"/>
  <xsl:variable name="no_concl"
-   select="count(*/h:Occurrence[@rdf:about=$InConclusion])"/>
+   select="count(*/h:Occurrence/h:position[text()='InConclusion'])"/>
  <xsl:variable name="no_main_hyp"
-   select="count(*/h:Occurrence[@rdf:about=$MainHypothesis])"/>
+   select="count(*/h:Occurrence/h:position[text()='MainHypothesis'])"/>
  <xsl:variable name="no_in_hyp"
-   select="count(*/h:Occurrence[@rdf:about=$InHypothesis])"/>
+   select="count(*/h:Occurrence/h:position[text()='InHypothesis'])"/>
  <xsl:variable name="no_body"
-   select="count(*/h:Occurrence[@rdf:about=$InBody])"/>
+   select="count(*/h:Occurrence/h:position[text()='InBody'])"/>
  <h1>Occurrences of <xsl:value-of select="@rdf:about"/></h1>
  
  <ul>
   <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="*/h:Occurrence[@rdf:about=$MainConclusion]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='MainConclusion']">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$MainConclusion]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='MainConclusion']">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$InConclusion]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='InConclusion']">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$InConclusion]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='InConclusion']">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$MainHypothesis]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='MainHypothesis']">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$MainHypothesis]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='MainHypothesis']">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$InHypothesis]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='InHypothesis']">
     <div style="margin: 0.25cm 0cm 0.25cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="typeonly"/>
+     <ht:OBJECT uri="{h:occurrence}" 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="*/h:Occurrence[@rdf:about=$InHypothesis]">
+   <xsl:for-each select="*/h:Occurrence[h:position/text()='InHypothesis']">
     <div style="margin: 0cm 0cm 0cm 0.75cm">
-     <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
+     <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>
     </div>
    </xsl:for-each>
   </xsl:when>
  </xsl:choose>
  <xsl:if test="$no_body > 0">
   <h2><a name="body">Inside the body:</a></h2>
-  <xsl:for-each select="*/h:Occurrence[@rdf:about=$InBody]">
+  <xsl:for-each select="*/h:Occurrence[h:position/text()='InBody']">
    <div style="margin: 0cm 0cm 0cm 0.75cm">
-    <ht:OBJECT uri="{@rdf:value}" mode="linkonly"/>
+    <ht:OBJECT uri="{h:occurrence}" mode="linkonly"/>
    </div>
   </xsl:for-each>
  </xsl:if>