Return-Path: Delivered-To: apmail-xml-xmlbeans-user-archive@www.apache.org Received: (qmail 47620 invoked from network); 15 Jul 2004 00:31:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Jul 2004 00:31:33 -0000 Received: (qmail 19565 invoked by uid 500); 15 Jul 2004 00:31:32 -0000 Delivered-To: apmail-xml-xmlbeans-user-archive@xml.apache.org Received: (qmail 19355 invoked by uid 500); 15 Jul 2004 00:31:31 -0000 Mailing-List: contact xmlbeans-user-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: xmlbeans-user@xml.apache.org Delivered-To: mailing list xmlbeans-user@xml.apache.org Received: (qmail 19342 invoked by uid 99); 15 Jul 2004 00:31:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_80_90,HTML_BADTAG_00_10,HTML_MESSAGE,HTML_NONELEMENT_00_10 X-Spam-Check-By: apache.org Date: Thu, 15 Jul 2004 10:30:42 +1000 From: Michael Lancaster Subject: RE: creation of new nodes In-reply-to: <4B2B4C417991364996F035E1EE39E2E10D8F00@uskiex01.amer.bea.com> To: xmlbeans-user@xml.apache.org Message-id: <01LCHJS9LQKOADF2X3@SMTP.UNIMELB.EDU.AU> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Content-type: multipart/alternative; boundary="Boundary_(ID_39FEbBk2hKhY6ffokmWwBA)" Thread-Index: AcRpPxN4AK+vw7ffRHqL49curQz8RAAKnnqAACWdoCA= X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --Boundary_(ID_39FEbBk2hKhY6ffokmWwBA) Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: 7bit fair enough... i solved the problem by just creating a vanilla document and starting from there.. * I do believe that there was a sample generator which would construct instances from various schema types. It did not * handle all the cases, but dealt fairly well with simple ones. do you know where this sample is? i searched the web but couldn't find it... thanks heaps, michael ps great product... _____ From: Eric Vasilik [mailto:ericvas@bea.com] Sent: Wednesday, 14 July 2004 4:21 PM To: xmlbeans-user@xml.apache.org Subject: RE: creation of new nodes XmlBeans does not do this. All documents, elements and attributes are constructed at the request of the user. If one were to consider the automatic creation of content in order to create a valid document, one would not stop at simply creating a child element. Consider a schema which requires a thousand bar's under foo. Would you want all 1000 to be created? What if the schema required 1000-2000 bars? Does one split the difference and create 1500? What about the values that the bars must have to be valid? Creating an instance for a given schema is ambiguous and difficult. (Also consider regular expressions -- constructing strings which are valid with respect to them can be nasty). - Eric -----Original Message----- From: Michael Lancaster [mailto:M.Lancaster@philology.com.au] Sent: Tuesday, July 13, 2004 6:09 PM To: xmlbeans-user@xml.apache.org Subject: creation of new nodes hi, does xmlbeans have a method for creating new nodes which are valid according to the schema? for instance, if i have a structure: where is a mandatory child-element of , is there a way that xmlbeans will automatically create when i create ? otherwise this has to be done manually in order to create a valid document, which seems to defeat some of the purpose of the separation of code and data structure. any help would be greatly appreciated. thanks, michael --Boundary_(ID_39FEbBk2hKhY6ffokmWwBA) Content-type: text/html; charset="us-ascii" Content-transfer-encoding: quoted-printable

fair enough... i solved the problem = by just creating a vanilla document and starting from = there..

 

Ø       I do believe that there was a sample generator which would construct instances from various schema types.  It did not =

Ø       handle all the cases, but dealt fairly well with simple = ones.

 =

do you know = where this sample is? i searched the web but couldn’t find = it...

 =

thanks = heaps,

 =

michael

 =

ps great = product...

 

 


From: Eric Vasilik [mailto:ericvas@bea.com]
Sent: Wednesday, 14 July = 2004 4:21 PM
To: xmlbeans-user@xml.apache.org
Subject: RE: creation of = new nodes

 

XmlBeans does = not do this.  All documents, elements and attributes are constructed at = the request of the user.  If one were to consider the automatic = creation of content in order to create a valid document, one would not stop at = simply creating a child element.  Consider a schema which requires a = thousand bar’s under foo.  Would you want all 1000 to be = created?  What if the schema required 1000-2000 bars?  Does one split the = difference and create 1500?  What about the values that the bars must have to be valid?  Creating an instance for a given schema is ambiguous and difficult.  (Also consider regular expressions -- constructing = strings which are valid with respect to them can be = nasty).

 =

 =

- = Eric

 =

-----Original Message-----
From: Michael Lancaster [mailto:M.Lancaster@philology.com.au]
Sent: Tuesday, July 13, = 2004 6:09 PM
To: xmlbeans-user@xml.apache.org
Subject: creation of new = nodes

 

hi,=

 

does xmlbeans have a method = for creating new nodes which are valid according to the schema? for instance, if i = have a structure:

 

<foo>

    &nbs= p;       <bar/>

</foo>

 

where <bar> is a = mandatory child-element of <foo>, is there a way that xmlbeans will = automatically create <bar> when i create <foo>? otherwise this has to be = done manually in order to create a valid document, which seems to defeat some = of the purpose of the separation of code and data = structure.

 

any help would be greatly appreciated.

 

thanks,

 

michael

--Boundary_(ID_39FEbBk2hKhY6ffokmWwBA)--