Return-Path: Delivered-To: apmail-xmlbeans-user-archive@www.apache.org Received: (qmail 73081 invoked from network); 11 Dec 2006 15:18:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Dec 2006 15:18:59 -0000 Received: (qmail 3417 invoked by uid 500); 11 Dec 2006 15:18:49 -0000 Delivered-To: apmail-xmlbeans-user-archive@xmlbeans.apache.org Received: (qmail 3330 invoked by uid 500); 11 Dec 2006 15:18:48 -0000 Mailing-List: contact user-help@xmlbeans.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: user@xmlbeans.apache.org List-Id: Delivered-To: mailing list user@xmlbeans.apache.org Received: (qmail 3306 invoked by uid 99); 11 Dec 2006 15:18:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 07:18:48 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [213.251.185.113] (HELO doudou.dgconsulting.be) (213.251.185.113) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2006 07:18:38 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by doudou.dgconsulting.be (Postfix) with ESMTP id 3064C33BB6 for ; Mon, 11 Dec 2006 16:18:13 +0100 (CET) X-Virus-Scanned: amavisd-new at dgconsulting.be Received: from doudou.dgconsulting.be ([127.0.0.1]) by localhost (ns21847.ovh.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C6OJ72SDMM2N for ; Mon, 11 Dec 2006 16:18:12 +0100 (CET) Received: by doudou.dgconsulting.be (Postfix, from userid 1008) id 7E6FF33DB3; Mon, 11 Dec 2006 16:18:12 +0100 (CET) To: user@xmlbeans.apache.org Subject: Access multiplicity in schematype MIME-Version: 1.0 Date: Mon, 11 Dec 2006 16:18:12 +0100 From: Message-ID: X-Sender: register@it-xpert.be User-Agent: RoundCube Webmail/0.1b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I would like to know how to access the multiplicity property for an element. Let suppose that I have an xmlbeans object called obj1. I can call method obj1.schemaType().getProperties(). I will get an array of SchemaProperty and I could find out for sub-element what's their multiplicity (0..1, 1, 0..infinite ...) using methods getMinOccurs() and getMaxOccurs(). But this is valid for sub-elements. I would like to get this info for the current element (obj1). In the parent context what's the bounds for obj1 ? It seems that the info is not accessible using this techniques. Using debugger and inspecting schelmatype I see that minOccurs and maxOccurs are always equals to 1 !? Or should I go back to parent ? (this is not very helpful because in my algorithm I assume obj1 is like a root, only looking at child elements) Can someone gives me some light on this ? I need this for an xml comparison algorithm, and I would like to make distinction on matching rule depending if the element is optional or mandatory (that's why I am trying to get info about bounds) Thanks, Bruno --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org For additional commands, e-mail: user-help@xmlbeans.apache.org