Return-Path: Delivered-To: apmail-forrest-user-archive@www.apache.org Received: (qmail 46286 invoked from network); 31 Mar 2007 01:25:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2007 01:25:07 -0000 Received: (qmail 24976 invoked by uid 500); 31 Mar 2007 01:25:14 -0000 Delivered-To: apmail-forrest-user-archive@forrest.apache.org Received: (qmail 24934 invoked by uid 500); 31 Mar 2007 01:25:14 -0000 Mailing-List: contact user-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@forrest.apache.org List-Id: Delivered-To: mailing list user@forrest.apache.org Received: (qmail 24925 invoked by uid 99); 31 Mar 2007 01:25:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2007 18:25:14 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of brolin.empey@gmail.com designates 209.85.132.250 as permitted sender) Received: from [209.85.132.250] (HELO an-out-0708.google.com) (209.85.132.250) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2007 18:25:06 -0700 Received: by an-out-0708.google.com with SMTP id c25so709281ana for ; Fri, 30 Mar 2007 18:24:45 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kp1H0nShfPFZjDa5AY3E4USnsmtMgOez/3OKDhAhEF+bAtKYVBiCPmk+2Zw0Ax7zd2hMKQiAlcw/X+Gl1IkEbE/HqhCegrx7gcSpsifzsxdrzHOYD52b/BAoHPQ6Y3EzDYhTTSr+4zbWrAEd+3wBoObAal7ttxGI3+hxnCNi36A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pe+WrMirtFr6ilQOIJPqfgViiq3oRP6Xf6Hu9WupfPSxopzgHg/JdcYZBy83a7c5ecIION2QS86cypnXTKNXLV2M+vYDvHGHFFbQOgsDDTyXcHVfZisOE1jYTpoR6xxZTU823V7nS9fe2OcJx3YWT1ngbShilHwdC9wAEURUtdQ= Received: by 10.100.144.11 with SMTP id r11mr1953023and.1175304284996; Fri, 30 Mar 2007 18:24:44 -0700 (PDT) Received: by 10.100.177.17 with HTTP; Fri, 30 Mar 2007 18:24:44 -0700 (PDT) Message-ID: <3a1cfc910703301824l35393550j64a5d388948091fa@mail.gmail.com> Date: Fri, 30 Mar 2007 18:24:44 -0700 From: "Brolin Empey" To: user@forrest.apache.org Subject: Re: using Subversion keyword substitution instead of published date in skin navstrip In-Reply-To: <460CDC4D.4070005@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a1cfc910703291734p2cf0bebl89f88bd399e73a36@mail.gmail.com> <460CDC4D.4070005@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the suggestions. I missed the FAQ about the CVS keywords because I was searching the FAQ page for SVN terms. I already knew that the "Last Published" line was written by client-side JavaScript code. This led me to believe that client-side scripting was used because it was not possible to include page-specific properties in the output of the skinning process. I decided to ask on this list in case my assumption was incorrect. For now, I have settled on using the SVN "Id" keyword in the body of each page. This is not as elegant of a solution as having the expansion of the "Id" keyword in the skin, since it means there is a chance of having a page without the "Id" keyword. However, my solution is still better than the "Last Published" line, because the latter always prints the current date and time on my public Web site. This is misleading and not useful. It is much more useful and meaningful to me to have the date and time the source file was last modified. Here is what I did: In main/webapp/skins/pelt/xslt/html/site2xhtml.xsl I used a test that is always false to disable the JavaScript code in the "last-published" template that writes the "Last Published" line. I had to do this because XML does not allow nested comments. This worked, but the line where "Last Published" used to be written was now too short because it contained no characters. I solved this by having the "last-published" template write a non-breaking space character. Next, I experimented with sed until I had a working regex to insert a paragraph containing the SVN "Id" keyword at the end of the body of a page. I then used find + grep + xargs + sed to perform an in-place edit of all of my site's source files. Then I did the same to run "svn propset" on all source files in order to enable SVN's keyword substitution. Next, I committed my changes and had Forrest rebuild my static Web site. The end result is (almost) what I wanted! :) I would still be interested if someone finds a way to put the "Id" keyword in the skin (more specifically, in the footer), though. Brolin