Return-Path: Delivered-To: apmail-xml-forrest-dev-archive@www.apache.org Received: (qmail 15014 invoked from network); 12 Oct 2003 13:25:11 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Oct 2003 13:25:11 -0000 Received: (qmail 93113 invoked by uid 500); 12 Oct 2003 13:25:06 -0000 Delivered-To: apmail-xml-forrest-dev-archive@xml.apache.org Received: (qmail 93086 invoked by uid 500); 12 Oct 2003 13:25:05 -0000 Mailing-List: contact forrest-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: forrest-dev@xml.apache.org Delivered-To: mailing list forrest-dev@xml.apache.org Received: (qmail 93071 invoked from network); 12 Oct 2003 13:25:05 -0000 Received: from unknown (HELO grunt25.ihug.com.au) (203.109.249.145) by daedalus.apache.org with SMTP; 12 Oct 2003 13:25:05 -0000 Received: from p1133-apx1.syd.ihug.com.au (expresso.localdomain) [203.173.143.116] by grunt25.ihug.com.au with esmtp (Exim 3.35 #1 (Debian)) id 1A8gDY-00053c-00; Sun, 12 Oct 2003 23:25:05 +1000 Received: from jeff by expresso.localdomain with local (Exim 3.35 #1 (Debian)) id 1A8gHd-0002c1-00; Sun, 12 Oct 2003 23:29:17 +1000 Date: Sun, 12 Oct 2003 23:29:17 +1000 From: Jeff Turner To: forrest-dev@xml.apache.org Cc: Andreas Hartmann Subject: Removed xdoc copying (Re: cvs commit: ...) Message-ID: <20031012132917.GA9715@expresso.localdomain> Mail-Followup-To: forrest-dev@xml.apache.org, Andreas Hartmann References: <20031012125132.93799.qmail@minotaur.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031012125132.93799.qmail@minotaur.apache.org> User-Agent: Mutt/1.5.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Sun, Oct 12, 2003 at 12:51:32PM -0000, jefft@apache.org wrote: > jefft 2003/10/12 05:51:32 > > Modified: src/resources/conf cocoon.xconf faq.xmap forrest.xmap > linkmap.xmap menu.xmap resources.xmap > revisions.xmap sitemap.xmap > src/resources/forrest-shbat forrest.build.xml > Log: > Remove the need to copy xdocs to a temporary webapp. xdocs can now be edited in > their original directory and updates seen live, eg. when using 'forrest run'. As you can see, I've made a start on in-place editing of content. After typing 'forrest run', XML can be edited in src/documentation/content/xdocs/ and changes will appear on http://localhost:8888/ This is done very simply with a 'project' DefaultsMetaModule, and every occurrence of 'content/xdocs/' replaced with '{project:content.xdocs}'. --oOo-- Lurking on lenya-dev, I saw a neat solution for how we can handle static things like stylesheets, which exist in $FORREST_HOME/resources/stylesheets, but may be overridden by the user in src/documentation/resources/stylesheets/. Namely, in the sitemap we use (for example) '{stylesheet:changes2document.xsl}', and let an inputmodule decide which path to use - either the overridden file, or the default. To make this work, I wrote a ResourceExistsModule which interprets its input as a path, and returns null if that path doesn't exist. By putting two of these in a ChainMetaModule, we achieve 'fallback' behaviour. Here is how the 'stylesheets' module is defined: /home/jeff/apache/xml/xml-forrest/src/documentation/resources/stylesheets/ /home/jeff/apache/xml/xml-forrest/build/dist/shbat/context/resources/stylesheets/ The Lenya equivalent is a FallbackModule which hardcodes the paths - this is just a generic equivalent. I'll see about adding this ResourceExistsModule to Cocoon CVS, so we can potentially use the same thing. Unfortunately this solution doesn't generalize to other possibly overridden files like images, because we don't know the image name beforehand, and we can't have {images:{1}} because the sitemap doesn't allow nested variable interpolation. Need to ping cocoon-dev and find out if nested variables can be supported.. Hope everyone had a similarly fun weekend. ;P --Jeff