Re: Can XMLBean parse multiple XMLs?

2007-06-13 Thread Jacob Danner
Hi Bo, This will not work as a new XmlObject (think xml instance) is created on each call. XmlObject.Factory.parse(FileA); XmlObject.Factory.parse(FileB); XmlObject.Factory.parse(FileC); If you concatenate into one instance that should work. -Jacob Danner On 6/12/07, Bo Wen [EMAIL PROTECTED]

Re: Forcing namespace prefixes

2007-06-13 Thread Rusty Wright
Try this: http://www.xfront.com/BestPracticesHomepage.html Either sections Hide (Localize) Versus Expose Namespaces or Global versus Local. Or just read them all, they're all well worth reading. Muzaffer Ozakca wrote: Hi all, I'm using XMLBeans to create a document. Then I'm importing

Re: Forcing namespace prefixes

2007-06-13 Thread Jacob Danner
Hi Muzaffer, You might be able to do something with XmlCursor (prefixForNamespace(...) )to add the prefix and then use the XmlOption (setSave ... ) to get this behavior. I must ask though, why you need a specific prefix if you are working with DOM implementations. Requiring a specific prefix

Re: Can XMLBean parse multiple XMLs?

2007-06-13 Thread Jacob Danner
Hi Bo, I guess the complete answer is there is no EASY way to do this. You might be able to HACKHACK something together using XmlCursor APIs like XmlCursor.copyXml(...) or copyXmlContents(...). I've gotta wonder if maybe you aren't making this more difficult on yourself by not using standard XML

Re: (AXIS2 + wsdl2java + XMLBeans) + polymorphism = classcast exception

2007-06-13 Thread Spike Mulligan
So that link seems to imply that Axis2 doesn't support substitution groups and I have to tweak the generated code to support them. I understand that if they were using ADB to do their binding. But I'm running wsdl2java with the -u xmlbeans option! Xmlbeans is supposed to support ALL features

Re: Forcing namespace prefixes

2007-06-13 Thread Muzaffer Ozakca
Thanks for your replies. I'm reading the best practices documents suggested by Rusty Wright. Good resource, I'm planning to read all of them since I think I lack an understanding of XML complexities in general. Anyways, You might be able to do something with XmlCursor (prefixForNamespace(...)

Behavior of include/import to avoid regenerate classes

2007-06-13 Thread Jose Manuel Valladares Pernas
Hello, I would like to know if it is correct the different behavior of the import and include elements regarding the generation of java classes. Let me explain. We have two schema files: A.xsd and B.xsd. Both in namespace http://www.namespace.com. (Scenario 1) In A.xsd we use: xs:import

Re: Can XMLBean parse multiple XMLs?

2007-06-13 Thread Bo Wen
Hi, Jacob, Thanks for your thought. The reason to split them into multiple files is to share content. For example, I may have the following import chains: File A -- File B -- File C (B imports A and C imports B) File A -- File B -- File D (B imports A and D imports B) File A -- File E (E

XmlBeans for schema aware comparisons

2007-06-13 Thread Baker, Jon
In august of 2006 a question was asked about using XmlBeans for a schema aware comparison of two XmlObjects. Has any progress been made on this capability since then? How hard is it to implement in XmlBeans? In your response to the question you mentioned that XmlBeans has the foundation for this

Re: (AXIS2 + wsdl2java + XMLBeans) + polymorphism = classcast exception

2007-06-13 Thread Jacob Danner
Hey Spike, Could you try running this scenario oustide of Axis (ie, just add a main method or something). I think you might be hitting this issue http://issues.apache.org/jira/browse/XMLBEANS-329 which is actually a dupe of https://issues.apache.org/jira/browse/AXIS2-2578 as it only appears when

grouping of properties via choice and/or sequence

2007-06-13 Thread Ajay Aggarwal
SchemaType.getElementProperties() return all possible properties for a type. What is the easiest recommended way to find their grouping/relationship? For example some of these may belong to a 'choice' particle. Is walking the particle tree the only option to find these relationships? For

RE: Behavior of include/import to avoid regenerate classes

2007-06-13 Thread Radu Preotiuc-Pietro
It's difficult to assess the correctness, because in the XMLSchema spec, the semantics of Schema composition are left to the implementors. What I can say is that what you noticed is by design. We took the view that import means reference the given Schema doc, while include means treat the given

RE: XmlBeans for schema aware comparisons

2007-06-13 Thread Radu Preotiuc-Pietro
No progress has been made since then. But with XMLBeans, say you have objects obj1 and obj2, you have access to the Schema type for each XmlObject, (SchemaType obj.schemaType()). SchemaType contains all the information about that type from the Schema. XmlCursor on the other hand (XmlCuror

RE: grouping of properties via choice and/or sequence

2007-06-13 Thread Radu Preotiuc-Pietro
Ajay, take a look at SchemaProperty.getJavaSetterDelimiter(), that may be useful. Radu From: Ajay Aggarwal [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 13, 2007 11:03 AM To: user@xmlbeans.apache.org Subject: grouping of

RE: Forcing namespace prefixes

2007-06-13 Thread Cezar Andrei
XmlBeans has to store and preserve the prefixes wherever possible, because this is the only way to preserve the qname values inside a document that has an unknown schema. Don't forget that uris and prefixes have meanings outside of element and attribute names, but also inside attribute values and

RE: Can XMLBeans work with OASIS EML xsd ?

2007-06-13 Thread beans
Radu, Thanks for taking the time to check all this. Yes - each one should be compiled separately - e.g. the main XSD parent files are 110, 120, 210, 320, 410, 440, and so on. Concur on the error in the 440-460 include - will fix that. Glad this is now all resolved. Thanks, DW Original