]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/objcontent.xsl
Initial revision
[helm.git] / helm / style / objcontent.xsl
index b9f77cb82700afbf9cddabcb7b7669b59d3532a8..ceb7a22bacea1b6818a37540ac0ad87c09534d01 100644 (file)
 
 <!-- CIC OBJECTS -->
 
+<xsl:template match="Sequent">  <!-- For Sequents there are no annotations --> 
+    <Sequent helm:xref="{@id}" no="{@no}">
+     <xsl:for-each select="Decl|Def|Hidden">
+      <xsl:copy>
+       <xsl:attribute name="name">
+        <xsl:value-of select="@name"/>
+       </xsl:attribute>
+       <xsl:attribute name="helm:xref">
+        <xsl:value-of select="@id"/>
+       </xsl:attribute>
+       <xsl:apply-templates select="*[1]"/>
+      </xsl:copy>
+     </xsl:for-each>
+     <Goal>
+      <xsl:apply-templates select="Goal/*[1]"/>
+     </Goal>
+    </Sequent> 
+</xsl:template>
+
 <xsl:template match="Definition" mode="noannot">
     <Definition name="{@name}" helm:xref="{@id}">  
      <xsl:if test="string(@params) != &quot;&quot;">
       </xsl:otherwise>
      </xsl:choose> -->
      <body>
-      <xsl:apply-templates select="body/*"/>
+      <xsl:apply-templates select="body/*[1]"/>
      </body>
      <type>
-       <xsl:apply-templates select="type/*"/>
+       <xsl:apply-templates select="type/*[1]"/>
      </type>
     </Definition> 
 </xsl:template>
       </Params>
      </xsl:if>
      <type>
-       <xsl:apply-templates select="type/*"/>
+       <xsl:apply-templates select="type/*[1]"/>
      </type>
     </Axiom> 
 </xsl:template>
 <xsl:template match="CurrentProof" mode="noannot">
     <CurrentProof name="{@name}" helm:xref="{@id}">
      <xsl:for-each select="Conjecture">
-      <Conjecture no="./{@no}">
-        <xsl:apply-templates select="."/>
+      <Conjecture no="{@no}" helm:xref="{@id}">
+        <xsl:for-each select="*">
+         <xsl:copy>
+          <xsl:copy-of select="@name"/>
+          <xsl:attribute name="helm:xref">
+           <xsl:value-of select="@id"/>
+          </xsl:attribute>
+          <xsl:apply-templates select="*"/>
+         </xsl:copy>
+        </xsl:for-each>
       </Conjecture>
      </xsl:for-each>
      <body>
-       <xsl:apply-templates select="body/*"/>
+       <xsl:apply-templates select="body/*[1]"/>
      </body>
      <type>
-       <xsl:apply-templates select="type/*"/>
+       <xsl:apply-templates select="type/*[1]"/>
      </type>
     </CurrentProof> 
 </xsl:template>
     <Variable name="{@name}" helm:xref="{@id}">
      <xsl:if test="name(*[1])='body'">
       <body>
-       <xsl:apply-templates select="body/*"/>
+       <xsl:apply-templates select="body/*[1]"/>
       </body>
      </xsl:if>
      <type>
-       <xsl:apply-templates select="type/*"/>
+       <xsl:apply-templates select="type/*[1]"/>
      </type>
     </Variable> 
 </xsl:template>
 
 </xsl:stylesheet>
-
-
-
-
-
-