]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/xslt/ld_web_root.xsl
web site update
[helm.git] / helm / www / lambdadelta / xslt / ld_web_root.xsl
index 7c0afb538430b247049869e865bbb42f15f3af22..d1faf246e920198a5c470110b7edf6168b39d67e 100644 (file)
@@ -2,14 +2,98 @@
 
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-               xmlns:date="http://exslt.org/dates-and-times"
-                xmlns:ld="http://lambdadelta.info"
+                xmlns:ld="http://lambdadelta.info/"
                 xmlns="http://www.w3.org/1999/xhtml"
-                extension-element-prefixes="date"
 >
 
 <xsl:template match="ld:section">
-   <div class="head2">
+   <div class="head2sn" id="{@name}">
+      <xsl:apply-templates/>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section1">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="1"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section3">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="3"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section4">
+    <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="4"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section5">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="5"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section6">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="6"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section8">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="8"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section9">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="9"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:section15">
+   <div class="head2dx" id="{@name}">
+      <xsl:apply-templates/>
+      <xsl:call-template name="sp"/>
+      <xsl:call-template name="butterfly">
+         <xsl:with-param name="name" select="15"/>
+      </xsl:call-template>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:subsection">
+   <div class="head3sn" id="{@name}">
       <xsl:apply-templates/>
    </div>
 </xsl:template>
    </div>
 </xsl:template>
 
-<xsl:template match="ld:rlink">
-   <a href="{$baseurl}{@to}">
+<xsl:template match="ld:topitem">
+   <ul id="{@name}"><li>
       <xsl:apply-templates/>
-   </a>
+   </li></ul>
 </xsl:template>
 
 <xsl:template match="ld:news">
    <ul><li>
-      <span class="date"><xsl:value-of select="@date"/></span>
+      <span class="emph {@class}"><xsl:value-of select="@date"/></span>
       <xsl:apply-templates/>
    </li></ul>
 </xsl:template>
    </div>
 </xsl:template>
 
+<xsl:template match="ld:sitemap">
+   <div class="spacer"><br/></div>   
+   <div class="text">
+      <xsl:call-template name="xhtbl"/>
+   </div>
+</xsl:template>
+
+<xsl:template match="ld:link">
+   <a href="{@to}">
+      <xsl:apply-templates/>
+   </a>
+</xsl:template>
+
+<xsl:template match="ld:rlink">
+   <a href="{$baseurl}{@to}">
+      <xsl:apply-templates/>
+   </a>
+</xsl:template>
+
+<xsl:template match="ld:newline">
+   <br/>
+</xsl:template>
+
+<xsl:template match="ld:list">
+   <ul><xsl:apply-templates/></ul>
+</xsl:template>
+
+<xsl:template match="ld:item">
+   <li class="{@class}"><xsl:apply-templates/></li>
+</xsl:template>
+
+<xsl:template match="ld:line">
+  <div class="{@class}">
+    <xsl:choose>
+      <xsl:when test="@of"><xsl:value-of select="@of"/></xsl:when>
+      <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
+    </xsl:choose>
+  </div>
+</xsl:template>
+
+<xsl:template match="ld:style">
+  <span class="{@class}">
+    <xsl:choose>
+      <xsl:when test="@title">
+        <xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="@of"><xsl:value-of select="@of"/></xsl:when>
+      <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
+    </xsl:choose>
+  </span>
+</xsl:template>
+
+<xsl:template match="ld:notice">
+   <span class="emph {@class}">
+      <xsl:choose>
+         <xsl:when test="@notice"><xsl:value-of select="@notice"/></xsl:when>
+         <xsl:when test="@text"><xsl:value-of select="@text"/></xsl:when>
+         <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
+      </xsl:choose>
+   </span>
+</xsl:template>
+
+<xsl:template match="ld:sub">
+   <sub><xsl:apply-templates/></sub>
+</xsl:template>
+
+<xsl:template match="ld:sup">
+   <sup><xsl:apply-templates/></sup>
+</xsl:template>
+
+<xsl:template match="ld:img">
+   <xsl:call-template name="img"/>
+   <xsl:choose>
+      <xsl:when test="@logo">
+         <xsl:call-template name="sp"/>
+      </xsl:when>
+   </xsl:choose>
+</xsl:template>
+
+<xsl:template match="ld:ucs-bronze">
+   <img
+      alt="[Official bronze sponsor of Unicode Consortium]"
+      title="Official bronze sponsor of Unicode Consortium"
+      src="{$baseurl}images/bronze-{@char}.png"
+   />
+</xsl:template>
+
 <xsl:template match="ld:footer">
    <xsl:call-template name="rule"/>
    <div class="spacer"><br/></div>   
    <div class="spacer">
-      <xsl:call-template name="xhtml"/>
-      <xsl:call-template name="css"/>
-      <xsl:call-template name="xslt"/>
+      <xsl:call-template name="xhtml-label"/>
+      <xsl:call-template name="css-label"/>
+      <xsl:call-template name="xslt-label"/>
       <xsl:apply-templates/>
-      <xsl:call-template name="png"/>
-      <xsl:call-template name="browser"/>
+      <xsl:call-template name="png-label"/>
+      <xsl:call-template name="browser-label"/>
    </div>
    <div class="spacer"><br/></div>   
    <div class="spacer">
       <xsl:value-of select="'Last update: '"/> 
-      <xsl:value-of select="date:date-time()"/>
+      <xsl:value-of select="$date"/>
    </div>
 </xsl:template>
 
-<xsl:template match="ld:helena-label">
-   <xsl:call-template name="helena"/>
-</xsl:template>
-
 <xsl:template match="ld:page">
-   <html xmlns="http://www.w3.org/1999/xhtml"><head>
+   <html xsl:exclude-result-prefixes="ld" dir="ltr" lang="en-us"><head> 
       <meta http-equiv="Content-Language" content="en-us"/>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
       <meta http-equiv="Content-Style-Type" content="text/css"/>
             href="{$baseurl}css/xhtbl.css"
       />
       <link rel="shortcut icon" 
-            href="{$baseurl}images/crux_16.ico"
+            href="{$baseurl}images/crux_32.ico"
       />
    </head><body lang="en-US">
-      <xsl:call-template name="home"/>
+      <div class="spacer"><xsl:call-template name="img"/></div>
       <div class="head1"><xsl:value-of select="@head"/></div>
       <xsl:call-template name="rule"/>
       <xsl:apply-templates/>
    </body></html>
 </xsl:template>
 
+<xsl:template match="@*|node()">
+   <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+   </xsl:copy>
+</xsl:template>
+
 </xsl:stylesheet>