Bryan,

XMLBeans 2.3.0 and Saxon 8.8 work well together, like you noticed.

XMLBeans 2.4.0 however needs at least Saxon 9.0.0.4 (and probably works equally 
well with Saxon 9.1.x). The differences between Saxon 8.8 and Saxon 9.0 are too 
big for us to be able to support both in the same XMLBeans version.

That being said, what you are seeing is strange. On the one hand, the copy 
should be close enough to the original that the xpath should give the same 
result, on the other 2.3.0 works.

Could you maybe do something like ((Cursor)app.xmlCursor()).dump() and then the 
same on tmpApp to try to see exactly if there is a difference? 

Radu

> -----Original Message-----
> From: Worrell, Bryan A. [mailto:[email protected]] 
> Sent: Friday, May 22, 2009 2:24 PM
> To: [email protected]
> Subject: RE: xpath on copy of an object fails
> 
> Hi,
> 
> I made a mistake in my email--I was using Saxon 9.0.0.4 along 
> with XMLBeans 2.4.0 and not Saxon 8.  When I used XMLBeans 
> 2.3.0 along with Saxon 8.8 the selectPath() behaves properly 
> when applied to a copy() of an XMLBeans derived class.
> 
> So in my example the following XMLBeans-Saxon pairings failed:
> XMLBeans 2.4.0 and Saxon 9.0.0.4
> XMLBeans 2.4.0 and Saxon 9.1.0.6
> 
> Behaved properly:
> XMLBeans 2.3.0 and Saxon 8.8
> 
> I get exceptions thrown when I try to pair XMLBeans 2.4.0 to 
> Saxon 8.8 and execute selectPath()--is this even possible or 
> does it rely on Saxon 9?
> 
> I don't know if my issue is a Saxon problem or an XMLBeans problem...
> 
> Thanks,
> Bryan Worrell
> 
> __
> Bryan Worrell    
> The MITRE Corporation
> [email protected] 
> 
> 
> 
> 
> >-----Original Message-----
> >From: Worrell, Bryan A. [mailto:[email protected]]
> >Sent: Thursday, May 21, 2009 10:12 AM
> >To: [email protected]
> >Subject: xpath on copy of an object fails
> >
> >Hi,
> >
> >I am using XMLBeans 2.4.0 with Saxon 8 for this example:  I 
> am having a 
> >problem when it comes to doing a selectPath(...) on a copy() of an 
> >object and can't figure out why this is happening.  
> ApplicationType is 
> >an XMLBeans scomp derived class.  The ApplicationType object being 
> >passed in has a Name child element.
> >
> ><ApplicationType id="1">
> >  <Name>foobar</Name>
> >  <!-- More Elements -->
> ></ApplicationType>
> >
> >
> >public void confuseDeveloper ( ApplicationType app ) {
> >  String xPath = "$this/*:Name";
> >
> >  XmlObject[] xmlobjs = app.selectPath( xPath );
> >  System.out.println( xmlobjs.length > 0 );   // prints 
> "true" like it
> >should
> >
> >  ApplicationType tmpApp = (ApplicationType)app.copy();  // 
> make a deep 
> >copy
> >
> >  xmlobjs = tmpApp.selectPath( xPath );
> >  System.out.println( xmlobjs.length > 0 );  // prints 
> "false" ...this 
> >is wrong
> >  logger.debug( tmpApp.getName() );   // prints out "foobar"
> >}
> >
> >
> >I have tried different ways of making a copy of the ApplicationType 
> >object but always have the same results...  Any ideas as to why the 
> >second xPath is failing?
> >
> >Thanks,
> >Bryan Worrell
> >
> >__
> >Bryan Worrell
> >The MITRE Corporation
> >[email protected]
> >
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >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]
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to