]> matita.cs.unibo.it Git - helm.git/commitdiff
* non-html stuff that was installed in html/members/contract is now
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 26 Feb 2002 13:51:04 +0000 (13:51 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 26 Feb 2002 13:51:04 +0000 (13:51 +0000)
  installed in misc/contract.
* the html dir can now be changed as wished. This allows to have
  both the "with frames" and the "without frames" versions on-line at
  the same time.
* xhtml-content.html can now produce both the version with and without
  frames

helm/mowgli/home/html/Makefile
helm/mowgli/home/xml/members-index.xml
helm/mowgli/home/xsl/xhtml-content.xsl

index 378b60e9b332f0822ca814345b3cb657c6fadab4..8d91bb72683d831009b14157b0ef9a5dff604922 100644 (file)
@@ -6,6 +6,12 @@ FRAMES = yes
 DESTDIR = /projects/mowgli/public_html
 #DESTDIR = /tmp/mowgli
 
+#HTMLDESTDIRSUFFIX = html_frames
+#HTMLDESTDIRSUFFIX = html_no_frames
+HTMLDESTDIRSUFFIX = html
+
+HTMLDESTDIR = $(DESTDIR)/$(HTMLDESTDIRSUFFIX)
+
 XSLTP = xsltproc --param current-date "'`date`'"
 TEMPLATESROOT = ../templates
 XMLROOT = ../xml
@@ -13,11 +19,7 @@ XSLROOT = ../xsl
 
 RMDOCTYPE = "s/<\\!DOCTYPE[^>]*>//"
 
-ifeq ($(FRAMES),yes)
-       XHTMLCONTENT = $(XSLROOT)/xhtml-content.xsl
-else
-       XHTMLCONTENT = $(XSLROOT)/xhtml-content-no-frames.xsl
-endif
+XHTMLCONTENT = $(XSLROOT)/xhtml-content.xsl
 
 PEOPLE = \
        people/aei/kelley.html \
@@ -142,7 +144,7 @@ home.html: $(XMLROOT)/home.xml \
            $(XHTMLCONTENT)
        $(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 make_header "false()" --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) $(XMLROOT)/home.xml
+       $(XSLTP) --param make_header "false()" --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) $(XMLROOT)/home.xml
 
 ifeq ($(FRAMES),yes)
 index.html: $(TEMPLATESROOT)/index.html
@@ -152,7 +154,7 @@ index.html: home.html
        cp $< $@
 #Same stuff as for home.html... but with a different path_to_top
 dot_dot_index.html: home.html
-       $(XSLTP) --param make_header "false()" --param path_to_top "'html'" -o $@ $(XHTMLCONTENT) $(XMLROOT)/home.xml
+       $(XSLTP) --param make_header "false()" --param path_to_top "'html'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) $(XMLROOT)/home.xml
 endif
 
 members/ml-help-example.txt: $(TEMPLATESROOT)/ml-help-example.txt
@@ -160,111 +162,111 @@ members/ml-help-example.txt: $(TEMPLATESROOT)/ml-help-example.txt
 
 members/index.html: $(XMLROOT)/members-index.xml \
                    $(XHTMLCONTENT)
-       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) -
+       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 software/index.html: $(XMLROOT)/software/index.xml \
                     $(XHTMLCONTENT)
-       $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) $<
+       $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) $<
 
 menu.html: $(TEMPLATESROOT)/menu.html
        cp $< $@
 
 project-management.html: $(XMLROOT)/project-management.xml \
                          $(XHTMLCONTENT)
-       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 project-summary.html: $(XMLROOT)/project-summary.xml \
                      $(XHTMLCONTENT)
-       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 project-objectives.html: $(XMLROOT)/project-objectives.xml \
                         $(XHTMLCONTENT)
-       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 mowgli-events/kick-off.html: $(XMLROOT)/mowgli-events/kick-off.xml \
                             $(XHTMLCONTENT)
-       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) -
+       sed $(RMDOCTYPE) $< | $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 people-list.html: $(XMLROOT)/people/index.xml \
                   $(XSLROOT)/people-list.xsl \
                   $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/people-list.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/people-list.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 consortium.html: $(XMLROOT)/consortium.xml \
                  $(XSLROOT)/consortium.xsl \
                  $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/consortium.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/consortium.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 project.html: $(XMLROOT)/project.xml \
               $(XSLROOT)/project.xsl \
               $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/project.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/project.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 news.html: $(XMLROOT)/news.xml \
           $(XSLROOT)/news.xsl \
            $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/news.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/news.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 other-events.html: $(XMLROOT)/other-events.xml \
                   $(XSLROOT)/events.xsl \
                    $(XHTMLCONTENT) 
