]> matita.cs.unibo.it Git - helm.git/commitdiff
More cleanup: the home page is now generated by means of XSLT only.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sun, 24 Feb 2002 14:36:50 +0000 (14:36 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sun, 24 Feb 2002 14:36:50 +0000 (14:36 +0000)
(i.e. no more cat ... >> $@)

helm/mowgli/home/html/.cvsignore
helm/mowgli/home/html/Makefile
helm/mowgli/home/templates/home.html.bot [deleted file]
helm/mowgli/home/templates/home.html.top [deleted file]
helm/mowgli/home/xml/home.xml [new file with mode: 0644]
helm/mowgli/home/xsl/approaching-deadlines.xsl
helm/mowgli/home/xsl/latest-news.xsl
helm/mowgli/home/xsl/xhtml-content.xsl

index a9263be2f335e6f316aa700370ea7ad0819df93e..f2f11b699187d38162f34fb9fede5bd8b56ccdf2 100644 (file)
@@ -11,3 +11,5 @@ mowgli-events.html
 other-events.html
 deadlines.html
 people-list.html
+latest-news.xml
+approaching-deadlines.xml
index d19e187efe487e40e87e3e5f99d24aa048cdec7a..8fc0e0b8adca641e513924dea2561a55faa8d97d 100644 (file)
@@ -121,17 +121,16 @@ DOCUMENTS = \
 
 all: $(DOCUMENTS)
 
-home.html: $(TEMPLATESROOT)/home.html.top $(TEMPLATESROOT)/home.html.bot \
+home.html: $(XMLROOT)/home.xml \
           $(XMLROOT)/news.xml \
           $(XMLROOT)/other-events.xml \
           $(XMLROOT)/mowgli-events.xml \
           $(XSLROOT)/latest-news.xsl \
-          $(XSLROOT)/approaching-deadlines.xsl
-       cat $(TEMPLATESROOT)/home.html.top >$@
-       $(XSLTP) $(XSLROOT)/latest-news.xsl $(XMLROOT)/news.xml >>$@
-       echo "</dl>" >> $@
-       $(XSLTP) --param today `date +%Y%m%d` $(XSLROOT)/approaching-deadlines.xsl $(XMLROOT)/other-events.xml >>$@
-       sed s/\@DATE\@/"`date`"/ $(TEMPLATESROOT)/home.html.bot >>$@
+          $(XSLROOT)/approaching-deadlines.xsl \
+          $(XSLROOT)/xhtml-content.xsl
+       $(XSLTP) -o latest-news.xml $(XSLROOT)/latest-news.xsl $(XMLROOT)/news.xml
+       $(XSLTP) --param today `date +%Y%m%d` -o approaching-deadlines.xml $(XSLROOT)/approaching-deadlines.xsl $(XMLROOT)/other-events.xml
+       $(XSLTP) --param path_to_top "'.'" -o $@ $(XSLROOT)/xhtml-content.xsl $(XMLROOT)/home.xml
 
 index.html: $(TEMPLATESROOT)/index.html
        cp $< $@
diff --git a/helm/mowgli/home/templates/home.html.bot b/helm/mowgli/home/templates/home.html.bot
deleted file mode 100644 (file)
index cd530bc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-      </div>
-
-      </td>
-      </tr>
-      </table>
-
-      <br />
-
-      <hr width="100%"/>
-      
-      <table border="0" cellspacing="0" cellpadding="0" width="100%">
-        <tr>
-         <td align="left" valign="top">
-      <div class="small">
-            This page is hosted by the
-            <a href="http:/www.cs.unibo.it">Department of Computer Science</a>,
-            <a href="http://www.unibo.it">University of Bologna</a>.
-           <br />
-           Last update: <b>@DATE@</b>
-      </div>
-         </td>
-         <td align="right" valign="top">
-            <a href="http://www.cordis.lu/ist"><img border="0" alt="IST Logo Small" src="../images/istbutton_small.gif"/></a>
-         </td>
-       </tr>
-      </table>
-      <br />
-  </body>
-
-</html>
diff --git a/helm/mowgli/home/templates/home.html.top b/helm/mowgli/home/templates/home.html.top
deleted file mode 100644 (file)
index ad709f5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-  <head>
-    <title>MoWGLI Home Page</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-    <link rel="stylesheet" href="../style/mowgli.css" type="text/css"/>
-  </head>
-
-  <body class="content">
-      <br />
-
-      <table width="100%" border="0" cellspacing="0" cellpadding="0">
-        <tr>
-         <td align="left" valign="top">
-            <img alt="MoWGLI Logo" src="../images/mowgli_combo.gif"/>
-         </td>
-         <td align="right" valign="top">
-           <a href="http://www.cordis.lu/ist"><img border="0" alt="IST Logo" src="../images/istdrop.gif" width="200"/></a>
-         </td>
-       </tr>
-      </table>
-
-      <br />
-
-      <blockquote>
-       <div class="center">
-        <div class="small">
-         <h3><em style="color: red">Warning:</em>
-         <em>This site is under construction. Check often for updates.</em></h3>
-       </div>
-       </div>
-      </blockquote>
-
-      <br />
-      
-      <table width="100%" border="0" cellspacing="0" cellpadding="0">
-      <tr>
-
-      <td valign="top">
-
-      <h3>Abstract</h3>
-      
-      <p>The World Wide Web is already the largest resource of mathematical
-     knowledge, and its importance will be exponentiated by emerging display
-     technologies like <a target="_top" href="http://www.w3.org/Math">MathML</a>.
-     However, almost all mathematical documents
-     available on the Web are marked up only for presentation, severely
-     crippling the potentialities for automation, interoperability,
-     sophisticated searching mechanisms, intelligent applications,
-     transformation and processing. The goal of the project is to overcome
-     these limitations, passing from a machine-readable to a
-     machine-understandable representation of the information, and developing
-     the technological infrastructure for its exploitation. MoWGLI builds on
-     previous standards for the management and publishing of mathematical
-     documents (<a target="_top" href="http://www.w3.org/Math">MathML</a>,
-     <a target="_top" href="http://www.openmath.org">OpenMath</a>,
-     <a target="_top" href="http://www.mathweb.org/omdoc/index.html">OMDoc</a>),
-     integrating them with different
-     <a target="_top" href="http://www.w3.org/XML/">XML</a> technologies
-     (<a target="_top" href="http://www.w3.org/TR/xslt">XSLT</a>,
-     <a target="_top" href="http://www.w3.org/RDF/">RDF</a>, etc).</p>
-
-     <p>Read more about the project:</p>
-
-     <ul>
-       <li><a href="project-summary.html">Summary</a></li>
-       <li><a href="project-objectives.html">Objectives</a></li>
-       <li><a href="project-management.html">Management</a></li>
-     </ul>
-
-      </td>
-
-      <td>
-        &nbsp;&nbsp;&nbsp;&nbsp;
-      </td>
-
-      <td valign="top">
-
-      <div class="small">
-
-      <h3>Latest News</h3>
-
-      <dl>
diff --git a/helm/mowgli/home/xml/home.xml b/helm/mowgli/home/xml/home.xml
new file mode 100644 (file)
index 0000000..e784106
--- /dev/null
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:mowgli="http://mowgli.cs.unibo.it/website">
+
+  <head>
+    <title>MoWGLI Home Page</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+    <link rel="stylesheet" href="../style/mowgli.css" type="text/css" />
+  </head>
+
+  <body class="content">
+      <br />
+
+      <table width="100%" border="0" cellspacing="0" cellpadding="0">
+        <tr>
+         <td align="left" valign="top">
+            <img alt="MoWGLI Logo" src="../images/mowgli_combo.gif"/>
+         </td>
+         <td align="right" valign="top">
+           <a href="http://www.cordis.lu/ist"><img border="0" alt="IST Logo" src="../images/istdrop.gif" width="200"/></a>
+         </td>
+       </tr>
+      </table>
+
+      <br />
+
+      <blockquote>
+       <div class="center">
+        <div class="small">
+         <h3><em style="color: red">Warning:</em>
+         <em>This site is under construction. Check often for updates.</em></h3>
+       </div>
+       </div>
+      </blockquote>
+
+      <br />
+      
+      <table width="100%" border="0" cellspacing="0" cellpadding="0">
+      <tr>
+
+      <td valign="top">
+
+      <h3>Abstract</h3>
+      
+      <p>The World Wide Web is already the largest resource of mathematical
+     knowledge, and its importance will be exponentiated by emerging display
+     technologies like
+     <a target="_top" href="http://www.w3.org/Math">MathML</a>.
+     However, almost all mathematical documents
+     available on the Web are marked up only for presentation, severely
+     crippling the potentialities for automation, interoperability,
+     sophisticated searching mechanisms, intelligent applications,
+     transformation and processing. The goal of the project is to overcome
+     these limitations, passing from a machine-readable to a
+     machine-understandable representation of the information, and developing
+     the technological infrastructure for its exploitation. MoWGLI builds on
+     previous standards for the management and publishing of mathematical
+     documents (<a target="_top" href="http://www.w3.org/Math">MathML</a>,
+     <a target="_top" href="http://www.openmath.org">OpenMath</a>,
+     <a target="_top" href="http://www.mathweb.org/omdoc/index.html">OMDoc</a>),
+     integrating them with different
+     <a target="_top" href="http://www.w3.org/XML/">XML</a> technologies
+     (<a target="_top" href="http://www.w3.org/TR/xslt">XSLT</a>,
+     <a target="_top" href="http://www.w3.org/RDF/">RDF</a>, etc).</p>
+
+     <p>Read more about the project:</p>
+
+     <ul>
+       <li><a href="project-summary.html">Summary</a></li>
+       <li><a href="project-objectives.html">Objectives</a></li>
+       <li><a href="project-management.html">Management</a></li>
+     </ul>
+
+      </td>
+
+      <td>
+        &#x0A0;&#x0a0;&#x0a0;&#x0a0;
+      </td>
+
+      <td valign="top">
+
+      <div class="small">
+
+      <mowgli:latest-news />
+      <mowgli:approaching-deadlines />
+
+      </div>
+
+      </td>
+      </tr>
+      </table>
+
+      <br />
+
+      <hr width="100%"/>
+      
+      <table border="0" cellspacing="0" cellpadding="0" width="100%">
+        <tr>
+         <td align="left" valign="top">
+      <div class="small">
+            This page is hosted by the
+            <a href="http:/www.cs.unibo.it">Department of Computer Science</a>,
+            <a href="http://www.unibo.it">University of Bologna</a>.
+           <br />
+           Last update: <b><mowgli:date/></b>
+      </div>
+         </td>
+         <td align="right" valign="top">
+            <a href="http://www.cordis.lu/ist"><img border="0" alt="IST Logo Small" src="../images/istbutton_small.gif"/></a>
+         </td>
+       </tr>
+      </table>
+      <br />
+  </body>
+
+</html>
index ced2defa88822b23bcbf6bdeb1f6c893c1f08616..7a7317fb532371175162fd3f9253c8bb86fa18af 100644 (file)
@@ -6,11 +6,12 @@
 <xsl:import href="common.xsl"/>
 <xsl:import href="deadlines.xsl"/>
 
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
 
 <xsl:param name="today"/>
 
 <xsl:template match="/">
+ <html-fragment>
   <h3>Approaching Deadlines:</h3>
   <xsl:for-each select="events/event/deadline[date &gt;= $today]">
    <xsl:sort select="date" data-type="number"/>
@@ -18,6 +19,7 @@
     <xsl:apply-templates select="."/>
    </xsl:if>
   </xsl:for-each>
+ </html-fragment>
 </xsl:template>
 
 </xsl:stylesheet>
index 29cbaa7a5cfb954ab81896a5b8c1f43540d0fef1..974c2e9819e99d2524de241bc7a45c4f77d3b7ec 100644 (file)
@@ -6,13 +6,18 @@
 <xsl:import href="common.xsl"/>
 <xsl:import href="news.xsl"/>
 
-<xsl:output method="html"/>
+<xsl:output method="xml"/>
 
 <xsl:template match="/">
+ <html-fragment>
+  <h3>Latest News</h3>
+  <dl>
   <xsl:apply-templates select="news/event[position() &lt; 4]">
     <xsl:with-param name="small" select="true()"/>
   </xsl:apply-templates>
-  <dt><a href="news.html">Older news</a></dt><dd></dd>
+  </dl>
+  <a href="news.html">Older news</a>
+ </html-fragment>
 </xsl:template>
 
 </xsl:stylesheet>
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>