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 code already implemented. Where can I find out more information so that I can decide if I want to try to add this capability to XmlBeans?
Thanks, Jon ============================================ Jonathan O. Baker The MITRE Corporation Email: [EMAIL PROTECTED] >-----Original Message----- >From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] >Sent: Wednesday, August 30, 2006 1:10 PM >To: [email protected] >Subject: RE: How to use XmlObject.valueEquals > >The JavaDoc for .valueEquals() is fairly detailed but forgets >to mention >one thing: that .valueEquals() is only implemented for simple type >values. > >Actually, Schema-aware comparison is something that a lot of >people find >valuable and XmlBeans has all the foundation work done to support >something like that, unfortunately we weren't able to find an >interested >person that could contribute the code to do it. > >This is my way of saying basically that this would be a great project >for someone who is looking to get involved in XmlBeans and in >Apache and >open-source in general. > >Radu > >-----Original Message----- >From: Bailey, Brian P [mailto:[EMAIL PROTECTED] >Sent: Thursday, August 17, 2006 3:35 PM >To: [email protected] >Subject: How to use XmlObject.valueEquals > >Hi, I'm using xmlbeans 2.1.0 and have a question about comparing >XmlObjects for equivalency. I have the following schema: > ><schema xmlns="http://www.w3.org/2001/XMLSchema" >xmlns:tns="http://myself.com/data" >targetNamespace="http://myself.com/data"> > <complexType name="location2DType"> > <sequence> > <element name="latitude" type="double"/> > <element name="longitude" type="double"/> > </sequence> > </complexType> > <element name="Location2D" type="tns:location2DType"/> </schema> > > >I would like to compare two documents based on this schema and see if >they are equivalent (ignoring element prefixes, attribute ordering, >etc.). I thought I might use XmlObject.valueEquals(), but that doesn't >seem to work. For example, when running the following code, I see >"valueEquals: true" even though the latitude value is different: > > Location2DDocument doc1 = >Location2DDocument.Factory.newInstance(); > doc1.addNewLocation2D(); > doc1.getLocation2D().setLatitude(34.2); > doc1.getLocation2D().setLongitude(84.8); > > Location2DDocument doc2 = >Location2DDocument.Factory.newInstance(); > doc2.addNewLocation2D(); > doc2.getLocation2D().setLatitude(95.2); > doc2.getLocation2D().setLongitude(84.8); > > System.out.println("valueEquals: " + doc1.valueEquals(doc2)); > >What should I use to compare two xml beans for equivalency? > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > >______________________________________________________________________ _ >Notice: This email message, together with any attachments, may contain >information of BEA Systems, Inc., its subsidiaries and affiliated >entities, that may be confidential, proprietary, copyrighted and/or >legally privileged, and is intended solely for the use of the >individual >or entity named in this message. If you are not the intended recipient, >and have received this message in error, please immediately return this >by email and then delete it. > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