-       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'Other'" $(XSLROOT)/events.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'Other'" $(XSLROOT)/events.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 mowgli-events.html: $(XMLROOT)/mowgli-events.xml \
                    $(XSLROOT)/events.xsl \
                     $(XHTMLCONTENT) 
-       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'MOWGLI'" $(XSLROOT)/events.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'MOWGLI'" $(XSLROOT)/events.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 deadlines.html: $(XMLROOT)/other-events.xml \
                $(XSLROOT)/deadlines.xsl \
                 $(XHTMLCONTENT) 
-       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'Other'" $(XSLROOT)/deadlines.xsl $< | $(XSLTP) --param path_to_top "'.'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) --param today `date +%Y%m%d` --param events-class "'Other'" $(XSLROOT)/deadlines.xsl $< | $(XSLTP) --param path_to_top "'.'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 deliverables/%.html: $(XMLROOT)/deliverables/%.xml \
                      $(XSLROOT)/deliverable.xsl \
                      $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/deliverable.xsl $< | $(XSLTP) --param path_to_top "'../..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/deliverable.xsl $< | $(XSLTP) --param path_to_top "'../..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 sites/%.html: $(XMLROOT)/sites/%.xml \
               $(XSLROOT)/site.xsl \
               $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/site.xsl $< | $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/site.xsl $< | $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 people/%.html: $(XMLROOT)/people/%.xml \
                $(XSLROOT)/person.xsl \
                $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/person.xsl $< | $(XSLTP) --param path_to_top "'../..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/person.xsl $< | $(XSLTP) --param path_to_top "'../..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 publications/index.html: $(XMLROOT)/publications/index.xml \
                         $(XSLROOT)/publications-index.xsl \
                          $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/publications-index.xsl $< | $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/publications-index.xsl $< | $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 publications/%.html: $(XMLROOT)/publications/%.xml \
                      $(XSLROOT)/publication.xsl \
                      $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/publication.xsl $< | $(XSLTP) --param path_to_top "'../..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/publication.xsl $< | $(XSLTP) --param path_to_top "'../..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 work-packages/index.html: $(XMLROOT)/work-packages/index.xml \
                           $(XSLROOT)/work-packages_index.xsl \
                           $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/work-packages_index.xsl $< | $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/work-packages_index.xsl $< | $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
        
 work-packages/%.html: $(XMLROOT)/work-packages/%.xml \
                       $(XSLROOT)/work-package.xsl \
                       $(XHTMLCONTENT) 
-       $(XSLTP) $(XSLROOT)/work-package.xsl $< | $(XSLTP) --param path_to_top "'..'" -o $@ $(XHTMLCONTENT) -
+       $(XSLTP) $(XSLROOT)/work-package.xsl $< | $(XSLTP) --param path_to_top "'..'" --param use_frames "'$(FRAMES)'" -o $@ $(XHTMLCONTENT) -
 
 
 clean:
@@ -272,21 +274,22 @@ clean:
 .PHONY: clean
 
 install: $(DOCUMENTS)
-       mkdir -p $(DESTDIR)/html
+       mkdir -p $(HTMLDESTDIR)
        for i in $(dir $(DOCUMENTS)); do \
-               mkdir -p $(DESTDIR)/html/$$i; \
+               mkdir -p $(HTMLDESTDIR)/$$i; \
        done
        for i in $(DOCUMENTS); do \
