Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 44506 invoked by uid 500); 18 May 2003 20:33:15 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 44486 invoked from network); 18 May 2003 20:33:15 -0000 Received: from unknown (HELO host.leverageweb.com) (64.91.232.157) by daedalus.apache.org with SMTP; 18 May 2003 20:33:15 -0000 Received: from 66-44-63-194.s448.tnt5.lnhva.md.dialup.rcn.com ([66.44.63.194] helo=geoff2k) by host.leverageweb.com with asmtp (Exim 3.36 #1) id 19HUnG-0005Cd-00 for cocoon-dev@xml.apache.org; Sun, 18 May 2003 16:30:07 -0400 From: "Geoff Howard" To: Subject: source resolving help Date: Sun, 18 May 2003 16:52:09 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.leverageweb.com X-AntiAbuse: Original Domain - xml.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - leverageweb.com X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Source resolving in cocoon is pretty opaque to me - complicated by the fact that the API docs aren't included at excalibur's site. I've tried tracking this down through the source, but I'm never confident that I've found the current best practice and not a deprecated area. If there's a great example of how to do this, or message from the archives feel free to point me there instead but I haven't found anything clear for a source meant to be a _destination_ as outlined below. Here's my situation: in a sitemap component (a file upload handler which will move a PartOnDisk, or write out the stream of a FileInMemory), I want to: 1) resolve a directory path relative to the current sitemap, 2) create a file in that directory, 3) write to the file one time, and close/release it as necessary. so, I could do (?) FileSource fs = (FileSource)resolver.resolveURI("directory/filename.ext"); Then I guess I could do orignalFile.renameTo(fs.getSystemId()) or fs.getOutputStream() ?? - Have I understood all this correctly? - What are the hidden gotchas? - Do I need file:/directory/filename.ext ?? - Can I use relative or absolute paths? (eg ../../directory or /var ) with this scheme? TIA, Geoff