]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/matita/xsl/papers2xhtml.xsl
added support for displaying the list of papers related to matita in the documentatio...
[helm.git] / helm / www / matita / xsl / papers2xhtml.xsl
diff --git a/helm/www/matita/xsl/papers2xhtml.xsl b/helm/www/matita/xsl/papers2xhtml.xsl
new file mode 100644 (file)
index 0000000..f0f278c
--- /dev/null
@@ -0,0 +1,70 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:output omit-xml-declaration="yes" />
+
+  <xsl:template match="papers">
+    <ul>
+      <xsl:apply-templates />
+    </ul>
+  </xsl:template>
+
+  <xsl:template match="paper">
+    <li class="paper">
+      <xsl:apply-templates select="authors" />
+      <br />
+      <xsl:apply-templates select="title" />
+      <xsl:element name="a">
+       <xsl:attribute name="class">paper_download</xsl:attribute>
+       <xsl:attribute name="href">
+         <xsl:text>papers/</xsl:text>
+         <xsl:value-of select="@name" />
+         <xsl:text>.pdf</xsl:text>
+       </xsl:attribute>
+       <span class="pdf_logo">.pdf</span>
+      </xsl:element>
+      <xsl:element name="a">
+       <xsl:attribute name="class">paper_download</xsl:attribute>
+       <xsl:attribute name="href">
+         <xsl:text>papers/</xsl:text>
+         <xsl:value-of select="@name" />
+         <xsl:text>.ps</xsl:text>
+       </xsl:attribute>
+       <span class="ps_logo">.ps</span>
+      </xsl:element>
+      <br />
+      <xsl:apply-templates select="info" />
+      <br />
+      <xsl:apply-templates select="abstract" />
+    </li>
+  </xsl:template>
+
+  <xsl:template match="authors">
+    <span class="paper_author">
+      <xsl:for-each select="author">
+       <xsl:apply-templates />
+       <xsl:if test="position()!=last()">
+         <xsl:text>, </xsl:text>
+       </xsl:if>
+      </xsl:for-each>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="title">
+    <span class="paper_title">
+      <xsl:apply-templates />
+    </span>
+  </xsl:template>
+
+  <xsl:template match="info">
+    <span class="paper_info">
+      <xsl:apply-templates />
+    </span>
+  </xsl:template>
+
+  <xsl:template match="abstract">
+    <span class="paper_abstract">
+      <xsl:apply-templates />
+    </span>
+  </xsl:template>
+
+</xsl:stylesheet>