Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 79115 invoked from network); 6 Sep 2005 10:51:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2005 10:51:43 -0000 Received: (qmail 42706 invoked by uid 500); 6 Sep 2005 10:51:41 -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 42693 invoked by uid 99); 6 Sep 2005 10:51:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2005 03:51:41 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcaj-jackrabbit-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2005 03:51:53 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ECb1j-00015r-5r for jackrabbit-dev@incubator.apache.org; Tue, 06 Sep 2005 12:50:07 +0200 Received: from host217-35-101-254.in-addr.btopenworld.com ([217.35.101.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Sep 2005 12:50:06 +0200 Received: from lists by host217-35-101-254.in-addr.btopenworld.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Sep 2005 12:50:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: jackrabbit-dev@incubator.apache.org From: digby Subject: Re: NodeDefinition.getDefaultPrimaryType() Date: Tue, 06 Sep 2005 11:48:15 +0100 Lines: 89 Message-ID: References: <90a8d1c0050902080810403a57@mail.gmail.com> <90a8d1c0050906031521c80e71@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: host217-35-101-254.in-addr.btopenworld.com User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en In-Reply-To: <90a8d1c0050906031521c80e71@mail.gmail.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Great - thanks a lot. Stefan Guggisberg wrote: > On 9/5/05, lists wrote: > >>Thanks Stefan, >> >>I'd actually snipped out the supertypes, so that's all working fine. >>Will recompile the latest source and see if it makes a difference. Were >>you suggesting that I also need to change my child node definitions? > > > your first example will not validate anymore because those child node > definitions were ambiguous. by additionally specifying different required > types in those child node definitions you actually removed the ambiguity, > i.e. they're fine now. > > cheers > stefan > > >>Digby >> >> >>Stefan Guggisberg wrote: >> >>>On 9/1/05, lists wrote: >>> >>> >>>>Hi, >>>> >>>>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. >>>> >>>>I have the following content type defined (stripped down a little): >>>> >>>> >>>hasOrderableChildNodes="true" primaryItemName=""> >>>> >>>autoCreated="false" mandatory="false" onParentVersion="COPY" >>>>protected="false" sameNameSiblings="true" /> >>>> >>>autoCreated="false" mandatory="false" onParentVersion="COPY" >>>>protected="false" sameNameSiblings="true" /> >>>> >>>> >>>>When i run the following code (where nt is the article NodeType): >>>> >>>>NodeDefinition[] defs = (NodeDefinition[]) nt.getChildNodeDefinitions(); >>>>for (int i=0; i>>> System.out.println(defs[i].getDefaultPrimaryType().getName()); >>>>} >>>> >>>>I get: >>>>attachment >>>>attachment >>>> >>>>rather than: >>>>paragraph >>>>attachment >>>> >>>>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 >>> >>> >>> >>>>Many thanks in advance, >>>> >>>>Digby >>>> >>>> >>> >>> >> >