]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/ricerca.xsl
Initial revision
[helm.git] / helm / style / ricerca.xsl
diff --git a/helm/style/ricerca.xsl b/helm/style/ricerca.xsl
new file mode 100644 (file)
index 0000000..e0fa13a
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0"?>
+
+
+<xsl:stylesheet version="0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="html"/>
+
+
+<!--******************************************************************-->
+<!-- Variable containing the absolute path of the CIC file            -->
+<!--******************************************************************-->
+
+<xsl:variable name="absPath">http://localhost:8081/get?url=</xsl:variable>
+
+<xsl:template match="/">
+               <html> 
+                <head></head>
+                <body>
+                <xsl:apply-templates select="Theory"/>
+                </body>
+               </html>
+</xsl:template>
+
+
+<!-- CIC TERMS -->
+
+
+
+<xsl:template match="MUTIND[string(@uri)='cic:/coq/INIT/Logic/Equality/eq.ind']" mode="search" >
+<!-- <xsl:param name="current_uri" select=""/> -->
+<!-- <h1><xsl:value-of select="string(@uri)"/></h1> -->
+<!-- <xsl:if test="string(@uri)='cic:/coq/INIT/Logic/Equality/eq.ind'"> -->
+  <xsl:value-of select="$current_uri"/><BR/>
+<!-- </xsl:if> -->
+</xsl:template>
+
+<!-- AGGIUNGERE cic: alle uri nei file Theory -->
+
+<xsl:template match="Theory">
+<!-- <xsl:param name="current_uri" select=""/> -->
+ <xsl:apply-templates>
+  <xsl:with-param name="current_uri" select="string(@uri)"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="VARIABLE">
+<!-- <xsl:param name="current_uri" select=""/> -->
+<xsl:variable name="found" 
+  select="boolean(document(concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri)))//MUTIND[string(@uri)='cic:/coq/INIT/Logic/Equality/eq.ind'])"/>
+<xsl:if test="$found">
+  <xsl:value-of select="concat(string($current_uri),&quot;/&quot;,string(@uri),&quot;.xml&quot;)"/><BR/>
+</xsl:if>
+
+<!--   <xsl:with-param name="current_uri" select="concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri))"/>
+ </xsl:apply-templates> -->
+</xsl:template>
+
+<xsl:template match="DEFINITION">
+<!-- <xsl:param name="current_uri" select=""/> -->
+<!-- <xsl:apply-templates select="document(concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri)))" mode="search">
+  <xsl:with-param name="current_uri" select="concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri))"/>
+ </xsl:apply-templates> -->
+<xsl:variable name="found" 
+  select="boolean(document(concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri)))//MUTIND[string(@uri)='cic:/coq/INIT/Logic/Equality/eq.ind'])"/>
+<xsl:if test="$found">
+  <xsl:value-of select="concat(string($current_uri),&quot;/&quot;,string(@uri),&quot;.xml&quot;)"/><BR/>
+</xsl:if>
+</xsl:template>
+
+<xsl:template match="THEOREM">
+<!-- <xsl:param name="current_uri" select=""/> -->
+<!-- <xsl:apply-templates select="document(concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri)))" mode="search">
+  <xsl:with-param name="current_uri" select="concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri))"/>
+ </xsl:apply-templates> -->
+<xsl:variable name="found" 
+  select="boolean(document(concat(string($absPath),string($current_uri),&quot;/&quot;,string(@uri)))//MUTIND[string(@uri)='cic:/coq/INIT/Logic/Equality/eq.ind'])"/>
+<xsl:if test="$found">
+  <xsl:value-of select="concat(string($current_uri),&quot;/&quot;,string(@uri),&quot;.xml&quot;)"/><BR/>
+</xsl:if>
+</xsl:template>
+
+
+<xsl:template match="SECTION">
+<!-- <xsl:param name="current_uri" select=""/> -->
+ <xsl:apply-templates>
+  <xsl:with-param name="current_uri" select="concat($current_uri,&quot;/&quot;,string(@uri))"/>
+ </xsl:apply-templates>
+
+</xsl:template>
+
+</xsl:stylesheet>