From users-return-6724-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Fri Mar 07 08:59:20 2008 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 30934 invoked from network); 7 Mar 2008 08:59:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Mar 2008 08:59:20 -0000 Received: (qmail 58161 invoked by uid 500); 7 Mar 2008 08:59:15 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 58143 invoked by uid 500); 7 Mar 2008 08:59:15 -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 58134 invoked by uid 99); 7 Mar 2008 08:59:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 00:59:15 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 209.85.200.169 as permitted sender) Received: from [209.85.200.169] (HELO wf-out-1314.google.com) (209.85.200.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Mar 2008 08:58:40 +0000 Received: by wf-out-1314.google.com with SMTP id 23so498190wfg.13 for ; Fri, 07 Mar 2008 00:58:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=IUnTx/rDq27tkaqGl26XGex9vXALsSdRSknYnPR5tLg=; b=hv4sPk8Ljo1qAKXWESm778NnFIlyDrgrjLdIs/BvUkkNRtxmEn7y2gOIE5DtgF2GgIeVMBpqDZaEZDJmcId1R2y9Md8BbwS1B82RlFzSiah1jrUAuCOIUwEEMV0SMb/deiHpXz1PNMZe2fBnRJxDRb0MI++LE2Nq5je5Dso34OA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nNwCnfuHGFzGzucYRcdEAwrWoWOp0FSsB2ivtKb8kgNkdR/qfiFYe7GZibcf861VYFA0NewjkfMXT7G3BrQAlY7H9ot/XBibptUoMznwD8qHZxyTYThn9nUPuW1SqJRF4saxQM2Bhx1pUOuRP/+I5ZDpL4O0C2vOzAGm+5Vez2c= Received: by 10.142.141.21 with SMTP id o21mr431626wfd.199.1204880330669; Fri, 07 Mar 2008 00:58:50 -0800 (PST) Received: by 10.142.213.16 with HTTP; Fri, 7 Mar 2008 00:58:50 -0800 (PST) Message-ID: <510143ac0803070058t33619153oac27e64043350726@mail.gmail.com> Date: Fri, 7 Mar 2008 10:58:50 +0200 From: "Jukka Zitting" To: users@jackrabbit.apache.org Subject: Re: incorrect system view export if property is String[1] In-Reply-To: <200803061829.23124.m.zdila@mwaysolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200803061829.23124.m.zdila@mwaysolutions.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, 2008/3/6 Martin Zdila : > i think i've found a bug. if i have multivalue with only one item, then export > is ambiguous. after import i see only String property. please check > attachments. should i report it to jira? Yes, please. The problem is that there is an ambiguity related to multivalued properties in the system view format specified in JSR 170. Normally the import can determine whether a property should be multivalued or not by looking at the matching property definition associated with the node type. But with nt:unstructured there is both a single- and a multivalued property definition that matches the imported property. In such cases Jackrabbit looks at the number of values in the imported property, and defaults to the single-valued property definition if just a single value is being imported like in your String[1] case. We can't really solve the problem by improving the heuristics on the import side, so we should add some explicit property metadata like rep:multivalued="true" to the system view export to help solve the ambiguity. > the other strange thing is that document view export is empty. is it ok? why? That's a long-lived known issue, see https://issues.apache.org/jira/browse/JCR-325. The reason is basically that since we currently can't import multivalued properties in document view, we think it's better also not to export them to avoid giving people the wrong idea. There is no concept of multivalued attributes in XML, so while the JCR spec specifies a way to handle that case it also leaves a lot of freedom to implementations to decide if they want to support that feature. In the general case it is impossible to properly import multivalued properties using the document view, but there are a lot of heuristics we could apply to make that feature work reasonably well in practice. I spent some time on that issue two years ago, but dropped the effort since it's rather complex and there is no clear need for such functionality. BR, Jukka Zitting