Changeset 1242

Show
Ignore:
Timestamp:
02/13/08 14:02:50 (10 months ago)
Author:
thomase
Message:

automatically calculate the current date if a date is not supplied as a runtime parameter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • BibIt/trunk/htmlindex.xsl

    r1212 r1242  
    99     
    1010     
    11     <xsl:param name="bodytitle">Bibliographic Records of the Ancient World Mapping Center</xsl:param> 
    12     <xsl:param name="headtitle">AWMC Bibliography</xsl:param> 
     11    <xsl:param name="bodytitle">Bibliographic Records of the Pleiades Project</xsl:param> 
     12    <xsl:param name="headtitle">Pleiades Bibliography</xsl:param> 
    1313    <xsl:param name="editors">Tom Elliott and Richard Talbert</xsl:param> 
    14     <xsl:param name="pubplace">Chapel Hill</xsl:param> 
    15     <xsl:param name="publisher">Ancient World Mapping Center, University of North Carolina</xsl:param> 
     14    <xsl:param name="pubplace">New York</xsl:param> 
     15    <xsl:param name="publisher">Institute for the Study of the Ancient World, New York University</xsl:param> 
    1616    <xsl:param name="thedate"/> 
    17     <xsl:param name="theurl">http://www.unc.edu/awmc/pleiades/bibliography</xsl:param> 
    18     <xsl:param name="rightspath" 
    19         >/TomDocs/awmcwork/pleiadesact/svnbox/pleiades-bibliography/rights.html</xsl:param> 
    20     <xsl:param name="descpath" 
    21         >/TomDocs/awmcwork/pleiadesact/svnbox/pleiades-bibliography/desc.html</xsl:param> 
     17    <xsl:param name="theurl">http://pleiades.stoa.org/bibliography</xsl:param> 
     18    <xsl:param name="rightspath">../pleiades-bibliography/rights.html</xsl:param> 
     19    <xsl:param name="descpath">../pleiades-bibliography/desc.html</xsl:param> 
    2220    <xsl:variable name="desc-text"> 
    2321        <xsl:for-each select="doc($descpath)"> 
     
    3028        </xsl:for-each> 
    3129    </xsl:variable> 
    32  
     30    <xsl:variable name="thisdate"> 
     31        <xsl:choose> 
     32            <xsl:when test="normalize-space($thedate)=''"> 
     33                <xsl:text></xsl:text><xsl:value-of select="current-date()"/><xsl:text></xsl:text> 
     34            </xsl:when> 
     35            <xsl:otherwise> 
     36                <xsl:text></xsl:text><xsl:value-of select="normalize-space($thedate)"/><xsl:text></xsl:text> 
     37            </xsl:otherwise> 
     38        </xsl:choose> 
     39    </xsl:variable> 
    3340     
    3441     
     
    4653                <xsl:element name="meta"> 
    4754                    <xsl:attribute name="http-equiv">last-modified</xsl:attribute> 
    48                     <xsl:attribute name="content"><xsl:value-of select="normalize-space($thedate)" /></xsl:attribute> 
     55                    <xsl:attribute name="content"><xsl:value-of select="normalize-space($thisdate)" /></xsl:attribute> 
    4956                </xsl:element> 
    5057                <style type="text/css" media="screen"> @import "indexstyle.css"; </style> 
     
    5764                <meta name="DC.title" content="{$bodytitle}"/> 
    5865                <meta name="DC.publisher" content="{$publisher}"/> 
    59                 <meta name="DC.date" content="{$thedate}"/> 
     66                <meta name="DC.date" content="{$thisdate}"/> 
    6067                <meta name="DC.description" content="{$desc-text}"/> 
    6168                <meta name="DC.format" content="text/html"/> 
     
    6673            <body>  
    6774               <div id="content"><h1><xsl:value-of select="$bodytitle"/></h1> 
    68                    <p>Last revision to this index: <xsl:value-of select="$thedate"/></p> 
     75                   <p>Last revision to this index: <xsl:value-of select="$thisdate"/></p> 
    6976                   <p><a href="changes/latest.atom"><img style="border:0" src="images/feed-icon-14x14.png" alt="standard web feed icon"/> latest changes as an atom web feed</a></p> 
    7077                <p>See <a href="#meta">about this information</a>, below.</p> 
     
    7986                        <li><xsl:value-of select="$editors"/> (eds.), <xsl:value-of select="$bodytitle"/>,  
    8087                        <xsl:value-of select="$pubplace"/>: <xsl:value-of select="$publisher"/>,  
    81                             <xsl:value-of select="$thedate"/>  
     88                            <xsl:value-of select="$thisdate"/>  
    8289                            [ <a href="{$theurl}"><xsl:value-of select="$theurl"/></a> ]</li> 
    8390                    </ul>