Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 67815 invoked from network); 2 Sep 2005 15:08:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Sep 2005 15:08:10 -0000 Received: (qmail 7014 invoked by uid 500); 2 Sep 2005 15:08:08 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 7001 invoked by uid 99); 2 Sep 2005 15:08:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2005 08:08:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of stefan.guggisberg@gmail.com designates 64.233.162.192 as permitted sender) Received: from [64.233.162.192] (HELO zproxy.gmail.com) (64.233.162.192) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2005 08:08:23 -0700 Received: by zproxy.gmail.com with SMTP id o1so353239nzf for ; Fri, 02 Sep 2005 08:08:07 -0700 (PDT) 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=BvOLrG4WrUpfRPD2YH2yQo/pKIfVONEDLNCSsHTPKMsW2r2su+HmeITkVmE7XJdDXFd6FR/2VONHTac9Kw/r6c49zdE0uYGWXegyQ1poxfDD73kHJOGpJljsrxDoTPETRCIeWF0foCo4YfgwfYBXqmaOyfWDrsLmsBz0+//f7+w= Received: by 10.36.118.18 with SMTP id q18mr2247056nzc; Fri, 02 Sep 2005 08:08:06 -0700 (PDT) Received: by 10.36.81.3 with HTTP; Fri, 2 Sep 2005 08:08:06 -0700 (PDT) Message-ID: <90a8d1c0050902080810403a57@mail.gmail.com> Date: Fri, 2 Sep 2005 17:08:06 +0200 From: Stefan Guggisberg To: jackrabbit-dev@incubator.apache.org Subject: Re: NodeDefinition.getDefaultPrimaryType() In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 9/1/05, lists wrote: > Hi, >=20 > I'm just wondering if I've found a bug with the above method, or if I > just don't understand the way it should work. >=20 > I have the following content type defined (stripped down a little): >=20 > hasOrderableChildNodes=3D"true" primaryItemName=3D""> > autoCreated=3D"false" mandatory=3D"false" onParentVersion=3D"COPY" > protected=3D"false" sameNameSiblings=3D"true" /> > autoCreated=3D"false" mandatory=3D"false" onParentVersion=3D"COPY" > protected=3D"false" sameNameSiblings=3D"true" /> > >=20 > When i run the following code (where nt is the article NodeType): >=20 > NodeDefinition[] defs =3D (NodeDefinition[]) nt.getChildNodeDefinitions()= ; > for (int i=3D0; i System.out.println(defs[i].getDefaultPrimaryType().getName()); > } >=20 > I get: > attachment > attachment >=20 > rather than: > paragraph > attachment >=20 > Is this expected? nope, that's a bug, or more precisely: a side effect of a bug in the node type validation code. your node type contains ambiguous child node definitions, i.e. your node type definition is not valid. i fixed this issue in rev. 267220. btw: your definitions are missing the supertypes declaration, but that's another issue. cheers stefan >=20 > Many thanks in advance, >=20 > Digby >=20 >