Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 7171 invoked from network); 13 Nov 2006 17:31:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2006 17:31:21 -0000 Received: (qmail 84778 invoked by uid 500); 13 Nov 2006 17:31:30 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 84769 invoked by uid 500); 13 Nov 2006 17:31:30 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 84760 invoked by uid 99); 13 Nov 2006 17:31:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 09:31:30 -0800 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 stefan.guggisberg@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 09:31:17 -0800 Received: by ug-out-1314.google.com with SMTP id m3so5506843uge for ; Mon, 13 Nov 2006 09:30:55 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kZieU1Gq3SLnmI/LypF8D75K9OTJqpKJeihvh5XhjzeHWbVzgMBpnScS5+qZJdLLX80f/RBAMtwFIGLTPtxREicNiUE3HrLIFahCnxt72bRIFWg3clFFxb/peJfcaEzS0o41JqzksBrTQMu8kfZV/dJakeDV3vX+lh5FoK/Fr7Q= Received: by 10.78.52.17 with SMTP id z17mr6390384huz.1163439050122; Mon, 13 Nov 2006 09:30:50 -0800 (PST) Received: by 10.78.160.11 with HTTP; Mon, 13 Nov 2006 09:30:49 -0800 (PST) Message-ID: <90a8d1c00611130930h5c2f1909x24c9c2858202cb48@mail.gmail.com> Date: Mon, 13 Nov 2006 18:30:49 +0100 From: "Stefan Guggisberg" To: users@jackrabbit.apache.org Subject: Re: Roundtripping: Stripping JCR metadata In-Reply-To: <45587EBB.9090407@adelphia.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45587EBB.9090407@adelphia.net> X-Virus-Checked: Checked by ClamAV on apache.org On 11/13/06, Dan Connelly wrote: > Is there a handy example of stripper code to eliminate JCR metadata, > using either a ContentHandlerl or an XSLT? > > Seems like there should be standardized way to achieve roundtripping. > Or, is the stripping task so trivial that the obvious first attempt > (throwing out properties with jcr prefix) is going to do the job? first of all i'd like point out that document view roundtripping is not guaranteed for a number of reasons, e.g. xml comments are not processed, (scoped) ns declarations are not preserved, formatting is not preserved etc etc. document view xml format is IMO inherently flawed and was never intented for roundtripping. back to your question: probably the easiest approach would be to use a custom ContentHandler that filters jcr:* properties and nodes. cheers stefan > > --Dan >