-               cp $$i $(DESTDIR)/html/$$i; \
+               cp $$i $(HTMLDESTDIR)/$$i; \
        done
        mkdir -p $(DESTDIR)/images
        cp ../images/*.* $(DESTDIR)/images
        mkdir -p $(DESTDIR)/style
        cp ../style/*.css $(DESTDIR)/style
-       cp ../htaccess $(DESTDIR)/html/members/.htaccess
-       mkdir -p $(DESTDIR)/html/members/contract
-       cp ../misc/contract/*.* $(DESTDIR)/html/members/contract
-       if [ -f dot_dot_index.html ] ; then cp dot_dot_index.html $(DESTDIR)/index.html ; else sed s/menu\\.html/html\\/menu\\.html/ <index.html | sed s/home\\.html/html\\/home\\.html/ >$(DESTDIR)/index.html ; fi
+       cp ../htaccess $(HTMLDESTDIR)/members/.htaccess
+       mkdir -p $(DESTDIR)/misc/contract
+       cp ../htaccess $(DESTDIR)/misc/contract/.htaccess
+       cp ../misc/contract/*.* $(DESTDIR)/misc/contract
+       if [ -f dot_dot_index.html ] ; then cp dot_dot_index.html $(DESTDIR)/index.html ; else sed s/menu\\.html/$(HTMLDESTDIRSUFFIX)\\/menu\\.html/ <index.html | sed s/home\\.html/$(HTMLDESTDIRSUFFIX)\\/home\\.html/ >$(DESTDIR)/index.html ; fi
 
 uninstall:
        rm -rf $(DESTDIR)/*
index a0ffbcaee0535e8dae7f6f68bc273b9beb83195f..017f37e28e7a150d01b75ec8372cbff304f93973 100644 (file)
 
   <h2><a name="contract">The Contract</a></h2>
 
-   <p>The contract in <a href="contract/mowgli.ps">PostScript</a>
-      and <a href="contract/mowgli.pdf">PDF</a>. The
-      <a href="contract/contract.tgz">contract sources</a> (in
-      LaTeX) and the <a href="contract/MOWGLI.xls">Excel forms</a>
+   <p>The contract in <a href="../../misc/contract/mowgli.ps">PostScript</a>
+      and <a href="../../misc/contract/mowgli.pdf">PDF</a>. The
+      <a href="../../misc/contract/contract.tgz">contract sources</a> (in
+      LaTeX) and the <a href="../../misc/contract/MOWGLI.xls">Excel forms</a>
       are also available.</p>
  </body>
 </html>
index 924f7e825b84e0699875eeb66fe146df677f15c1..128c1de03ae3bbceef9a783babf6279154d4421d 100644 (file)
@@ -11,6 +11,7 @@
 <xsl:param name="path_to_top" select="'.'"/>
 <xsl:param name="current-date"/>
 <xsl:param name="make_header" select="true()"/>
+<xsl:param name="use_frames" select="'yes'"/>
 
 <!--CSC: The following mess is due to a bug of xsltproc w.r.t. patterns
          precedence: the less general pattern is sometimes applied ;-( -->
@@ -25,6 +26,7 @@
    <link rel="stylesheet" href="{$path_to_top}/../style/mowgli.css" type="text/css"/>
   </head>
   <body>
+   <xsl:variable name="body">
     <xsl:if test="$make_header">
      <xsl:call-template name="head">
       <xsl:with-param name="path_to_top" select="$path_to_top"/>
     <xsl:call-template name="foot">
      <xsl:with-param name="path_to_top" select="$path_to_top"/>
     </xsl:call-template>
+   </xsl:variable>
+   <xsl:choose>
+    <xsl:when test="$use_frames = 'yes'">
+     <xsl:copy-of select="$body"/>
+    </xsl:when>
+    <xsl:otherwise>
+     <table>
+      <tr>
+       <td nowrap="true" valign="top">
+        <xsl:apply-templates mode="menu" select="document('../templates/menu.xml')/*/*[2]/*"/>
+       </td>
+       <td width="5%">&#x0A0;</td>
+       <td valign="top">
+        <xsl:copy-of select="$body"/>
+       </td>
+      </tr>
+     </table>
+    </xsl:otherwise>
+   </xsl:choose>
   </body>
  </html>
 </xsl:template>
 <xsl:template match="mowgli:date">
  <xsl:copy-of select="$current-date"/>
 </xsl:template>
+
+<xsl:template name="a_menu">
+ <xsl:copy>
+  <xsl:choose>
+   <xsl:when test="starts-with(@href,'/') or
+                   starts-with(@href,'http://') or
+                   starts-with(@href,'mailto:')">
+    <xsl:copy-of select="@href"/>
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:attribute name="href">
+     <xsl:value-of select="$path_to_top"/>
+     <xsl:text>/</xsl:text>
+     <xsl:value-of select="@href"/>
+    </xsl:attribute>
+   </xsl:otherwise>
+  </xsl:choose>
+  <xsl:value-of select="text()"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template mode="menu" match="*|text()|@*">
+ <xsl:choose>
+  <xsl:when test="name(.) = 'a'">
+   <xsl:call-template name="a_menu"/>
+  </xsl:when>
+  <xsl:otherwise>
+   <xsl:copy>
+    <xsl:apply-templates mode="menu" select="*|text()|@*"/>
+   </xsl:copy>
+  </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
 </xsl:stylesheet>