Changeset 1061

Show
Ignore:
Timestamp:
08/22/07 14:08:34 (1 year ago)
Author:
thomase
Message:

last-modified date is now a function of the last transform to html; the date surfaced for last data modification is still drawn from the underlying mods record xml

Files:

Legend:

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

    r1052 r1061  
    2929    <xsl:template match="mods:mods"> 
    3030        <xsl:variable name="thetitle"><xsl:call-template name="getbesttitle"/></xsl:variable> 
    31         <xsl:variable name="thedate"> 
     31        <xsl:variable name="therecorddate"> 
    3232            <xsl:choose> 
    33                 <xsl:when test="descendant::mods:recordChangeDate"><xsl:value-of select="descendant::mods:recordChangeDate[last()]"/></xsl:when> 
    34                 <xsl:otherwise><xsl:value-of select="descendant::mods:recordCreationDate"/></xsl:otherwise> 
     33                <xsl:when test="descendant::mods:recordChangeDate"> 
     34                    <xsl:value-of select="descendant::mods:recordChangeDate[last()]" /> 
     35                </xsl:when> 
     36                <xsl:otherwise> 
     37                    <xsl:value-of select="descendant::mods:recordCreationDate" /> 
     38                </xsl:otherwise> 
    3539            </xsl:choose> 
    36         </xsl:variable> select="descendant::mods:recordChangeDate[last()]"/> 
     40        </xsl:variable>  
     41        <xsl:variable name="thehtmldate"><xsl:value-of select="format-dateTime(current-dateTime(), '[Y]-[M01]-[D01]T[H01]:[m01]:[s01]-05:00')"/></xsl:variable> 
    3742        <xsl:result-document href="{$htmloutpath}{@ID}.html" format="html-format"> 
    3843            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
     
    4146                    <xsl:element name="meta"> 
    4247                        <xsl:attribute name="http-equiv">last-modified</xsl:attribute> 
    43                         <xsl:attribute name="content"><xsl:value-of select="normalize-space($thedate)"/></xsl:attribute> 
     48                        <xsl:attribute name="content"><xsl:value-of select="normalize-space($thehtmldate)"/></xsl:attribute> 
    4449                    </xsl:element> 
    4550                    <style type="text/css" media="screen"> @import "recordstyle.css"; </style> 
     
    5661                    <div id="content"> 
    5762                        <h1><xsl:value-of select="normalize-space($thetitle)" /></h1> 
    58                     <p>Last revised: <xsl:value-of select="$thedate"/></p> 
     63                    <p>Data last revised: <xsl:value-of select="$therecorddate"/></p> 
    5964                    <div id="formattedcitation"> 
    6065                        <h2>Formatted citation:</h2>