You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Ola Theander <Ol...@nasdaqomx.com> on 2008/04/01 09:02:40 UTC

RE: Issue regarding Xalan 1.10 and XObject::clone() method?

Hi David

Thanks for your answer. I've noticed that the need for cloning is
supposed to be reduced so I think I've managed to solve the problem,
although the solution isn't fully tested yet.

/Ola 

-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: den 31 mars 2008 19:33
To: xalan-c-users@xml.apache.org
Subject: Re: Issue regarding Xalan 1.10 and XObject::clone() method?

Ola Theander wrote:
> Dear subscribers
> 
> I'm currently working on a port of an application from Solaris to 
> Windows that's using Xalan 1.6. Since one of the tasks of the port is 
> to build the application using the new Visual Studio 2008 (VS 2008),
i.e.
> Visual C++ 9.0, I've decided to also upgrade the Xalan library to the 
> 1.10 version which builds smoothly using VS 2008.
> 
> Unfortunately there are some compatibility issues between the ported 
> application and Xalan 1.10. For instance, previously there was a pure 
> virtual clone()-method on the XObject-class which has been removed in 
> later version, specifically with the check-in of the first 
> implementation of the "pluggable memory management". My question is, 
> is there any other similar or replacement method for cloning objects? 
> The ported application makes heavy use of this cloning ability by 
> methods that clone an object provided with a XObject-pointer. As I see

> it, to remedy this can be slightly troublesome since the methods 
> themselves are not aware of the actual class-type that's cloned, and 
> without the clone()-method I guess the method need to know which 
> instance-type to create. Modifying the application to skip the cloning

> and use the provided object will probably introduce some bugs since 
> some of the objects seem to be using reference counting.
Unfortunately, I don't remember the full details of why the clone()
function was removed.  However, I do remember that it was tricky to make
it work with pluggable memory management, and we no longer needed to
clone things within the implementation.

> 
> Any information that could point me into the direction of a smooth 
> solution would be most appreciated since I'm not very familiar with
the 
> Xalan-libraries.
Without knowing why your application is cloning XObjects, it's hard to 
suggest how you might proceed.  Perhaps it's saving the result of an
XPath 
query?  If that's the case, it's trivial to simply save the value a 
particular XObject instance holds.  It's not pretty, but it will work.

If you can provide a few more details about what your application does
with 
the cloned XObjects, that would help.

Dave
Legal Disclaimer:
***********************************************************
This e-mail and the information it contains may be privileged and/or confidential.
It is for the intended addressee(s) only.
The unauthorized use, disclosure or copying of this e-mail, or any information it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the material from your computer.
***********************************************************