]> matita.cs.unibo.it Git - helm.git/commitdiff
added some stylesheets for list of people and sorting
authorLuca Padovani <luca.padovani@unito.it>
Sat, 16 Feb 2002 02:24:54 +0000 (02:24 +0000)
committerLuca Padovani <luca.padovani@unito.it>
Sat, 16 Feb 2002 02:24:54 +0000 (02:24 +0000)
helm/mowgli/home/html/.cvsignore
helm/mowgli/home/xsl/approaching-deadlines.xsl [new file with mode: 0644]
helm/mowgli/home/xsl/people-list.xsl [new file with mode: 0644]
helm/mowgli/home/xsl/person-entry.xsl [new file with mode: 0644]
helm/mowgli/home/xsl/sort-events-by-beginning.xsl [new file with mode: 0644]
helm/mowgli/home/xsl/sort-events-by-deadline.xsl [new file with mode: 0644]

index c9b0d1e2e352108ef40ff7dfbc64223a31e18777..8a53bb955f5a6d307312baf1efa4a4b427901a52 100644 (file)
@@ -8,3 +8,4 @@ project.html
 news.html
 events.html
 deadlines.html
+people-list.html
diff --git a/helm/mowgli/home/xsl/approaching-deadlines.xsl b/helm/mowgli/home/xsl/approaching-deadlines.xsl
new file mode 100644 (file)
index 0000000..bb1a41d
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:import href="common.xsl"/>
+<xsl:import href="deadlines.xsl"/>
+
+<xsl:output method="html"/>
+
+<xsl:template match="/">
+  <xsl:variable name="deadlines" select="events/event[position() &lt; 4]/deadline"/>
+  <xsl:apply-templates select="$deadlines">
+    <xsl:sort select="date" data-type="number"/>
+  </xsl:apply-templates>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/helm/mowgli/home/xsl/people-list.xsl b/helm/mowgli/home/xsl/people-list.xsl
new file mode 100644 (file)
index 0000000..60a5c94
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:import href="common.xsl"/>
+
+<xsl:output method="html"/>
+
+<xsl:template match="people">
+ <html>
+  <head>
+   <title>People Directory</title>
+   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+   <link rel="stylesheet" href="../style/mowgli.css" type="text/css"/>
+  </head>
+  <body>
+    <xsl:call-template name="head">
+     <xsl:with-param name="path_to_top" select="'.'"/>
+    </xsl:call-template>
+    <h1>People</h1>
+
+    <table border="0" width="100%">
+    <tr>
+    <td valign="top">
+
+    <h3><a name="#site">By Site</a></h3>
+    <xsl:apply-templates select="from">
+      <xsl:sort select="@site"/>
+    </xsl:apply-templates>
+
+    </td>
+    <td valign="top">
+
+    <h3><a name="#alpha">Alphabetical</a></h3>
+    <xsl:apply-templates select="from/person">
+      <xsl:sort select="@file"/>
+    </xsl:apply-templates>
+
+    </td>
+    </tr>
+    </table>
+
+    <xsl:call-template name="foot">
+     <xsl:with-param name="path_to_top" select="'.'"/>
+    </xsl:call-template>
+  </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="qualified-name">
+ <xsl:param name="qualification" select="/.."/>
+ <xsl:param name="name"/>
+ <xsl:param name="surname"/>
+ <!--
+ <xsl:if test="qualification">
+  <xsl:value-of select="$qualification"/>
+  <xsl:text> </xsl:text>
+ </xsl:if>
+ -->
+ <xsl:value-of select="$name"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$surname"/>
+</xsl:template>
+
+<xsl:template match="person">
+ <xsl:variable name="person" select="document(concat('../xml/people/',../@site,'/',@file,'.xml'))/person"/>
+ <a href="people/{../@site}/{@file}.html">
+  <xsl:call-template name="qualified-name">
+   <xsl:with-param name="qualification"
+                   select="$person/qualification"/>
+   <xsl:with-param name="name"
+                   select="$person/name"/>
+   <xsl:with-param name="surname"
+                   select="$person/surname"/>
+  </xsl:call-template>
+ </a>
+ <br />
+</xsl:template>
+
+<xsl:template match="name">
+ <xsl:param name="file" select="''"/>
+ <h4><a href="sites/{$file}.html"><xsl:value-of select="."/></a></h4>
+</xsl:template>
+
+<xsl:template match="from">
+ <xsl:variable name="site" select="document(concat('../xml/sites/',@site,'.xml'))/site"/>
+ <xsl:apply-templates select="$site/name">
+  <xsl:with-param name="file" select="@site"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="person">
+  <xsl:sort select="@file"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/helm/mowgli/home/xsl/person-entry.xsl b/helm/mowgli/home/xsl/person-entry.xsl
new file mode 100644 (file)
index 0000000..3e22c93
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:import href="common.xsl"/>
+
+<xsl:output method="html"/>
+
+<xsl:template match="/">
+  <xsl:copy-of select="person"/>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/helm/mowgli/home/xsl/sort-events-by-beginning.xsl b/helm/mowgli/home/xsl/sort-events-by-beginning.xsl
new file mode 100644 (file)
index 0000000..7d019d9
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml"/>
+
+<xsl:template match="events">
+ <events>
+  <xsl:apply-templates select="event">
+    <xsl:sort select="when/begin" data-type="number"/>
+  </xsl:apply-templates>
+ </events>
+</xsl:template>
+
+<xsl:template match="event">
+ <xsl:copy-of select="."/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/helm/mowgli/home/xsl/sort-events-by-deadline.xsl b/helm/mowgli/home/xsl/sort-events-by-deadline.xsl
new file mode 100644 (file)
index 0000000..237e0b9
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml"/>
+
+<xsl:template match="events">
+ <events>
+  <xsl:apply-templates select="event">
+   <xsl:sort select="deadline/date" data-type="number"/>
+  </xsl:apply-templates>
+ </events>
+</xsl:template>
+
+<xsl:template match="event">
+ <xsl:copy-of select="."/>
+</xsl:template>
+
+</xsl:stylesheet>
+