xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radu Preotiuc-Pietro" <ra...@bea.com>
Subject RE: creation of new nodes
Date Thu, 15 Jul 2004 16:45:12 GMT
Here it is. Like I said, currently is in the no-package, so it will need to be edited accordingly.

-----Original Message-----
From: David Remy 
Sent: Thursday, July 15, 2004 8:35 AM
To: xmlbeans-user@xml.apache.org
Subject: RE: creation of new nodes


Radu,
Perhaps we could at least post it on this list at an attachment?  Then perhaps we could create
a samples JIRA bug (like Steve Traut has been doing) to get it into a Sample.
rem

  _____  

From: Radu Preotiuc-Pietro 
Sent: Wednesday, July 14, 2004 5:39 PM
To: xmlbeans-user@xml.apache.org
Subject: RE: creation of new nodes


I have it on my machine, the sample generator that remy has originally written.... Unfortunately
I haven't been able to decide where in the tree makes most sense to put it :-)
 
Radu

-----Original Message-----
From: Michael Lancaster [mailto:m.lancaster@ph.unimelb.edu.au]
Sent: Wednesday, July 14, 2004 5:31 PM
To: xmlbeans-user@xml.apache.org
Subject: RE: creation of new nodes



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>

            <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


Mime
View raw message