]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/xhtml-content.xsl
More cleanup: the home page is now generated by means of XSLT only.
[helm.git] / helm / mowgli / home / xsl / xhtml-content.xsl
index bd492129cf5ca6ef5e7e98444689aa6770601e18..254b426b05784aea6893c151245efa128d8718a9 100644 (file)
@@ -1,13 +1,15 @@
 <?xml version="1.0"?>
 
 <xsl:stylesheet version="1.0"
-                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:mowgli="http://mowgli.cs.unibo.it/website">
 
 <xsl:import href="common.xsl"/>
 
 <xsl:output method="html"/>
 
 <xsl:param name="path_to_top" select="'.'"/>
+<xsl:param name="current-date"/>
 
 <xsl:template match="html">
  <html>
@@ -19,7 +21,7 @@
     <xsl:call-template name="head">
      <xsl:with-param name="path_to_top" select="$path_to_top"/>
     </xsl:call-template>
-    <xsl:copy-of select="body/node()"/>
+    <xsl:apply-templates select="body/node()"/>
     <xsl:call-template name="foot">
      <xsl:with-param name="path_to_top" select="$path_to_top"/>
     </xsl:call-template>
  </html>
 </xsl:template>
 
-</xsl:stylesheet>
+<xsl:template match="*|text()|@*">
+ <xsl:copy>
+  <xsl:apply-templates select="*|text()|@*"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="mowgli:latest-news">
+ <xsl:copy-of select="document('../html/latest-news.xml')/*/*"/>
+</xsl:template>
 
+<xsl:template match="mowgli:approaching-deadlines">
+ <xsl:copy-of select="document('../html/approaching-deadlines.xml')/*/*"/>
+</xsl:template>
+
+<xsl:template match="mowgli:date">
+ <xsl:copy-of select="$current-date"/>
+</xsl:template>
+</xsl:stylesheet>